本文整理汇总了C++中TextArea::maxlen方法的典型用法代码示例。如果您正苦于以下问题:C++ TextArea::maxlen方法的具体用法?C++ TextArea::maxlen怎么用?C++ TextArea::maxlen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextArea
的用法示例。
在下文中一共展示了TextArea::maxlen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowTextArea
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());
}