本文整理汇总了C#中System.Windows.Forms.ToolStripTextBox类的典型用法代码示例。如果您正苦于以下问题:C# ToolStripTextBox类的具体用法?C# ToolStripTextBox怎么用?C# ToolStripTextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolStripTextBox类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripTextBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: InitializeComponent
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(NameFilterControl));
this.tsName = new ToolStrip();
this.tslName = new ToolStripLabel();
this.tsddNameCondition = new ToolStripDropDownButton();
this.tsmiConditionEqual = new ToolStripMenuItem();
this.tsmiConditionNotEqual = new ToolStripMenuItem();
this.tslMask = new ToolStripLabel();
this.tstbMask = new ToolStripTextBox();
this.tsName.SuspendLayout();
base.SuspendLayout();
this.tsName.BackColor = Color.Transparent;
manager.ApplyResources(this.tsName, "tsName");
this.tsName.GripStyle = ToolStripGripStyle.Hidden;
this.tsName.Items.AddRange(new ToolStripItem[] { this.tslName, this.tsddNameCondition, this.tslMask, this.tstbMask });
this.tsName.Name = "tsName";
this.tslName.Name = "tslName";
manager.ApplyResources(this.tslName, "tslName");
this.tsddNameCondition.DisplayStyle = ToolStripItemDisplayStyle.Text;
this.tsddNameCondition.DropDownItems.AddRange(new ToolStripItem[] { this.tsmiConditionEqual, this.tsmiConditionNotEqual });
manager.ApplyResources(this.tsddNameCondition, "tsddNameCondition");
this.tsddNameCondition.Name = "tsddNameCondition";
this.tsmiConditionEqual.Name = "tsmiConditionEqual";
manager.ApplyResources(this.tsmiConditionEqual, "tsmiConditionEqual");
this.tsmiConditionEqual.Click += new EventHandler(this.tsmiConditionEqual_Click);
this.tsmiConditionNotEqual.Name = "tsmiConditionNotEqual";
manager.ApplyResources(this.tsmiConditionNotEqual, "tsmiConditionNotEqual");
this.tsmiConditionNotEqual.Click += new EventHandler(this.tsmiConditionEqual_Click);
this.tslMask.Name = "tslMask";
manager.ApplyResources(this.tslMask, "tslMask");
this.tstbMask.BorderStyle = BorderStyle.FixedSingle;
manager.ApplyResources(this.tstbMask, "tstbMask");
this.tstbMask.Name = "tstbMask";
this.tstbMask.TextChanged += new EventHandler(this.tstbMask_TextChanged);
manager.ApplyResources(this, "$this");
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(this.tsName);
base.Name = "NameFilterControl";
this.tsName.ResumeLayout(false);
this.tsName.PerformLayout();
base.ResumeLayout(false);
base.PerformLayout();
}
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:44,代码来源:NameFilterControl.cs
示例17: FilterRevisionsHelper
public FilterRevisionsHelper(ToolStripTextBox toolStripTextBoxFilter, ToolStripDropDownButton toolStripDropDownButton1, RevisionGrid RevisionGrid, ToolStripLabel toolStripLabel2, Form form)
: this()
{
this._NO_TRANSLATE_toolStripDropDownButton1 = toolStripDropDownButton1;
this._NO_TRANSLATE_toolStripTextBoxFilter = toolStripTextBoxFilter;
this._NO_TRANSLATE_RevisionGrid = RevisionGrid;
this._NO_TRANSLATE_toolStripLabel2 = toolStripLabel2;
this._NO_TRANSLATE_form = form;
this._NO_TRANSLATE_toolStripDropDownButton1.DropDownItems.AddRange(new ToolStripItem[] {
this.commitToolStripMenuItem1,
this.committerToolStripMenuItem,
this.authorToolStripMenuItem,
this.diffContainsToolStripMenuItem});
this._NO_TRANSLATE_toolStripLabel2.Click += this.ToolStripLabel2Click;
this._NO_TRANSLATE_toolStripTextBoxFilter.Leave += this.ToolStripTextBoxFilterLeave;
this._NO_TRANSLATE_toolStripTextBoxFilter.KeyPress += this.ToolStripTextBoxFilterKeyPress;
}
开发者ID:Carbenium,项目名称:gitextensions,代码行数:19,代码来源:FilterRevisionsHelper.cs
示例18: AddSearch
private void AddSearch()
{
this.toolStrip1.Items.Add("��ӡ״̬");
cb = new ToolStripComboBox();
cb.DropDownStyle = ComboBoxStyle.DropDownList;
//cb.SelectedIndexChanged += new EventHandler(cb_SelectedIndexChanged);
cb.ToolTipText = "ѡ���ѯ�Ĵ�ӡ״̬";
cb.Items.Add("��ѡ��");
cb.Items.Add("δ��ӡ");
cb.Items.Add("�Ѵ�ӡ");
cb.SelectedIndex = 0;
this.toolStrip1.Items.Add(cb);
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,代码行数:19,代码来源:StudentSearch.cs
示例19: GetContextMenuItems
public ToolStripItem[] GetContextMenuItems(OpenLab.Lib.Control Control)
{
var onCommandMenuItem = new ToolStripMenuItem("On Command");
var onCommandTextBox = new ToolStripTextBox("On Command Text Box");
var offCommandMenuItem = new ToolStripMenuItem("Off Command");
var offCommandTextBox = new ToolStripTextBox("Off Command Text Box");
onCommandMenuItem.DropDownItems.Add(onCommandTextBox);
onCommandTextBox.TextChanged += new EventHandler(OnCommandTextBox_TextChanged);
onCommandTextBox.Tag = Control;
offCommandMenuItem.DropDownItems.Add(offCommandTextBox);
offCommandTextBox.TextChanged += new EventHandler(OffCommandTextBox_TextChanged);
offCommandTextBox.Tag = Control;
return new ToolStripItem[]
{
onCommandMenuItem,
offCommandMenuItem
};
}
开发者ID:ngpitt,项目名称:OpenLab,代码行数:20,代码来源:Toggle.cs
示例20: InitializeComponent
private void InitializeComponent()
{
SuspendLayout();
_btnNewModel = new ToolStripButton();
_btnNewModel.ToolTipText = MessageStrings.NewModel;
_btnNewModel.Image = Images.NewModel.ToBitmap();
_btnNewModel.Click += BtnNewModelClick;
Items.Add(_btnNewModel);
_txtBoxSearch = new ToolStripTextBox();
_txtBoxSearch.Text = MessageStrings.FindToolByName;
_txtBoxSearch.TextChanged += TxtBoxSearchTextChanged;
_txtBoxSearch.Leave += TxtBoxSearchLeave;
_txtBoxSearch.Enter += TxtBoxSearchEnter;
_txtBoxSearch.KeyPress += TxtBoxSearchKeyPress;
Items.Add(_txtBoxSearch);
ResumeLayout();
}
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:20,代码来源:ToolManagerToolStrip.cs
注:本文中的System.Windows.Forms.ToolStripTextBox类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论