30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

564 Graphical User Interfaces Concepts: Part 2 Chapter 13<br />

TabControl properties<br />

and events Description / Delegate and Event Arguments<br />

Common Properties<br />

ImageList Specifies images <strong>to</strong> be displayed on tabs.<br />

ItemSize Specifies tab size.<br />

MultiLine Indicates whether multiple rows of tabs can be displayed.<br />

SelectedIndex Index of selected TabPage.<br />

SelectedTab The selected TabPage.<br />

TabCount Returns the number of tab pages.<br />

TabPages Collection of TabPages within the TabControl.<br />

Common Event (Delegate EventHandler, event arguments EventArgs)<br />

SelectedIndexChanged Generated when SelectedIndex changes (i.e., another<br />

TabPage is selected).<br />

Fig. 13.29 TabControl properties and events.<br />

1 ' Fig. 13.30: UsingTabs.vb<br />

2 ' Using TabControl <strong>to</strong> display various font settings.<br />

3<br />

4 Imports System.Windows.Forms<br />

5<br />

6 Public Class FrmTabs<br />

7 Inherits Form<br />

8<br />

9 ' output label reflects text changes<br />

10 Friend WithEvents lblDisplay As Label<br />

11<br />

12 ' table control containing table pages tbpColor,<br />

13 ' tbpSize, tbpMessage and tbpAbout<br />

14 Friend WithEvents tbcTextOptions As TabControl<br />

15<br />

16 ' table page containing color options<br />

17 Friend WithEvents tbpColor As TabPage<br />

18 Friend WithEvents radBlack As RadioBut<strong>to</strong>n<br />

19 Friend WithEvents radRed As RadioBut<strong>to</strong>n<br />

20 Friend WithEvents radGreen As RadioBut<strong>to</strong>n<br />

21<br />

22 ' table page containing font size options<br />

23 Friend WithEvents tbpSize As TabPage<br />

24 Friend WithEvents radSize12 As RadioBut<strong>to</strong>n<br />

25 Friend WithEvents radSize16 As RadioBut<strong>to</strong>n<br />

26 Friend WithEvents radSize20 As RadioBut<strong>to</strong>n<br />

27<br />

28 ' table page containing text display options<br />

29 Friend WithEvents tbpMessage As TabPage<br />

Fig. 13.30 TabControl used <strong>to</strong> display various font settings (part 1 of 3).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!