![]()
TWizardTree is a simple component derived from TPanel that implements a tree as pictured here. It emulates the control used in Wizards for Office 97. To see one in action, start Microsoft Word 97, select File | New, then select the Letters & Faxes page and double click on Fax Wizard.wiz. TWizardTree comes in handy when your wizard has many pages, and can provide the user with a "road map" to the wizard. It allows the user to click on each entry. It is easily connected to a PageControl. Source included, tested on Delphi 3. Should be compatible with Delphi 1 and 2. |
Properties | |
Items : TStrings |
The Items property contains the names for the all the entries in the tree. When you first drop a TWizardTree on a form, it contains four entries. In order for the component to draw properly, it must contain at least three entries ( A Wizard with less that three is pretty boring ) |
ItemIndex : Integer |
This property is the Index of the currently selected item, or -1 if no item is selected. |
TopMargin : Integer |
This is the space in pixels from the top of the control to the first box. |
LeftMargin : Integer |
The space in pixels between the left side of the control and the first box. |
VerticalSpace : Integer |
Half the vertical space between boxes |
HorizontalSpace : Integer |
The horizontal space used to indent boxes and separated the text form its box. |
LineColor : TColor |
The color of the lines connecting boxes. Default is clWhite. |
BoxColor : TColor |
The color of boxes not selected. Default is clGray. |
SelectedBoxColor : TColor |
The color of the selected Box |
BoxHeight : Integer |
The height of each box |
BoxWidth : Integer |
The width of each box |
Events | |
OnChanging( Sender : TObject; NewItemIndex : Integer; var AllowChange: Boolean ) This event is triggered when a user clicks on a box that is not selected. The NewItemIndex parameter has the index of the new box. If you set AllowChange to False, the change will not be allowed and the currently selected item will remain selected. |
|
OnChange( Sender : TObject ) This event is triggered after a user has selected a new item. The ItemIndex property will be set to the new item when the event occurs. |