private void CreateMyStatusBar()
{
// Create a StatusBar control.
StatusBar statusBar1 = new StatusBar();
// Create two StatusBarPanel objects to display in the StatusBar.
StatusBarPanel panel1 = new StatusBarPanel();
StatusBarPanel panel2 = new StatusBarPanel(); // Display the first panel with a sunken border style.
panel1.BorderStyle = StatusBarPanelBorderStyle.Sunken;
// Initialize the text of the panel.
panel1.Text = "Ready...";
// Set the AutoSize property to use all remaining space on the StatusBar.
panel1.AutoSize = StatusBarPanelAutoSize.Spring;
// Display the second panel with a raised border style.
panel2.BorderStyle = StatusBarPanelBorderStyle.Raised;
// Create ToolTip text that displays the current time.
panel2.ToolTipText = System.DateTime.Now.ToShortTimeString();
// Set the text of the panel to the current date.
panel2.Text = System.DateTime.Today.ToLongDateString();
// Set the AutoSize property to size the panel to the size of the contents.
panel2.AutoSize = StatusBarPanelAutoSize.Contents;
// Display panels in the StatusBar control.
statusBar1.ShowPanels = true; // Add both panels to the StatusBarPanelCollection of the StatusBar.
statusBar1.Panels.Add(panel1);
statusBar1.Panels.Add(panel2); // Add the StatusBar to the form.
this.Controls.Add(statusBar1);
}
{
// Create a StatusBar control.
StatusBar statusBar1 = new StatusBar();
// Create two StatusBarPanel objects to display in the StatusBar.
StatusBarPanel panel1 = new StatusBarPanel();
StatusBarPanel panel2 = new StatusBarPanel(); // Display the first panel with a sunken border style.
panel1.BorderStyle = StatusBarPanelBorderStyle.Sunken;
// Initialize the text of the panel.
panel1.Text = "Ready...";
// Set the AutoSize property to use all remaining space on the StatusBar.
panel1.AutoSize = StatusBarPanelAutoSize.Spring;
// Display the second panel with a raised border style.
panel2.BorderStyle = StatusBarPanelBorderStyle.Raised;
// Create ToolTip text that displays the current time.
panel2.ToolTipText = System.DateTime.Now.ToShortTimeString();
// Set the text of the panel to the current date.
panel2.Text = System.DateTime.Today.ToLongDateString();
// Set the AutoSize property to size the panel to the size of the contents.
panel2.AutoSize = StatusBarPanelAutoSize.Contents;
// Display panels in the StatusBar control.
statusBar1.ShowPanels = true; // Add both panels to the StatusBarPanelCollection of the StatusBar.
statusBar1.Panels.Add(panel1);
statusBar1.Panels.Add(panel2); // Add the StatusBar to the form.
this.Controls.Add(statusBar1);
}
或者就在page_load里面Response.个javasrcipt
说错了。不是创建statusbar.是用颜色填充状态栏
真不好意思
说错了。不是创建statusbar.是用颜色填充状态栏
真不好意思
————————————————————
差点大脑就彻底DEADLOCK了。
look, maybe help
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319311
StatusBar.Panels.Clear();
panelStatus = new StatusBarPanel();
panelStatus.BorderStyle = StatusBarPanelBorderStyle.Sunken;
panelStatus.AutoSize = StatusBarPanelAutoSize.Spring;
StatusBar.ShowPanels = true;
StatusBar.Panels.Add(panelStatus);
this.Controls.Add(StatusBar);在你想改变显示的地方用:
panelStatus.Text = "系统正在运行中";
StatusBarPanel panelStatus;
System.Windows.Forms.StatusBar StatusBar;StatusBar.Panels.Clear();
panelStatus = new StatusBarPanel();
panelStatus.BorderStyle = StatusBarPanelBorderStyle.Sunken;
panelStatus.AutoSize = StatusBarPanelAutoSize.Spring;
StatusBar.ShowPanels = true;
StatusBar.Panels.Add(panelStatus);
this.Controls.Add(StatusBar);在你想改变显示的地方用:
panelStatus.Text = "系统正在运行中";同理可创建多个项。
或者就在page_load里面Response.个javasrcipt