Description

PageControl is a set of pages used to make a multiple page dialog box.



Class: TdbPageControl



Properties

 Property

 Type

 Description

 ActivePage

 TTabSheet

 Specifies the page currently displayed by the page control.

 ActivePageIndex

 Integer

 Specifies the page currently displayed by the page control. Use ActivePageIndex to get or set the active page by index rather than by object. The value of ActivePageIndex identifies a page in the Pages property array. Changing the value of ActivePageIndex changes the ActivePage property, and vice versa. If there is no active page, reading ActivePageIndex gives a value of -1. Setting ActivePageIndex to a value that is out of bounds (less than 0 or greater than PageCount - 1) results in the page control having no active page.
 Unlike the TabIndex property, ActivePageIndex returns the index of the selected tab, including invisible tabs (Form1.PageControl1.Pages[1].TabVisible := False).

 CanFocus

 Boolean

  It checks if the component can get input focus, which is usually necessary before using the SetFocus method. If a component has Visible = False or Enabled = False property, or if the component is located on a parent component with those properties, using the SetFocus method will cause an error.


example: if Form1.PageControl1.CanFocus then Form1.PageControl1.SetFocus;

 Cursor

 TCursor

 Specifies the image used to represent the mouse pointer when it passes into the region covered by the control. More info.

 Enabled

 Boolean

 Controls whether the component responds to mouse, keyboard, and timer events.

 Focused

 Boolean

 Determines whether the control has input focus.

 Font

 TFont

 Allows you to set font name, size, color and style. More info.

 Hint

 String

 Hint contains the text string that appears when the user moves the mouse over the component., see also ShowHint

 MultiLine

 Boolean

 Determines whether the tabs can appear on more than one row.

 Name

 String

 The name of the component.

 Pages[i]

 TTabSheet

 Allows you to access the properties of the desired tab by its index.

 PageCount

 Integer

 Indicates the number of pages in the PageControl component.

 ShowHint

 Boolean

 Specifies whether to show the Help Hint when the mouse pointer moves over the component, see also Hint

 Style

 TTabStyle

 Specifies the style of the tab control. Available values: tsTabs (default), tsButtons (button style tabs), tsFlatButtons (flat button style tabs).

 TabIndex

 Integer

 Identifies the selected tab on a tab control. If there is no selected tab, it returns -1.
Unlike the ActivePageIndex property, TabIndex returns the sequence number of the selected tab without considering the tabs that are not visible (Form1.PageControl1.Pages[1].TabVisible := False).

 TabPosition

 TTabPosition

 Determines whether tabs appear at the top or bottom. Available values: tpTop, tpBottom, tpLeft, tpRight

 TabOrder

 Integer

 Indicates the position of the component in its parent's tab order. TabOrder is the order in which child components are visited when the user presses the Tab key.

 TabStop

 Boolean

 Determines whether the user can tab to a control. Use the TabStop to allow or disallow access to the control using the Tab key.

 Tag

 Integer

 Allows you to assign a number to a component for your own needs.

 TagString

 String

 Allows you to assign a string to a component for your own needs.

 Visible

 Boolean

 Specifies whether the component appears onscreen.

 Left

 Integer

 Specifies the horizontal coordinate of the left edge of a component relative to its parent.

 Top

 Integer

 Specifies the vertical coordinate of the upper-left of a component relative to its parent.

 Width

 Integer

 Specifies the horizontal size of the component in pixels.

 Height

 Integer

 Specifies the vertical size of the component in pixels.




Methods

 Method

 Description

 procedure SetFocus

 Gives the input focus to the component.





Events

 Event

 Description

 OnChange (Sender: TObject)

 Occurs after a new tab is selected.

 OnChanging (Sender: TObject; var AllowChange: Boolean)

 Occurs immediately before a new tab is selected. Set the AllowChange parameter to False to prevent the change.

 OnEnter (Sender: TObject)

 Occurs when a component receives the input focus.

 OnExit (Sender: TObject)

 Occurs when the input focus shifts away from one component to another.

 OnMouseDown (Sender: TObject; MouseLeft, MouseRight, MouseMiddle: boolean; Shift, Alt, Ctrl: boolean; X, Y: Integer)

 Occurs when the user presses a mouse button with the mouse pointer over a component.

 OnMouseEnter (Sender: TObject)

 Occurs when the user moves the mouse into a component.

 OnMouseLeave (Sender: TObject)

 Occurs when the user moves the mouse outside of a component.

 OnMouseMove (Sender: TObject; Shift, Alt, Ctrl: boolean; X, Y: Integer)

 Occurs when the user moves the mouse pointer while the mouse pointer is over a component.

 OnMouseUp (Sender: TObject; MouseLeft, MouseRight, MouseMiddle: boolean; Shift, Alt, Ctrl: boolean; X, Y: Integer)

 Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component.

 OnResize (Sender: TObject)

 Occurs immediately after the control is resized.

 OnDropFiles (Sender: TObject; ArrayOfFiles: array of string; X, Y: Integer)

 Occurs when user tries to drag and drop a file from explorer to a form. More info.