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


C# TextBox.CreateControl方法代码示例

本文整理汇总了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);
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:8,代码来源:IbusDefaultEventHandlerTests.cs

示例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);
            }
        }
开发者ID:havard,项目名称:strongbind,代码行数:15,代码来源:BindingTests.cs

示例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;

            }

        }
开发者ID:procfxgen,项目名称:MGShaderEditor,代码行数:63,代码来源:ShaderParametersUserControl.cs

示例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();
        }
开发者ID:Tiggor,项目名称:samschanneledit,代码行数:21,代码来源:UCSingleEdit.cs

示例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);
 }
开发者ID:linyc,项目名称:CTool,代码行数:10,代码来源:BarcodeControl.cs

示例6: Init

 public void Init()
 {
     textBox = new TextBox();
     textBox.Multiline=false;
     textBox.CreateControl();
 }
开发者ID:taoxiease,项目名称:asegrp,代码行数:6,代码来源:TextBoxTests.cs


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