Give a little more visual feedback when tabs are changed
svn path=/trunk/winforms/; revision=35748
This commit is contained in:
Родитель
ccea1d2b01
Коммит
6694b0762e
|
@ -20,21 +20,16 @@ namespace System.Windows.Forms {
|
|||
{
|
||||
TabControl tab = new TabControl ();
|
||||
tab.Alignment = TabAlignment.Top;
|
||||
tab.Dock = DockStyle.Fill;
|
||||
// tab.Appearance = TabAppearance.FlatButtons;
|
||||
// tab.Multiline = true;
|
||||
|
||||
tab.Controls.Add (new TabPage ("Tab A"));
|
||||
tab.Controls.Add (new TabPage ("Tab B"));
|
||||
tab.Controls.Add (new TabPage ("Tab C"));
|
||||
tab.Controls.Add (new TabPage ("Tab D"));
|
||||
tab.Controls.Add (new TabPage ("Tab E"));
|
||||
|
||||
tab.Controls.Add (new TabPage ("Tab F"));
|
||||
tab.Controls.Add (new TabPage ("Tab G"));
|
||||
tab.Controls.Add (new TabPage ("Tab H"));
|
||||
tab.Controls.Add (new TabPage ("Tab I"));
|
||||
tab.Controls.Add (new TabPage ("Tab J"));
|
||||
tab.Controls.Add (new TabPage ("Tab K"));
|
||||
tab.Controls.Add (CreateTabPage ("Red", Color.FromArgb (255, 255, 0, 0)));
|
||||
tab.Controls.Add (CreateTabPage ("Orange", Color.FromArgb (255, 255, 153, 0)));
|
||||
tab.Controls.Add (CreateTabPage ("Yellow", Color.FromArgb (255, 255, 255, 0)));
|
||||
tab.Controls.Add (CreateTabPage ("Green", Color.FromArgb (255, 0, 153, 0)));
|
||||
tab.Controls.Add (CreateTabPage ("Blue", Color.FromArgb (255, 0, 0, 255)));
|
||||
tab.Controls.Add (CreateTabPage ("Purple", Color.FromArgb (255, 197, 0, 148)));
|
||||
|
||||
tab.Height = 200;
|
||||
tab.SelectedIndex = 3;
|
||||
|
@ -42,6 +37,13 @@ namespace System.Windows.Forms {
|
|||
|
||||
}
|
||||
|
||||
private TabPage CreateTabPage (string label, Color c)
|
||||
{
|
||||
TabPage res = new TabPage (label);
|
||||
res.BackColor = c;
|
||||
return res;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Application.Run (new TabControlDemo ());
|
||||
|
|
Загрузка…
Ссылка в новой задаче