ISDBUI::AddOptionSheet: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
|InitProcedure |String |A function from ScriptFile that is called when Options dialog is created. There is one parameter present - a reference to the sheet (a [[SDBUITranspPanel]] object) | |InitProcedure |String |A function from ScriptFile that is called when Options dialog is created. There is one parameter present - a reference to the sheet (a [[SDBUITranspPanel]] object) | ||
|SaveProcedure |String |A function from ScriptFile that is called when Options is closed by Ok button. There is one parameter present - a reference to the sheet (a [[SDBUITranspPanel]] object) | |SaveProcedure |String |A function from ScriptFile that is called when Options is closed by Ok button. There is one parameter present - a reference to the sheet (a [[SDBUITranspPanel]] object) | ||
|ParentId |Long |Either an ID returned from a previous call to AddOptionSheet or 0 | |ParentId |Long |Either an ID returned from a previous call to AddOptionSheet or 0. See other [[possible option sheet values]].}} | ||
===Method description=== | ===Method description=== | ||
Line 33: | Line 33: | ||
End Sub | End Sub | ||
</source> | </source> | ||
===Related Topics=== | |||
*[[Sample Option Sheets script]] | |||
[[Category:Scripting|{{PAGENAME}}]] | [[Category:Scripting|{{PAGENAME}}]] |
Latest revision as of 17:55, 5 January 2009
CoClass SDBUI, Interface ISDBUI
Function AddOptionSheet(SheetLabel As String, ScriptFile As String, InitProcedure As String, SaveProcedure As String, ParentId As Long) As Long
Parameters
Name | Type | Description |
---|---|---|
SheetLabel | String | A label that appears in the tree of option sheet. |
ScriptFile | String | A script file that contains event functions (InitProcedure and SaveProcedure). |
InitProcedure | String | A function from ScriptFile that is called when Options dialog is created. There is one parameter present - a reference to the sheet (a SDBUITranspPanel object) |
SaveProcedure | String | A function from ScriptFile that is called when Options is closed by Ok button. There is one parameter present - a reference to the sheet (a SDBUITranspPanel object) |
ParentId | Long | Either an ID returned from a previous call to AddOptionSheet or 0. See other possible option sheet values. |
Method description
Creates a new sheet that appears in Options dialog.
Example code
Sub OnStartup
' Create our own option sheet
ind = SDB.UI.AddOptionSheet( "Test", Script.ScriptPath, "InitSheet", "SaveSheet", 0)
' Create another sheet as a child of the previous one
SDB.UI.AddOptionSheet "Test2", Script.ScriptPath, "InitSheet2", "", ind
' Create one more sheet that is a child of Player sheet
SDB.UI.AddOptionSheet "Player test", Script.ScriptPath, "InitSheet2", "", -2
End Sub
Sub InitSheet( Sheet)
' Prepare the sheet here...
End Sub
Sub SaveSheet( Sheet)
' Save entered values
End Sub