タイトル : テキストボックス配列 投稿日 : 2011/03/10(Thu) 18:45 投稿者 : ダンボ
こんにちは。基本的なところでつまづいてしまいました。 下記のコードでRectsとRegionsは正しく要素がセットされたのにtxtColorsの要素は 全部Nothingでした。(txtColor1〜3はデザイナーでテキストボックスとして定義済み) (Colors(i)も別途正しく定義済み) テキストボックスは何故配列にできないんでしょう? Dim Rects() As Rectangle = ({New Rectangle(0, 0, 27, 27), New Rectangle(27, 0, 27, 27), New Rectangle(27, 27, 27, 27), New Rectangle(0, 27, 27, 27)}) Dim Regions() As Region = ({New Region(Rects(0)), New Region(Rects(1)), New Region(Rects(2)), New Region(Rects(3))}) Dim txtColors() As TextBox = ({txtColor0, txtColor1, txtColor2, txtColor3}) txtColors(i).Text = Hex(Colors(i).ToArgb) |