本文整理汇总了C#中System.Windows.Forms.TextBox.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.Hide方法的具体用法?C# TextBox.Hide怎么用?C# TextBox.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.Hide方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SettingsDialog
public SettingsDialog()
{
Color = new Color[Colors.Count];
Regions = Settings.Regions;
InitializeComponent();
editBox = new TextBox { Location = new Point(0, 0), Size = new Size(0, 0), Font = new Font("Tahoma", 8.25f), AcceptsReturn = true };
editBox.Hide();
m_RegionListing.Controls.AddRange(new Control[] { editBox });
editBox.Text = string.Empty;
editBox.BorderStyle = BorderStyle.FixedSingle;
editBox.KeyPress += editBoxKeyPress;
editBox.LostFocus += focusOver;
editBox.Enter += editBoxEnter;
editBox.Leave += editBoxLeave;
m_colorListBox.DrawMode = DrawMode.OwnerDrawFixed;
m_colorListBox.DrawItem += ColorListBox_DrawItem;
m_colorListBox.SelectedIndex = 0;
addRegionsToListbox();
m_RegionListing.DrawMode = DrawMode.OwnerDrawFixed;
m_RegionListing.DrawItem += RegionListBox_DrawItem;
m_RegionListing.SelectedIndex = 0;
}
示例2: keywordScheme_Element
public keywordScheme_Element()
{
// Configure the keyword box
thisKeywordBox = new TextBox();
thisKeywordBox.Location = new Point( 115, 2 );
thisKeywordBox.BackColor = Color.White;
thisKeywordBox.TextChanged += new EventHandler(thisKeywordBox_TextChanged);
thisKeywordBox.Enter += new EventHandler(textBox_Enter);
thisKeywordBox.Leave += new EventHandler(textBox_Leave);
thisKeywordBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( thisKeywordBox );
// Configure the scheme box
/// thisSchemeBox = new FlatComboBox();
thisSchemeBox = new ComboBox();
thisSchemeBox.Width = 110;
thisSchemeBox.Location = new Point( this.Width - thisSchemeBox.Width - 50, 2 );
thisSchemeBox.TextChanged +=new EventHandler(thisSchemeBox_TextChanged);
thisSchemeBox.Enter += new EventHandler(thisSchemeBox_Enter);
thisSchemeBox.Leave += new EventHandler(thisSchemeBox_Leave);
thisSchemeBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( thisSchemeBox );
// Configure the scheme box, but leave it hidden
readonlySchemeBox = new TextBox();
readonlySchemeBox.Location = thisSchemeBox.Location;
readonlySchemeBox.Width = 110;
readonlySchemeBox.Hide();
readonlySchemeBox.BackColor = Color.WhiteSmoke;
readonlySchemeBox.ReadOnly = true;
readonlySchemeBox.Enter += new EventHandler(textBox_Enter);
readonlySchemeBox.Leave += new EventHandler(textBox_Leave);
readonlySchemeBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( readonlySchemeBox );
// Set default title to blank
title = "no default";
scheme = "Scheme";
scheme_length = 50;
if (!DLC.Tools.Windows_Appearance_Checker.is_XP_Theme)
{
thisSchemeBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
thisKeywordBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
readonlySchemeBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
isXP = false;
}
else
{
isXP = true;
}
}
示例3: DrawControls
public override void DrawControls()
{
InitDatabase();
if (!isEmptyCriterions)
{
isEmptyCriterions = ShowQuery("Выполнить обновление номенклатуры и критериев оценивания?");
}
if (isEmptyCriterions)
{
if (!UpdateRules())
{
throw new ConnectionIsNotExistsException("нужно обновить критерии оценивания и номенклатуру!");
}
}
MainProcess.ClearControls();
MainProcess.ToDoCommand = "Регистрация качества";
labelControl = (MainProcess.CreateLabel("", 5, 59, 229, 39, ControlsStyle.LabelMultilineSmall).GetControl()) as Label;
textBoxControl = (MainProcess.CreateTextBox(0, 0, 0, "", ControlsStyle.LabelH2, onTextBoxEndEdit, false)).GetControl() as TextBox;
textBoxControl.LostFocus += new EventHandler(textBoxControl_LostFocus);
textBoxControl.Hide();
Nomenclature = "";
#region Создание рабочей таблицы
var dataTable = new DataTable();
dataTable.Columns.AddRange(new DataColumn[] {
new DataColumn("CriterionName", typeof(string)),
new DataColumn("CriterionId", typeof(long)),
new DataColumn("Mark", typeof(int)),
new DataColumn("HaveSubCriterion", typeof(bool)),
new DataColumn("ParentCriterionId", typeof(long))
});
#endregion
table = MainProcess.CreateTable("operations", 217, 99, onRowSelected);
table.DT = dataTable;
table.AddColumn("Критерий", "CriterionName", 180);
table.AddColumn("Балл", "Mark", 34);
table.Focus();
}
示例4: Execute
public override bool Execute()
{
TextBox txtNewName = new TextBox();
txtNewName.BackColor = Color.Yellow;
txtNewName.Parent = txt;
txtNewName.Location = txt.GetPositionFromCharIndex(root.StartPosInRootScope);
txtNewName.AutoSize = true;
txt.Controls.Add(txtNewName);
bool shouldChangeName = true;
EventHandler ChangeNameHandler = delegate
{
if (shouldChangeName)
{
root.Name = txtNewName.Text;
}
txtNewName.Hide();
txtNewName.Parent = null;
txt.Controls.Remove(txtNewName);
txt.TriggerExpressionChanged();
txt.Invalidate(root);
};
txtNewName.LostFocus += ChangeNameHandler;
txtNewName.KeyDown += delegate(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
ChangeNameHandler(txtNewName, EventArgs.Empty);
}
if (e.KeyCode == Keys.Escape)
{
shouldChangeName = false;
ChangeNameHandler(txtNewName, EventArgs.Empty);
}
};
txtNewName.Text = root.Name;
txtNewName.Visible = true;
txtNewName.Focus();
txtNewName.SelectAll();
return true;
}
示例5: ListViewEx
public ListViewEx()
{
editBox = new System.Windows.Forms.TextBox();
this.EditFont = this.Font;
this.EditBgColor = Color.LightBlue;
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SMKMouseDown);
this.GridLines = true;
editBox.Size = new System.Drawing.Size(0, 0);
editBox.Location = new System.Drawing.Point(0, 0);
this.Controls.AddRange(new System.Windows.Forms.Control[] { this.editBox });
editBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.EditOver);
editBox.LostFocus += new System.EventHandler(this.FocusOver);
editBox.AutoSize = true;
editBox.Font = this.EditFont;
editBox.BackColor = this.EditBgColor;
editBox.BorderStyle = BorderStyle.FixedSingle;
editBox.Hide();
editBox.Text = "";
}
示例6: Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
console = Config.ConfigSelector.Console;
console.Hide();
Font font = Config.ConfigSelector.Font;
if (font != null)
Program.engine.Font = font;
demoFlowPanel1.Controls.Add(console);
// consoleTextBox1.engine = Program.engine;
browser = Program.engine.Browser;
browser.onChangeDirectory += new EventHandler(browser_onChangeDirectory);
browserPanel.PageService = browser;
browser.onChangeCursor += new EventHandler(browserPanel.onCursorChanged);
browser.CurrentDir = new DirectoryInfo(Directory.GetCurrentDirectory());
Timer timer = new Timer();
timer.Interval = 1000;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
示例7: DrawDataGridView
private void DrawDataGridView()
{
DataGridView dataGridView = new DataGridView();
dataGridView.ScrollBars = ScrollBars.Both;
dataGridView.AutoSize = true;
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.AllowUserToResizeRows = false;
dataGridView.Dock = DockStyle.Fill;
dataGridView.BackgroundColor = SystemColors.Control;
dataGridView.BorderStyle = BorderStyle.None;
dataGridView.ReadOnly = true;
dataGridView.AllowUserToAddRows = false;
dataGridView.RowHeadersVisible = false;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView.DoubleClick += new EventHandler(dataGridView_DoubleClick);
dataGridView.KeyDown += new KeyEventHandler(dataGridView_KeyDown);
dataGridView.ColumnHeadersHeight = 40;
//设置DataGridView的数据源
Form frmDataSource = new Form();
frmDataSource.Controls.Add(dataGridView);
frmDataSource.SuspendLayout();
dataGridViewHost = new ToolStripControlHost(dataGridView);
dataGridViewHost.AutoSize = m_blPopupAutoSize;
TextBox textBox = new TextBox();
textBox.TextChanged += new EventHandler(textBox_TextChanged);
textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
textBox.Hide();
textBoxHost = new ToolStripControlHost(textBox);
dropDown = new ToolStripDropDown();
dropDown.Items.Add(textBoxHost);
dropDown.Items.Add(dataGridViewHost);
}
开发者ID:lc1915,项目名称:Project-of-Information-Systems-Development-Methods-and-Tools,代码行数:37,代码来源:dataCombobox.cs
示例8: Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
Program.engine.setComponent(typeof(IIconProducer), new IconQueue());
IconGetter.RunWorkerAsync();
console = ConfigSelector.createConsole();
console.Hide();
Font font = ConfigSelector.Font;
if (font != null)
Program.engine.Font = font;
demoFlowPanel1.Controls.Add(console);
// consoleTextBox1.engine = Program.engine;
browser = Program.engine.getComponent<IBrowser>();
browser.DirectoryChanged += new EventHandler(browser_onChangeDirectory);
browserPanel.PageService = browser;
browser.CursorChanged += new EventHandler(browserPanel.onCursorChanged);
browser.CurrentDir = new DirectoryInfo(Directory.GetCurrentDirectory());
Program.engine.UINotify += new EventHandler<Engine.Notification.NotifyArgs>(onEngineNotification);
m_demoFlowPanelTimer = new Timer();
m_demoFlowPanelTimer.Interval = 100;
m_demoFlowPanelTimer.Tick += new EventHandler(m_demoFlowPanelTimer_Tick);
m_demoFlowPanelTimer.Start();
}
示例9: SetMemberVariablesToDefault
/// <summary>
/// Set the member variables to default values. Intended only for use in constructors and deserialization code.
/// </summary>
protected virtual void SetMemberVariablesToDefault()
{
m_DeserializationSurrogate=null;
m_Table=null;
m_TableLayout=null;
m_View = null;
// The main menu of this controller.
m_MainMenu = null;
m_MenuItemEditRemove = null;
m_MenuItemColumnSetColumnValues = null;
// Which selection was done last: selection (i) a data column, (ii) a data row, or (iii) a property column.</summary>
m_LastSelectionType = SelectionType.Nothing;
// holds the positions (int) of the right boundarys of the __visible__ (!) columns
m_ColumnStyleCache = new ColumnStyleCache();
// Horizontal scroll position; number of first column that is shown.
m_HorzScrollPos=0;
// Vertical scroll position; Positive values: number of first data column
m_VertScrollPos=0;
m_HorzScrollMax=1;
m_VertScrollMax=1;
m_LastVisibleColumn=0;
m_LastFullyVisibleColumn=0;
// Holds the indizes to the selected data columns.
m_SelectedDataColumns = new Altaxo.Worksheet.IndexSelection(); // holds the selected columns
// Holds the indizes to the selected rows.
m_SelectedDataRows = new Altaxo.Worksheet.IndexSelection(); // holds the selected rows
// Holds the indizes to the selected property columns.
m_SelectedPropertyColumns = new Altaxo.Worksheet.IndexSelection(); // holds the selected property columns
// Holds the indizes to the selected property columns.
m_SelectedPropertyRows = new Altaxo.Worksheet.IndexSelection(); // holds the selected property columns
// Cached number of table rows.
m_NumberOfTableRows=0; // cached number of rows of the table
// Cached number of table columns.
m_NumberOfTableCols=0;
// Cached number of property columns.
m_NumberOfPropertyCols=0; // cached number of property columnsof the table
m_MouseDownPosition = new Point(0,0); // holds the position of a double click
m_DragColumnWidth_ColumnNumber=int.MinValue; // stores the column number if mouse hovers over separator
m_DragColumnWidth_OriginalPos = 0;
m_DragColumnWidth_OriginalWidth=0;
m_DragColumnWidth_InCapture=false;
m_CellEdit_IsArmed=false;
m_CellEdit_EditedCell = new ClickedCellInfo();
m_CellEditControl = new System.Windows.Forms.TextBox();
m_CellEditControl.AcceptsTab = true;
m_CellEditControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
m_CellEditControl.Location = new System.Drawing.Point(392, 0);
m_CellEditControl.Multiline = true;
m_CellEditControl.Name = "m_CellEditControl";
m_CellEditControl.TabIndex = 0;
m_CellEditControl.Text = "";
m_CellEditControl.Hide();
m_CellEdit_IsArmed = false;
m_CellEditControl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnCellEditControl_KeyDown);
m_CellEditControl.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.OnCellEditControl_KeyPress);
//m_View.TableViewWindow.Controls.Add(m_CellEditControl);
}
示例10: codeStatement_Element
public codeStatement_Element( string defaultTitle )
{
// Configure the code box
// thisCodeBox = new FlatComboBox();
thisCodeBox = new ComboBox();
thisCodeBox.Location = new Point( 115, 2 );
thisCodeBox.Width = 100;
thisCodeBox.TextChanged +=new EventHandler(thisCodeBox_TextChanged);
thisCodeBox.Sorted = true;
thisCodeBox.Enter += new EventHandler(thisCodeBox_Enter);
thisCodeBox.Leave += new EventHandler(thisCodeBox_Leave);
thisCodeBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( thisCodeBox );
// Configure the code box, but leave it hidden
readonlyCodeBox = new TextBox();
readonlyCodeBox.Location = new Point( 115, 2 );
readonlyCodeBox.Width = 100;
readonlyCodeBox.Hide();
readonlyCodeBox.BackColor = Color.WhiteSmoke;
readonlyCodeBox.ReadOnly = true;
readonlyCodeBox.Enter += new EventHandler(textBox_Enter);
readonlyCodeBox.Leave += new EventHandler(textBox_Leave);
readonlyCodeBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( readonlyCodeBox );
// Configure the statement box
thisStatementBox = new TextBox();
thisStatementBox.Location = new Point( 240, 2 );
thisStatementBox.BackColor = Color.White;
thisStatementBox.TextChanged += new EventHandler(thisStatementBox_TextChanged);
thisStatementBox.Enter += new EventHandler(textBox_Enter);
thisStatementBox.Leave += new EventHandler(textBox_Leave);
thisStatementBox.ForeColor = System.Drawing.Color.MediumBlue;
this.Controls.Add( thisStatementBox );
// Save the title
title = defaultTitle;
if (!DLC.Tools.Windows_Appearance_Checker.is_XP_Theme)
{
thisCodeBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
thisStatementBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
readonlyCodeBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
isXP = false;
}
else
{
isXP = true;
}
}
示例11: SetupEditBox
private void SetupEditBox()
{
editBox = new System.Windows.Forms.TextBox();
editBox.BackColor = Color.LightYellow;
editBox.BorderStyle = BorderStyle.Fixed3D;
editBox.Location = new System.Drawing.Point(0, 0);
editBox.Size = new System.Drawing.Size(0, 0);
editBox.Text = "";
editBox.LostFocus += new EventHandler(editBox_LostFocus);
editBox.KeyPress += new KeyPressEventHandler(editBox_KeyPress);
Controls.AddRange(new System.Windows.Forms.Control[] { this.editBox });
editBox.Hide();
}
示例12: ReplaceTextBoxWithMultiStringBox
private LabeledMultiStringControl ReplaceTextBoxWithMultiStringBox(TextBox tb,
IVwStylesheet stylesheet)
{
Debug.Assert(Cache != null, "Need a cache to setup a MultiStringBox.");
tb.Hide();
if (m_uiWss.Count == 0)
return null;
var ms = new LabeledMultiStringControl(Cache, m_uiWss, stylesheet);
ms.Location = tb.Location;
ms.Width = tb.Width;
ms.Anchor = tb.Anchor;
ms.AccessibleName = tb.AccessibleName;
// Grow the dialog and move all lower controls down to make room.
Controls.Remove(tb);
ms.TabIndex = tb.TabIndex; // assume the same tab order as the 'designed' control
Controls.Add(ms);
FontHeightAdjuster.GrowDialogAndAdjustControls(this, ms.Height - tb.Height, ms);
return ms;
}
示例13: initEditTextBox
private void initEditTextBox()
{
editBox = new System.Windows.Forms.TextBox();
editBox.Location = new System.Drawing.Point(0, 0);
editBox.Size = new System.Drawing.Size(0, 0);
editBox.Hide();
editBox.Text = "";
editBox.BackColor = Color.Beige;
editBox.Font = new Font("宋体", 15, FontStyle.Regular | FontStyle.Underline, GraphicsUnit.Pixel);
editBox.ForeColor = Color.Blue;
editBox.BorderStyle = BorderStyle.FixedSingle;
editBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.EditOver);
editBox.LostFocus += new System.EventHandler(this.FocusOver);
}