本文整理汇总了C#中System.Windows.Forms.TabPage.Select方法的典型用法代码示例。如果您正苦于以下问题:C# TabPage.Select方法的具体用法?C# TabPage.Select怎么用?C# TabPage.Select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TabPage
的用法示例。
在下文中一共展示了TabPage.Select方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: toolStripStatusLabel1_Click
private void toolStripStatusLabel1_Click(object sender, EventArgs e)
{
// add browser tab
TabPage newBrowserTab = new TabPage();
// add an underlying browser
WebBrowser newBrowser = new WebBrowser();
newBrowser.Dock = DockStyle.Fill;
newBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
// add tab and a browser to the tab control/*
newBrowserTab.Controls.Add(newBrowser);
this.tabControl1.TabPages.Add(newBrowserTab);
newBrowserTab.Name = comboBox1.Text;
// navigate and focus new tab
newBrowserTab.Select();
newBrowser.Navigate("http://krypton-project.webs.com/start");
newBrowser.Name = "webBrowser2";
newBrowserTab.Controls.Add(statusStrip1);
}
示例2: webBrowser1_NewWindow
private void webBrowser1_NewWindow(object sender, CancelEventArgs e)
{
// add browser tab
TabPage newBrowserTab = new TabPage();
// add an underlying browser
WebBrowser newBrowser = new WebBrowser();
newBrowser.Dock = DockStyle.Fill;
newBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
// add tab and a browser to the tab control/*
newBrowserTab.Controls.Add(newBrowser);
this.tabControl1.TabPages.Add(newBrowserTab);
newBrowserTab.Name = comboBox1.Text;
// navigate and focus new tab
newBrowserTab.Select();
((WebBrowser)tabControl1.SelectedTab.Controls[0]).Navigate(((WebBrowser)
tabControl1.SelectedTab.Controls[0]).StatusText);
newBrowser.Name = "webBrowser2";
e.Cancel = true;
}
示例3: newTabToolStripMenuItem_Click
private void newTabToolStripMenuItem_Click(object sender, EventArgs e)
{
TabPage tb = new TabPage();
TextBox tx = new TextBox();
tx.Font = MaintextBox.Font;
tx.ScrollBars = ScrollBars.Both;
tx.TextChanged += (MaintextBox_TextChanged_1);
tx.Dock = DockStyle.Fill;
tx.Multiline = true;
tb.Text = "untitled";
tb.Controls.Add(tx);
tabControl.Controls.Add(tb);
tb.BringToFront();
tb.Select();
tb.PerformLayout();
}
示例4: openToolStripMenuItem_Click
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog op = new OpenFileDialog();
op.Filter = filter.ToString();
if (op.ShowDialog() == DialogResult.OK)
{
if (((TextBox)tabControl.SelectedTab.Controls[0]).Text.Length > 0)
{
TabPage tb = new TabPage();
TextBox tx = new TextBox();
tx.Font = MaintextBox.Font;
tx.ScrollBars = ScrollBars.Both;
tx.TextChanged += (MaintextBox_TextChanged_1);
tx.Dock = DockStyle.Fill;
tx.Multiline = true;
tb.Text = "untitled";
tb.Controls.Add(tx);
tabControl.Controls.Add(tb);
tb.BringToFront();
tb.Select();
tb.PerformLayout();
using (System.IO.StreamReader sr = new System.IO.StreamReader(op.FileName))
{
tx.Text = (sr.ReadToEnd());
sr.Dispose();
}
}
else
{
using (System.IO.StreamReader sr = new System.IO.StreamReader(op.FileName))
{
((TextBox)tabControl.SelectedTab.Controls[0]).Text = (sr.ReadToEnd());
tabControl.SelectedTab.Text = op.FileName;
sr.Dispose();
}
}
}
}
示例5: ModifiData
private void ModifiData()
{
string so = this.gv_SalesOrder.GetFocusedRowCellValue(gv_SalesOrder.Columns.ColumnByFieldName("sSO")).ToString();
ZX.Win.FunctionParameter FP = new ZX.Win.FunctionParameter();
FP = (ZX.Win.FunctionParameter)this.Tag;
FP.pub_Object = so;
//MessageBox.Show(this.MdiParent.Name.ToString());
Form f = SystemClass.ApplicationFormMain.LoadFunction("Form_Main_WorkOrd", FP, this.MdiParent);
System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(f.Text);
TP.Tag = f;
TP.ToolTipText = f.Text;
foreach (Control item in this.ParentForm.Controls)
{
if ((item is System.Windows.Forms.TabControl) && (item.Name == "TabControFormList"))
{
TabControl c = (TabControl)item;
c.TabPages.Add(TP);
c.SelectedTab = TP;
}
}
TP.Select();
this.Close();
}
示例6: zxPanel1_MouseDoubleClick
private void zxPanel1_MouseDoubleClick(object sender, MouseEventArgs e)
{
Form Frm = null;
Point formPoint = this.PointToClient(Control.MousePosition);//鼠标相对于窗体左上角的坐标
Point ZxpanelPoint = this.PointToClient(zxPanel1.Location);//zxpanel1的位置
//两个坐标相减
Point ItemPoint = new Point((formPoint.X - ZxpanelPoint.X), (formPoint.Y - ZxpanelPoint.Y - 20));
//foreach (IPaintItem item1 in zxPanel1.m_paintitems)
//{
// MessageBox.Show(formPoint.ToString() + "=" + item1.ItemLocate.ToString() + "+" + ZxpanelPoint.ToString());
// //MessageBox.Show(item1.ItemLocate.ToString());
//}
IPaintItem item = this.zxPanel1.GetItemAtPoint(ItemPoint);
if (item != null && item is PaintUnit)
{
//string itemname = ZX.Controls.DotNetMagic.Controls.InputBox.InputBox.ShowInputBox();
//MessageBox.Show(item.ItemName);
//MessageBox.Show(item.ItemSpace);
string FunctionID = "";
FunctionID = item.ItemSpace;//sender.ToString();
FormMainFP.pub_Object = FunctionID;//为特殊功能做准备
//判断是否有权限
string strSqlAUTHORITY = "SELECT * FROM SYS_USER_AUTHORITY where iValidFlag>0 and sFunctionID='" + FunctionID + "' and sRole='" + FormMainFP.Pub_sRole + "'";
if ((ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSqlAUTHORITY).Tables[0].Rows.Count) == 0)
{
////ShowstatusMessage("没有权限访问");
//strMessageLable.BackColor = Color.Blue;
//strMessageLable.ForeColor = Color.White;
//strMessageLable.Text = "没有权限访问";
ShowLabelMessage("没有权限访问");
return;
}
string strSql = "SELECT * FROM SYS_Functions where sFunctionID='" + FunctionID + "'";
if ((ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0].Rows.Count) > 0)
{
zxPanel1.Visible = false;
}
if (PeculiarFunction(FunctionID) == false)//判断是不是特殊功能
{
Frm = SystemClass.ApplicationFormMain.LoadFunction(FunctionID, FormMainFP, this);
if (Frm != null)
{
System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(Frm.Text);
TP.Tag = Frm;
TP.ToolTipText = Frm.Text;
this.TabControFormList.TabPages.Add(TP);
this.TabControFormList.SelectedTab = TP;
TP.Select();
AddAgoFormList();
}
}
}
//MessageBox.Show("OK");
}
示例7: ToolNext_Click
/// <summary>
/// 点击事件
/// </summary>
/// <param name="FunctionText">功能名称</param>
private void ToolNext_Click(string FunctionText)
{
string id = ZX.ZXSystem.DBUtility.DbHelperSQL.GetSingle("select sFunctionID from SYS_FUNCTIONs where sFunctionName like '%" + FunctionText + "%'").ToString();
Form Frm = null;
Frm = SystemClass.ApplicationFormMain.LoadFunction(id, FormMainFP, this);
if (Frm != null)
{
System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(Frm.Text);
TP.Tag = Frm;
TP.ToolTipText = Frm.Text;
this.TabControFormList.TabPages.Add(TP);
this.TabControFormList.SelectedTab = TP;
TP.Select();
AddAgoFormList();
}
}
示例8: Form_Main_KeyUp
private void Form_Main_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F11)
{
ZX.Win.FunctionParameter FP = new ZX.Win.FunctionParameter();
FP.ToolStripitemDisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
FP.functionFormID = "-1";
ZX.Win.ReflectionFunction RF = new ZX.Win.ReflectionFunction();
Form frm = RF.LoadMdiForm("ZXSystem.Function.FunManage.dll", "ZXSystem.Function.FunManage.Form_Main_FunManage", this, FP);
System.Windows.Forms.TabPage TP = new System.Windows.Forms.TabPage(frm.Text);
TP.Tag = frm;
this.TabControFormList.TabPages.Add(TP);
this.TabControFormList.SelectedTab = TP;
TP.Select();
this.zxPanel1.Visible = false;
}
///F12重新加载菜单
if (e.KeyCode == Keys.F12)
{
AddMenu();
AddToolStripMain();
ZX.Win.SetToolBarIcon SBI1 = new ZX.Win.SetToolBarIcon();
SBI1.SetImage(Application.StartupPath + @"\Images\TooBarIco\", this.ToolStripMain, ToolStripItemDisplayStyle.ImageAndText);
}
}