Skip to content

TWebPageControl

Description

Below is a list of the most important properties methods and events for TWebPageControl. TWebPageControl is similar to a VCL TPageControl.

Designtime Runtime

HTML template tag

The HTML tag the component can be associated with in an HTML template. Assign the ID attribute with a unique value and set the identical value to the ElementID property. Detailed information can be found in the Use of HTML templates topic.

HTML tag <SPAN ID=”UniqueID”></SPAN>
ElementID UniqueID

Make sure to set at least a width/height for the outer span as the tabsheet HTML elements in the pagecontrol are set in the outer container element as absolute positioned.

Properties for TWebPageControl

Property Description
ActivePage: TWebTabSheet Gets or sets the active page in the page control
ActivePageIndex: Integer Gets or set the active page by its index
ElementClassName Optionally sets the CSS classname for the label when styling via CSS is used
ElementID Optionally sets the HTML element ID for a HTML element in the form HTML file the label needs to be connected with. When connected, no new label is created but the Delphi class is connected with the existing HTML element in the form HTML file
PageCount: Integer Returns the number of pages
Pages[Index: Integer]: TWebTabSheet Provides access to the pages in the page control
SelectedColor: TColor Sets the background color of the selected tab
SelectedTextColor: TColor Sets the text color of the selected tab
ShowTabs: Boolean When true, the tabs of the page control are visible
TabIndex Sets or gets the selected page index

Methods for TWebPageControl

Property Description
SelectNextPage Selects the next or previous page in the page control, depending on the value of the parameter.

Events for TWebPageControl

Property Description
OnChange Event triggered when the active page of the page control changes
OnClick Event triggered when the page is clicked
OnDblClick Event triggered when the page is double-clicked