Hi Hal,

I want to do a few things with a dialog from Basic other than just get the values of some controls.

maybe this helps:

REM  *****  BASIC  *****
Dim oDialog

Sub Main
        oDialog = CreateUnoDialog(GlobalScope.DialogLibraries.Standard.Dialog1)
        oDialog.Execute()
End Sub

Sub TextModified
        
oDialog.getControl("Label1").setText(oDialog.getControl("TextField1").getText())
End Sub

Sub OK
        MsgBox "OK"
        oDialog.EndExecute()
End Sub

Sub Cancel
        MsgBox "Cancel..."
        oDialog.EndExecute()
End Sub

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" 
"dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog"; xmlns:script="http://openoffice.org/2000/script"; dlg:id="Dialog1" dlg:left="183" dlg:top="58" dlg:width="220" dlg:height="169" dlg:closeable="true" dlg:moveable="true">
 <dlg:bulletinboard>
<dlg:button dlg:id="CancelBTN" dlg:tab-index="0" dlg:left="60" dlg:top="134" dlg:width="55" dlg:height="23" dlg:value="Cancel"> <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Standard.Module1.Cancel?language=Basic&amp;location=application" script:language="Script"/>
  </dlg:button>
<dlg:button dlg:id="OKBTN" dlg:tab-index="1" dlg:left="137" dlg:top="134" dlg:width="64" dlg:height="21" dlg:value="OK"> <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Standard.Module1.OK?language=Basic&amp;location=application" script:language="Script"/>
  </dlg:button>
<dlg:textfield dlg:id="TextField1" dlg:tab-index="2" dlg:left="60" dlg:top="63" dlg:width="73" dlg:height="23"> <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Standard.Module1.TextModified?language=Basic&amp;location=application" script:language="Script"/>
  </dlg:textfield>
<dlg:text dlg:id="Label1" dlg:tab-index="3" dlg:left="58" dlg:top="17" dlg:width="77" dlg:height="18" dlg:value="Label1"/>
 </dlg:bulletinboard>
</dlg:window>


OIliver
--

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to