FCString will also accept Lua string and number.PageChange custom control event.fcmctrlswitcher.Init(self)
[Internal]
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
fcmctrlswitcher.AddPage(self, title)
[Fluid] [Override]
Override Changes:
string or number in addition to FCString.| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
title |
`FCString | string |
fcmctrlswitcher.AddPages(self)
[Fluid]
Adds multiple pages, one page for each argument.
@ … (FCString | string | number)
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
fcmctrlswitcher.AttachControl(self, control, pageindex)
[Breaking Change] [Fluid] [Override]
Override Changes:
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
control |
`FCControl | FCMControl` |
pageindex |
number |
fcmctrlswitcher.AttachControlByTitle(self, control, title)
[Fluid]
Attaches a control to a page by its title.
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
control |
`FCControl | FCMControl` |
title |
`FCString | string |
fcmctrlswitcher.SetSelectedPage(self, index)
[Fluid] [Override]
Override Changes:
PageChange event is triggered.| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
index |
number |
fcmctrlswitcher.SetSelectedPageByTitle(self, title)
[Fluid]
Set the selected page by its title. If the page is not found, an error will be thrown.
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
title |
`FCString | string |
fcmctrlswitcher.GetSelectedPageTitle(self, title)
[?Fluid]
Retrieves the title of the currently selected page.
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
title (optional) |
FCString |
Optional FCString object to populate. |
| Return type | Description |
|---|---|
string | nil |
Returned if title is omitted. nil if no page is selected |
fcmctrlswitcher.GetPageTitle(self, index, str)
[?Fluid]
Retrieves the title of a page.
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
index |
number |
The 0-based index of the page. |
str (optional) |
FCString |
An optional FCString object to populate. |
| Return type | Description |
|---|---|
string |
Returned if str is omitted. |
fcmctrlswitcher.HandlePageChange(control, last_page, last_page_title)
[Callback Template]
| Input | Type | Description |
|---|---|---|
control |
FCMCtrlSwitcher |
The control on which the event occurred. |
last_page |
number |
The 0-based index of the previously selected page. If no page was previously selected, this will be -1 (eg when the window is created). |
last_page_title |
string |
The title of the previously selected page. |
fcmctrlswitcher.AddHandlePageChange(self, callback)
[Fluid]
Adds an event listener for PageChange events. The event fires when:
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
callback |
function |
See HandlePageChange for callback signature. |
fcmctrlswitcher.RemoveHandlePageChange(self, callback)
[Fluid]
Removes a handler added with AddHandlePageChange.
| Input | Type | Description |
|---|---|---|
self |
FCMCtrlSwitcher |
|
callback |
function |