Difference between revisions of "Lua:Class:PageControl"

From Cheat Engine
Jump to navigation Jump to search
(Add example of creating tabs)
(List some properties & events)
Line 12: Line 12:
 
; createPageControl(''owner'') : ''PageControl''
 
; createPageControl(''owner'') : ''PageControl''
 
: Returns a newly created PageControl.
 
: Returns a newly created PageControl.
 +
 +
== Properties ==
 +
 +
; ShowTabs : ''boolean''
 +
: Tabs are shown if ''true'', hidden if ''false''.
 +
: Default: ''true''
 +
 +
; TabPosition : ''string''
 +
: Defines along which edge tabs are located.
 +
: Options: ''tpTop'', ''tpBottom'', ''tpLeft'', ''tpRight''.
 +
: Default: ''"tpTop"''
 +
 +
; TabIndex : ''integer''
 +
: Index of the currently selected tab (beginning at ''0'').
 +
: Default: ''0''
 +
 +
; TabOrder : ''integer''
 +
: Default: ''0''
 +
 +
; TabStop : ''boolean''
 +
: Default: true
 +
 +
; ActivePage : ''TabSheet''
 +
: Sets the tab to be selected.
  
 
== Methods ==
 
== Methods ==
Line 18: Line 42:
 
: Creates & returns new TabSheet.
 
: Creates & returns new TabSheet.
  
; getPageCount() : ''int''
+
; getPageCount() : ''integer''
:
+
: ''Not available?''
  
 
; getPage()
 
; getPage()
:
+
: ''Not currently available?''
  
 
; addMetaData()
 
; addMetaData()
:
+
: ''Not currently available?''
 +
 
 +
== Events ==
 +
 
 +
; OnChange()
 +
: Action executed when selected tab changes.
 +
 
 +
; OnCloseTabClicked()
 +
: ''Not currently available?''
  
 
== Examples ==
 
== Examples ==

Revision as of 13:05, 14 February 2019

PageControl Class: (Inheritence: WinControl)

WARNING: This page is unfinished.

Description

PageControl is tabbed GUI control.

Creation

createPageControl(owner) : PageControl
Returns a newly created PageControl.

Properties

ShowTabs : boolean
Tabs are shown if true, hidden if false.
Default: true
TabPosition : string
Defines along which edge tabs are located.
Options: tpTop, tpBottom, tpLeft, tpRight.
Default: "tpTop"
TabIndex : integer
Index of the currently selected tab (beginning at 0).
Default: 0
TabOrder : integer
Default: 0
TabStop : boolean
Default: true
ActivePage : TabSheet
Sets the tab to be selected.

Methods

addTab() 
TabSheet
Creates & returns new TabSheet.
getPageCount() : integer
Not available?
getPage()
Not currently available?
addMetaData()
Not currently available?

Events

OnChange()
Action executed when selected tab changes.
OnCloseTabClicked()
Not currently available?

Examples

-- main window
local form = createForm()

-- create tabbed interface
local tabs = createPageControl(form)
tabs.Align = alClient

-- add tabs
local tabMain = tabs.addTab()
tabMain.setCaption("Main")
local tabSec = tabs.addTab()
tabSec.setCaption("Secondary")

-- put tabs at bottom of interface
tabs.TabPosition = "tpBottom"

See also

Related Functions

Related Classes