Hi, I'm taking a college course in C++ so my experience is rather limited. I'm trying to create a two-dimensional array of labels. I'm using the following code but the labels do not show on the form:
private: array<System::Windows::Forms::Label^> ^LabelArr;
..........
void InitializeComponent(void)
{....
this->LabelArr = gcnew array<System::Windows::Forms::Label^>(40);
for (int x = 0; x < 3; x++)
{
this->LabelArr[x]=(gcnew System::Windows::Forms::Label());
this->LabelArr[x]->Visible = true;
this->LabelArr[x]->Enabled = true;
this->LabelArr[x]->AutoSize = true;
this->LabelArr[x]->BackColor = System:rawing::Color::Red;
this->LabelArr[x]->Location = System:rawing::Point(29*x, 13*x);
this->LabelArr[x]->Name = L"LabelArr";
this->LabelArr[x]->Size = System:rawing::Size(29, 13);
this->LabelArr[x]->TabIndex = 0;
this->LabelArr[x]->Text = L"label";
}
.....
Also, I can't look at my form withou running the program.