void SimpleForm::ShowTextArea(const TextArea &ta) { // --- Create Label this->txtLbl = new Label(); this->txtLbl->AutoSize = true; this->txtLbl->Location = Drawing::Point(8, 16); this->txtLbl->Size = Drawing::Size(28, 13); char *strLabel = new char[ta.label().length()+1]; strcpy( strLabel, ta.label().c_str() ); this->txtLbl->Text = strLabel; delete strLabel; Controls->Add(this->txtLbl); // ---- create Textbox --- txtBox = new TextBox; int xPos = this->txtLbl->get_Right() + 4; txtBox->Location = Point(xPos, 16); txtBox->Enabled = false; txtBox->BackColor = Drawing::Color::White; txtBox->ForeColor = Drawing::Color::Black; txtBox->AutoSize = true; txtBox->Text = Convert2Char(ta.value()); txtBox->Height = ta.height(); txtBox->WordWrap = true; Drawing::Font* tbf = txtBox->Font; txtBox->Width = int((double)(ta.width()+1) * (double)((tbf->SizeInPoints * ( 72.0/ 96.0)))); Controls->Add(txtBox); int xWidth = int((double)(ta.width()) * (double)((tbf->SizeInPoints * ( 72.0/ 96.0)))); Lbltxtb = new Label(); Lbltxtb->AutoSize = false; Lbltxtb->Location = Drawing::Point(xPos+200, 36); Lbltxtb->Size = Drawing::Size(xWidth, 15); Lbltxtb->Text = Convert2Char(ta.value()); Lbltxtb->Width = int((double)(ta.width()+2) * (double)((tbf->SizeInPoints * ( 72.0/ 96.0)))); Lbltxtb->BackColor = System::Drawing::Color::White; Lbltxtb->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D; Controls->Add(this->Lbltxtb); // // Setup and display attribute information // //int tmpInt; LblNumItems->Visible = false; LblNumItemsb->Visible = false; LblHeight->Visible = false; LblHeightb->Visible = false; LblSizeb->Text = ta.size().ToString(); LblMaxLengthb->Text = ta.maxlen().ToString(); LblValLenthb->Text = ta.value().length().ToString(); LblWidthb->Text = ta.width().ToString(); LblValDatab->Text = Convert2Char(ta.value()); }