本文整理汇总了C#中System.Windows.Forms.TextBox.CreateControl方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.CreateControl方法的具体用法?C# TextBox.CreateControl怎么用?C# TextBox.CreateControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.CreateControl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
m_TextBox = new TextBox();
m_TextBox.CreateControl();
m_TextBox.Focus();
Application.DoEvents();
m_Handler = new IbusDefaultEventHandler(m_TextBox);
}
示例2: TestOneWayBinding
public void TestOneWayBinding()
{
IBusinessObject businessObject = new BusinessObject();
businessObject.Name = "Foo";
TextBox textbox = new TextBox();
textbox.CreateControl();
textbox.BindingContext = new BindingContext();
using (BindingScope scope = new BindingScope())
{
IBusinessObject bindableSource = scope.CreateSource(businessObject);
TextBox bindableTarget = scope.CreateTarget(textbox);
}
}
示例3: DisplayParameters
public void DisplayParameters(List<UIbaseParam> _parameters)
{
SuspendLayout();
foreach (var pd in m_parametersDesc)
{
if (pd.control is SlideCtrl)
{
var slider = pd.control as SlideCtrl;
slider.ValueChanged -= Control_ValueChanging;
slider.Dispose();
}
}
m_parametersDesc.Clear();
ResumeLayout();
int itemY = 0;
int itemH = 16;
foreach (var p in _parameters)
{
Control control = null;
if (p is UIFloatParam)
{
var fp = p as UIFloatParam;
var slider = new SlideCtrl();
slider.Location = new System.Drawing.Point(0, itemY);
slider.Height = itemH;
slider.SetRange(fp.MinRange, fp.MaxRange, 0.01f);
slider.SetPos(fp.Value);
slider.Parent = this;
slider.Text = p.Name;
slider.ValueChanging += Control_ValueChanging;
slider.Tag = p;
slider.CreateControl();
control = slider;
} else if (p is UITexture2DParam) {
var tp = p as UITexture2DParam;
var textbox = new TextBox();
textbox.Location = new System.Drawing.Point(0, itemY);
textbox.Height = itemH;
textbox.Parent = this;
textbox.Text = tp.Value;
textbox.TextChanged += Textbox_TextChanged;
textbox.Tag = p;
textbox.CreateControl();
control = textbox;
}
var pd = new ParamDesc();
pd.param = p;
pd.control = control;
itemY += itemH;
}
}
示例4: EditListViewItem
private void EditListViewItem(ListViewHitTestInfo item)
{
if (item == null || item.SubItem == null)
{
return;
}
TextBox tbxEdit = new TextBox();
tbxEdit.Parent = listView1;
tbxEdit.Tag = item; // Store clicked item
tbxEdit.Location = new Point(item.SubItem.Bounds.Location.X, item.SubItem.Bounds.Location.Y - 1);
tbxEdit.AutoSize = false;
tbxEdit.Height = item.Item.Bounds.Height + 1;
tbxEdit.Width = item.SubItem.Bounds.Width + 1;
tbxEdit.BorderStyle = BorderStyle.FixedSingle;
tbxEdit.KeyDown += new KeyEventHandler(tbxEdit_KeyDown);
tbxEdit.LostFocus += new EventHandler(tbxEdit_LostFocus);
tbxEdit.Text = item.SubItem.Text;
tbxEdit.CreateControl();
tbxEdit.Focus();
}
示例5: CreateTextBox
private void CreateTextBox()
{
_textbox = new TextBox();
_textbox.CreateControl();
_textbox.Parent = _MControl.Parent;
_textbox.Width = 0;
_textbox.Height = 0;
_textbox.TabStop = true;
_textbox.KeyDown += new System.Windows.Forms.KeyEventHandler(textBox_KeyDown);
}
示例6: Init
public void Init()
{
textBox = new TextBox();
textBox.Multiline=false;
textBox.CreateControl();
}