ScriptForge - (SF_Dialog) new SetPageManager method
The SetPageManager() method
Define how the dialog displays pages.
The page manager is an alternative to the direct use
of the Page property of the dialog and dialogcontrol objects.
The arguments define which controls are involved
in the orchestration of the displayed pages.
Possible options:
- select a value in a list- or combobox
- select an item in a group of radio buttons
- select a button linked to a page
placed side-by-side the buttons can simulate a tabbed interface
- press a NEXT or BACK button like in many wizards
Those options may be combined.
The control updates will be synchronized.
The method will set the actual page number to 1.
Afterwards the Page property may be used to display any other page
The SetPageManager() method is to be run
only once and before the Execute() statement.
If invoked several times, subsequent calls will be ignored.
The method will define new listeners
on the concerned controls, addressing generic routines.
The corresponding events will be fired during the dialog execution.
Preset events (in the Basic IDE) will be preserved
and executed immediately AFTER the page change.
The listeners will be removed at dialog termination.
The implementation has next parts:
1. Store the arguments in the Dialog instance
2. Set appropriate listeners on involved controls
3. Page change synchronizes the values in the involved controls
(be it by user code or by page manager)
4. Events triggered by listeners change page number
The method is available both in Basic and Python contexts.
This commit require the Dialog help page to be updated.
Change-Id: I00a0212414f283102c73de4ceb488aa1aeddf746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141257
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
This commit is contained in:
@@ -1815,6 +1815,10 @@ class SFDialogs:
|
||||
def Resize(self, left = -1, top = -1, width = -1, height = -1):
|
||||
return self.ExecMethod(self.vbMethod + self.flgHardCode, 'Resize', left, top, width, height)
|
||||
|
||||
def SetPageManager(self, pilotcontrols = '', tabcontrols = '', wizardcontrols = '', lastpage = 0):
|
||||
return self.ExecMethod(self.vbMethod, 'SetPageManager', pilotcontrols, tabcontrols, wizardcontrols,
|
||||
lastpage)
|
||||
|
||||
def Terminate(self):
|
||||
return self.ExecMethod(self.vbMethod, 'Terminate')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user