diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2023-05-26 17:13:04 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2023-05-26 19:06:07 +0200 |
commit | a83643dea9f5922d4706c9e1d8b9f53f71eb01d9 (patch) | |
tree | 906846edeac25b75dc54b0ac1f8ed262909d83d7 /wizards/source/scriptforge | |
parent | 6dd2ebbba23b20864d3cf74322540c628088375c (diff) |
ScriptForge (SF_Dialog) new CloneControl() method
Duplicate an existing control of any type
in the actual dialog.
The duplicated control is left unchanged.
The new control can be relocated.
Args:
SourceName: the name of the control to duplicate
ControlName: the name of the new control.
It must not exist yet.
Left, Top: the coordinates of the new control
expressed in "Map AppFont" units.
Returns:
an instance of the SF_DialogControl class or Nothing
The method is available from Basic and Python user scripts
This change will require an update of the SF_Dialog help page.
Change-Id: I5c2a5404a14ad60b2d4df2ac7eabbf0ddd843170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152333
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Diffstat (limited to 'wizards/source/scriptforge')
-rw-r--r-- | wizards/source/scriptforge/python/scriptforge.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index 76845c71e75d..96474e4eb4de 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -1866,6 +1866,9 @@ class SFDialogs: parentobj = parent.objectreference if isinstance(parent, parentclasses) else parent return self.ExecMethod(self.vbMethod + self.flgObject + self.flgHardCode, 'Center', parentobj) + def CloneControl(self, sourcename, controlname, left = 1, top = 1): + return self.ExecMethod(self.vbMethod, 'CloneControl', sourcename, controlname, left, top) + def Controls(self, controlname = ''): return self.ExecMethod(self.vbMethod + self.flgArrayRet + self.flgHardCode, 'Controls', controlname) |