当前位置: 首页>>代码示例>>C++>>正文


C++ TextArea::value方法代码示例

本文整理汇总了C++中TextArea::value方法的典型用法代码示例。如果您正苦于以下问题:C++ TextArea::value方法的具体用法?C++ TextArea::value怎么用?C++ TextArea::value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextArea的用法示例。


在下文中一共展示了TextArea::value方法的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());

	
}
开发者ID:clmitchell289,项目名称:CSUMB-CST231,代码行数:62,代码来源:SimpleForm.cpp


注:本文中的TextArea::value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。