Chertenok.ru - все о программировании
Вход  |  Регистрация  |  Поиск 
Праздник
Сегодня :

День работников дорожного хозяйства


Название
Twizard - Компонент для создания мастеров на основе Tnotebook
Версия
9/26/2000
Описание
Компонент для создания мастеров на основе Tnotebook.
Добавляет кнопки типа Вперед, Назад, реализует механизм переключения страниц и что-то там ещё.

function IsSkipPage(PageNum: Integer): Boolean; virtual; Returns True if the page indicated by PageNum is marked as skip page, False otherwise. This method does bounds- checking on PageNum before passing it to the routine.

procedure SetSkipPage(PageNum: Integer; Skip: Boolean); virtual; Sets the page marked by PageNum to be skipped or back to normal again. PageNum will be bounds-checked before passing it on to the routine. You can't skip the first and the last page. Pages marked for skipping will be skipped when entering from both directions.

property Pages: TStrings; Read-write. List of individual wizard pages. It's recommended that you name your pages so that after sorting they appear on the intended order. Make sure you don't enter any negative numbers to help context field since these will be used as indicators for marking skip pages. Deleting wizard pages in run-time is discouraged, use SetSkipPage method instead.property Finishing: Boolean; Read-only. True if the wizard is displaying the last page.

property BackEnabled: Boolean; Read-write. Set to False to disallow the user to click on the '< Back' button. Set to True to enable the button again. The button will either be hidden or grayed out depending on the value of 'HideButtons' property.

property NextEnabled: Boolean; Read-write. Set it to False to disallow the user to click on the 'Next >' button. Set to True to enable the button again. The button will either be hidden or grayed out depending on the value of 'HideButtons' property.

property ButtonNext: TButton;property ButtonBack: TButton; Read-write. Those are the properties you should assign your Next and Back buttons to.

Note: do not assign OnClick events to your Next and Back buttons, since that event gets overriden as soon as you'll assing these buttons to TWizard. Use TWizard's OnButtonNextClick and OnButtonBackClick events when you need to capture the clicks. See below for more information about these events.

property HeaderCaption: TStrings; Read-write. Optional string list containing header text for each wizard page. Can be edited in design-time.

property InfoCaption: TStrings; Read-write. Optional string list containing informational text for each wizard page. Can be edited in design-time.

property StaticTextHeader: TStaticText;

property StaticTextInfo: TStaticText; Read-write. Those are the TStaticText components which, when assigned, will show the text taken from HeaderCaption and InfoCaption string lists for each wizard page.

property HideButtons: Boolean; Read-write, False by default. Set to True if you want the wizard to hide rather than gray out the disabled Back/Next buttons.

property PageIndex: Integer; Read-write. Zero-based index of the currently displaying page. Changing the value of PageIndex changes the page in wizard.

property OnButtonBackClick:
TWizardButtonClickEvent; TWizardButtonClickEvent = procedure (Sender: TObject; CurrentPage: Integer; var AllowMove: Boolean) of object; Read-write. Invoked when user clicks on the '< Back' button. Set AllowMove to False when you want to disallow the user entering the previous page. The CurrentPage is the index of currently displaying page.

property OnButtonNextClick:
TWizardButtonClickEvent; TWizardButtonClickEvent = procedure (Sender: TObject; CurrentPage: Integer; var AllowMove: Boolean) of object; Read-write. Invoked when user clicks on the 'Next >' button. Set AllowMove to False when you want to disallow the user to entering the next page. The CurrentPage is the index of currently displaying page.

property OnButtonFinishClick: TNotifyEvent; Read-write. Invoked when the wizard is displaying the last page and user has clicked on the 'Finish' button.

property OnEnteringPage: TEnteringPageEvent; TEnteringPageEvent = procedure (Sender: TObject; CurrentPage: Integer; Direction: TWizardDirection) of object; TWizardDirection = (wdForward, wdBackward); Read-write. Invoked AFTER the wizard has changed page. The CurrentPage parameter is the index of currently displaying page. The Direction parameter idicates from which direction the wizard has entered to the current page.

property OnUpdateHeaders: TUpdateHeadersEvent; TUpdateHeadersEvent = procedure (Sender: TObject; HeaderText, InfoText: string; CurrentPage: Integer) of object; Read-write. Invoked whenever the headers need to be updated. HeaderText and InfoText are taken from HeaderCaption and InfoCaption string lists respectively.

All other methods and properties are TNotebook's standard methodsand properties.
Размер

9 кб

Опубликовал
13-ый
Скачать
   file
Дата
2002-07-29 23:49:27
Скачиваний
733
хостинг от .masterhost 
Rambler's Top100