diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /odk/examples/python/toolpanel/toolPanelPocBasic | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'odk/examples/python/toolpanel/toolPanelPocBasic')
3 files changed, 37 insertions, 0 deletions
diff --git a/odk/examples/python/toolpanel/toolPanelPocBasic/Module1.xba b/odk/examples/python/toolpanel/toolPanelPocBasic/Module1.xba new file mode 100644 index 000000000..9d44f7f01 --- /dev/null +++ b/odk/examples/python/toolpanel/toolPanelPocBasic/Module1.xba @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic"> +global theDialog + + +Sub dialogOnLoad(event) + + theDialog = event.source + +End Sub + +sub buttonClick(event) + + + theButton = theDialog.getControl("CommandButton1") + theTextField = theDialog.getControl("TextInfo") + + colors = Array(rgb(255,0,0),rgb(0,255,0),rgb(0,0,255)) + rank = getSystemTicks() mod 3 + + theDialog.Model.BackgroundColor = colors(rank) + theTextField.text = cstr(Now) + chr(10)+"Color " + cstr(rank) + " randomly applied" + + theButton.label = "Click Me to change color" + + +end sub +</script:module>
\ No newline at end of file diff --git a/odk/examples/python/toolpanel/toolPanelPocBasic/dialog.xlb b/odk/examples/python/toolpanel/toolPanelPocBasic/dialog.xlb new file mode 100644 index 000000000..a738363ea --- /dev/null +++ b/odk/examples/python/toolpanel/toolPanelPocBasic/dialog.xlb @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="toolPanelPocBasic" library:readonly="false" library:passwordprotected="false"/>
\ No newline at end of file diff --git a/odk/examples/python/toolpanel/toolPanelPocBasic/script.xlb b/odk/examples/python/toolpanel/toolPanelPocBasic/script.xlb new file mode 100644 index 000000000..4d9cc4d51 --- /dev/null +++ b/odk/examples/python/toolpanel/toolPanelPocBasic/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="toolPanelPocBasic" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="Module1"/> +</library:library>
\ No newline at end of file |