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


C# Forms.ToolStripTextBox类代码示例

本文整理汇总了C#中System.Windows.Forms.ToolStripTextBox的典型用法代码示例。如果您正苦于以下问题:C# ToolStripTextBox类的具体用法?C# ToolStripTextBox怎么用?C# ToolStripTextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ToolStripTextBox类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripTextBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Constructor

		public void Constructor ()
		{
			ToolStripTextBox tsi = new ToolStripTextBox ();

			Assert.AreEqual (false, tsi.AcceptsReturn, "A1");
			Assert.AreEqual (false, tsi.AcceptsTab, "A2");
			Assert.AreEqual ("System.Windows.Forms.AutoCompleteStringCollection", tsi.AutoCompleteCustomSource.GetType ().ToString (), "A3");
			Assert.AreEqual (AutoCompleteMode.None, tsi.AutoCompleteMode, "A4");
			Assert.AreEqual (AutoCompleteSource.None, tsi.AutoCompleteSource, "A5");
			Assert.AreEqual (BorderStyle.Fixed3D, tsi.BorderStyle, "A6");
			Assert.AreEqual (false, tsi.CanUndo, "A7");
			Assert.AreEqual (CharacterCasing.Normal, tsi.CharacterCasing, "A8");
			Assert.AreEqual (true, tsi.HideSelection, "A9");
			Assert.AreEqual ("System.String[]", tsi.Lines.GetType ().ToString (), "A10");
			Assert.AreEqual (32767, tsi.MaxLength, "A11");
			//Bug in TextBox
			//Assert.AreEqual (false, tsi.Modified, "A12");
			Assert.AreEqual (false, tsi.ReadOnly, "A13");
			Assert.AreEqual (string.Empty, tsi.SelectedText, "A14");
			Assert.AreEqual (0, tsi.SelectionLength, "A15");
			Assert.AreEqual (0, tsi.SelectionStart, "A16");
			Assert.AreEqual (true, tsi.ShortcutsEnabled, "A17");
			Assert.AreEqual ("System.Windows.Forms.ToolStripTextBox+ToolStripTextBoxControl", tsi.TextBox.GetType ().ToString (), "A18");
			Assert.AreEqual (HorizontalAlignment.Left, tsi.TextBoxTextAlign, "A19");
			Assert.AreEqual (0, tsi.TextLength, "A20");

			tsi = new ToolStripTextBox ("Bob");
			Assert.AreEqual ("Bob", tsi.Name, "A21");
			Assert.AreEqual (string.Empty, tsi.Control.Name, "A22");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:30,代码来源:ToolStripTextBoxTest.cs

示例2: BrowseData

 public BrowseData(ToolStripTextBox textBox, Button buttonOk, CtrlType ctrlType)
 {
     _textBox = textBox;
     _buttonOk = buttonOk;
     _ctrlType = ctrlType;
     buttonOk.Enabled = false;
 }
开发者ID:jsakamoto,项目名称:bjd5,代码行数:7,代码来源:BrowseData.cs

示例3: Bind

        public static void Bind(ToolStripMenuItem parent, string path)
        {
            foreach (ExtensionNode node in AddinManager.GetExtensionObjects("/EcIDE/Menu/" + path))
            {
                var cmds = node.GetCommand();

                foreach (var ec in cmds)
                {
                    var eps = ec as separator;
                    if (eps != null)
                    {
                        parent.DropDownItems.Add(new ToolStripSeparator());
                    }

                    var ep = ec as menuitem;
                    if (ep != null)
                    {
                        var target = node.CreateInstances<IMenu>()[0];

                        target.Init(new ServiceContainer());

                        var it = new ToolStripMenuItem(
                            ep.text,
                            null,
                            (sender, args) =>
                                target.GetType().GetMethod(ep.click).Invoke(target, new[] { sender, args }));

                        try
                        {
                            it.Enabled = bool.Parse(ep.enabled);
                        }
                        catch { }

                        parent.DropDownItems.Add(it);
                    }

                    var eptb = ec as textbox;
                    if (eptb != null)
                    {
                        var target = node.CreateInstances<IMenu>()[0];

                        target.Init(new ServiceContainer());

                        var tb = new ToolStripTextBox();
                        tb.TextChanged += (sender, args) => target.GetType().GetMethod(eptb.textchanged).Invoke(target, new[] { sender, args });

                        try
                        {
                            tb.Visible = bool.Parse(eptb.visible);
                        }
                        catch
                        {
                        }

                        parent.DropDownItems.Add(tb);
                    }
                }
            }
        }
开发者ID:Myvar,项目名称:Eclang,代码行数:59,代码来源:MenuBinder.cs

示例4: ParallaxToolStrip

        public ParallaxToolStrip(SerialParallax osc, GraphControl gc)
        {
            oscillo = osc;
            graphControl = gc;

            //
            // toolStrip2
            //
            this.toolStrip = new System.Windows.Forms.ToolStrip();
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name = "toolStrip2";
            this.toolStrip.Size = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text = "toolStrip2";

            this.triggerLabel = new System.Windows.Forms.ToolStripLabel();
            this.trigger = new System.Windows.Forms.ToolStripTextBox();
            this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
            this.triggerMode = new System.Windows.Forms.ToolStripComboBox();

            //
            // triggerLabel
            //
            this.triggerLabel.Name = "triggerLabel";
            this.triggerLabel.Size = new System.Drawing.Size(42, 22);
            this.triggerLabel.Text = "trigger";
            this.toolStrip.Items.Add(this.triggerLabel);

            //
            // trigger
            //
            this.trigger.Name = "trigger";
            this.trigger.Size = new System.Drawing.Size(50, 25);
            this.trigger.Text = "0";
            this.trigger.Validating += new System.ComponentModel.CancelEventHandler(this.trigger_Validating);
            this.trigger.Validated += new System.EventHandler(this.trigger_Validated);
            this.toolStrip.Items.Add(this.trigger);

            //
            // triggerMode
            //
            this.triggerMode.Items.AddRange(new object[] {
            "ch1 ˄",
            "ch1 ˅",
            "ch2 ˄",
            "ch2 ˅",
            "ext ˄"});
            this.triggerMode.Name = "triggerMode";
            this.triggerMode.Size = new System.Drawing.Size(20, 25);
            this.triggerMode.SelectedIndexChanged += new System.EventHandler(this.triggerMode_SelectedIndexChanged);
            triggerMode.SelectedIndex = 0;
            this.toolStrip.Items.Add(this.triggerMode);

            //channels.SelectedIndex = 0;
            trigger.Text = "0";
            triggerMode.SelectedIndex = 0;
            oscillo.TriggerVoltage = (float.Parse(trigger.Text));
        }
开发者ID:karawin,项目名称:xoscillo,代码行数:59,代码来源:ParallaxToolStrip.cs

示例5: InitToolBar

 //�ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡι��߳�ʼ����
 protected void InitToolBar(ShoulderToolBar obBar, ToolStripTextBox obText, ToolStripButton obButton, string text)
 {
     obBar.Parent = this;
     obText.Text = text;
     obBar.Dock = DockStyle.Top;
     obBar.AddItem(obText, true);
     obBar.Items.Add(obButton);
 }
开发者ID:r1ng0to3tour,项目名称:swsplayer,代码行数:9,代码来源:AppForm.cs

示例6: AddSearch

 private void AddSearch()
 {
     this.toolStrip1.Items.Add("ѧԱ����");
     ToolStripTextBox txt = new System.Windows.Forms.ToolStripTextBox();
     txt.KeyDown += new KeyEventHandler(txt_KeyDown);
     txt.ToolTipText = "�����������س���ѯ";
     this.toolStrip1.Items.Add(txt);
 }
开发者ID:romanu6891,项目名称:fivemen,代码行数:8,代码来源:StudentFeeSearch.cs

示例7: TagMenu

		public TagMenu() {
			base.Text = Resources.TagsMenuHeader;

			customTag = new ToolStripTextBox();
			customTag.KeyUp += CustomTagKeyUp;

			DropDownOpening += OnDropDownOpening;
		}
开发者ID:dbremner,项目名称:szotar,代码行数:8,代码来源:TagMenu.cs

示例8: AddSearch

 private void AddSearch()
 {
     this.toolStrip1.Items.Add("姓名");
     txt = new System.Windows.Forms.ToolStripTextBox();
     txt.KeyDown += new KeyEventHandler(txt_KeyDown);
     txt.ToolTipText = "输入姓名按回车查询";
     this.toolStrip1.Items.Add(txt);
 }
开发者ID:romanu6891,项目名称:fivemen,代码行数:8,代码来源:UploadFingerRecordSearch.cs

示例9: initTool

 //�ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡι��߳�ʼ����
 public void initTool(ShoulderToolBar obTool, ToolStripTextBox obText, ToolStripButton obButton, string stPath)
 {
     obTool.Parent = m_obParent;
     obTool.Dock = DockStyle.Top;
     obTool.AddItem(obText, true);
     obTool.Items.Add(obButton);
     obText.Text = stPath;
 }
开发者ID:r1ng0to3tour,项目名称:swsplayer,代码行数:9,代码来源:LineLayout.cs

示例10: LoadMenu

		public void LoadMenu(ToolStripMenuItem item) {
			// Add option to change chart size
			var container = new ToolStripMenuItem("Chart size");
			item.DropDownItems.Add(container);
			var txtChartSize = new ToolStripTextBox("txtChartSize");
			txtChartSize.Text = "Chart size";
			txtChartSize.TextBox.Text = mChartSize.ToString();
			txtChartSize.TextChanged += new EventHandler(txtChartSize_TextChanged);
			container.DropDownItems.Add(txtChartSize);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:10,代码来源:PalPreviewPanel.cs

示例11: InitializeComponent

 private void InitializeComponent()
 {
     ComponentResourceManager manager = new ComponentResourceManager(typeof(PropertyVersionFilterControl));
     this.tsTop = new ToolStrip();
     this.tslField = new ToolStripLabel();
     this.tslPropertyName = new ToolStripLabel();
     this.tslIs = new ToolStripLabel();
     this.tsddValueOperation = new ToolStripDropDownButton();
     this.tsmiOperationEquals = new ToolStripMenuItem();
     this.tsmiOperationNotEquals = new ToolStripMenuItem();
     this.tsmiOperationSmaller = new ToolStripMenuItem();
     this.tsmiOperationLarger = new ToolStripMenuItem();
     this.tstbValue = new ToolStripTextBox();
     this.tsTop.SuspendLayout();
     base.SuspendLayout();
     this.tsTop.BackColor = Color.Transparent;
     manager.ApplyResources(this.tsTop, "tsTop");
     this.tsTop.GripStyle = ToolStripGripStyle.Hidden;
     this.tsTop.Items.AddRange(new ToolStripItem[] { this.tslField, this.tslPropertyName, this.tslIs, this.tsddValueOperation, this.tstbValue });
     this.tsTop.Name = "tsTop";
     this.tslField.Name = "tslField";
     manager.ApplyResources(this.tslField, "tslField");
     this.tslPropertyName.Name = "tslPropertyName";
     manager.ApplyResources(this.tslPropertyName, "tslPropertyName");
     this.tslIs.Name = "tslIs";
     manager.ApplyResources(this.tslIs, "tslIs");
     this.tsddValueOperation.DisplayStyle = ToolStripItemDisplayStyle.Text;
     this.tsddValueOperation.DropDownItems.AddRange(new ToolStripItem[] { this.tsmiOperationEquals, this.tsmiOperationNotEquals, this.tsmiOperationSmaller, this.tsmiOperationLarger });
     this.tsddValueOperation.Name = "tsddValueOperation";
     manager.ApplyResources(this.tsddValueOperation, "tsddValueOperation");
     this.tsmiOperationEquals.Name = "tsmiOperationEquals";
     manager.ApplyResources(this.tsmiOperationEquals, "tsmiOperationEquals");
     this.tsmiOperationEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationNotEquals.Name = "tsmiOperationNotEquals";
     manager.ApplyResources(this.tsmiOperationNotEquals, "tsmiOperationNotEquals");
     this.tsmiOperationNotEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationSmaller.Name = "tsmiOperationSmaller";
     manager.ApplyResources(this.tsmiOperationSmaller, "tsmiOperationSmaller");
     this.tsmiOperationSmaller.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationLarger.Name = "tsmiOperationLarger";
     manager.ApplyResources(this.tsmiOperationLarger, "tsmiOperationLarger");
     this.tsmiOperationLarger.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tstbValue.BorderStyle = BorderStyle.FixedSingle;
     manager.ApplyResources(this.tstbValue, "tstbValue");
     this.tstbValue.Name = "tstbValue";
     this.tstbValue.TextChanged += new EventHandler(this.tstbValue_TextChanged);
     manager.ApplyResources(this, "$this");
     base.AutoScaleMode = AutoScaleMode.Font;
     base.Controls.Add(this.tsTop);
     base.Name = "PropertyVersionFilterControl";
     this.tsTop.ResumeLayout(false);
     this.tsTop.PerformLayout();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:55,代码来源:PropertyVersionFilterControl.cs

示例12: GetContextMenuItems

        public ToolStripItem[] GetContextMenuItems(Lib.Control Control)
        {
            var getCommandMenuItem = new ToolStripMenuItem("Get Command");
            var getCommandTextBox = new ToolStripTextBox("Get Command Text Box");

            getCommandMenuItem.DropDownItems.Add(getCommandTextBox);
            getCommandTextBox.TextChanged += new EventHandler(GetCommandToolStripTextBox_TextChanged);
            getCommandTextBox.Tag = Control;

            return new ToolStripItem[] { getCommandMenuItem };
        }
开发者ID:ngpitt,项目名称:OpenLab,代码行数:11,代码来源:Meter.cs

示例13: BuildOwnToolStripMenu

        private void BuildOwnToolStripMenu()
        {
            ToolStripLabel tslSearch = new ToolStripLabel("Suche:");
            this.toolStripMain.Items.Add(tslSearch);

            ToolStripTextBox tstbSearch = new ToolStripTextBox("tstbSearch");
            tstbSearch.Text = "Suchbegriff";
            tstbSearch.ForeColor = Color.Gray;
            tstbSearch.KeyDown += new KeyEventHandler(tstbSearch_KeyDown);
            tstbSearch.GotFocus += new EventHandler(tstbSearch_GotFocus);
            tstbSearch.LostFocus += new EventHandler(tstbSearch_LostFocus);

            this.toolStripMain.Items.Add(tstbSearch);
        }
开发者ID:fdeitelhoff,项目名称:Twainsoft.ImageProcessing,代码行数:14,代码来源:FrmToolboxShapes.cs

示例14: AddSearch

        private void AddSearch()
        {
            this.toolStrip1.Items.Add("����");
            txt1 = new System.Windows.Forms.ToolStripTextBox();

            txt1.KeyDown += new KeyEventHandler(txt1_KeyDown);
            txt1.ToolTipText = "���복�ΰ��س���ѯ";
            this.toolStrip1.Items.Add(txt1);

            this.toolStrip1.Items.Add("վ��");
            txt2 = new System.Windows.Forms.ToolStripTextBox();

            txt2.KeyDown += new KeyEventHandler(txt2_KeyDown);
            txt2.ToolTipText = "����վ�����س���ѯ";
            this.toolStrip1.Items.Add(txt2);
        }
开发者ID:romanu6891,项目名称:fivemen,代码行数:16,代码来源:TrainSearchControl.cs

示例15: addTextBox

 public static ToolStripItem addTextBox(object control, String controlName, string defaultValue, KeyEventHandler onKeyUp)
 {
     var toolStrip = getToolStripControl(control);
     if (toolStrip != null)
     {
         return (ToolStripItem)toolStrip.invokeOnThread(
             () =>
             {
                 var newTextBox = new ToolStripTextBox(controlName) { Text = defaultValue };
                 toolStrip.Items.Add(newTextBox);
                 if (onKeyUp != null)
                     newTextBox.KeyUp += onKeyUp;
                 return newTextBox;
             });
     }
     return null;
 }   
开发者ID:pusp,项目名称:o2platform,代码行数:17,代码来源:O2Forms_ThreadSafe_ToolStrip.cs


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