本文整理汇总了C++中TextBox::Select方法的典型用法代码示例。如果您正苦于以下问题:C++ TextBox::Select方法的具体用法?C++ TextBox::Select怎么用?C++ TextBox::Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextBox
的用法示例。
在下文中一共展示了TextBox::Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetItemInstance
//*************************************************************************
// Method: GetItemInstance
// Description: Gets the SIOptionInstance object for a given SIOption
//
// Parameters:
// item - Item to query
//
// Return Value: SIOptionInstance object
//*************************************************************************
SIOptionInstance* SIOptionsListView::GetItemInstance(SIOption* item)
{
SIOptionInstance* instance = dynamic_cast<SIOptionInstance*>(itemInstance->Item[item]);
if (instance)
return instance;
instance = new SIOptionInstance();
// Create the control for editing the setting
ComboBox* comboBox;
TextBox* textBox;
switch (item->type)
{
case SIOptionType::BooleanOption:
comboBox = new ComboBox();
comboBox->DropDownStyle = ComboBoxStyle::DropDownList;
comboBox->Items->Add(S"Disabled");
comboBox->Items->Add(S"Enabled");
comboBox->SelectedIndex = 0;
comboBox->SelectedIndexChanged += new EventHandler(this, OnItemTextChanged);
instance->control = comboBox;
break;
case SIOptionType::IntegerOption:
textBox = new TextBox();
textBox->Text = "0";
textBox->Select(0, 0);
textBox->TextChanged += new EventHandler(this, OnItemTextChanged);
instance->control = textBox;
break;
case SIOptionType::StringOption:
textBox = new TextBox();
textBox->Text = "";
textBox->Select(0, 0);
textBox->TextChanged += new EventHandler(this, OnItemTextChanged);
instance->control = textBox;
break;
}
instance->control->Location = System::Drawing::Point(0, 0);
instance->control->Width = controlHeader->Width;
itemInstance->Add(item, instance);
return instance;
}