Re: Displaying Multiple Dialogs from BASIC

Hal Vaughan <[email protected]> Thu, 16 Jun 2011 03:52:23 -0400
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
On Jun 16, 2011, at 3:30 AM, Fernand Vanrie wrote:

> Hal ,
>=20
> Y ou can set a Dialogcontrol visible or not , but we need a timeloop to k=
eep it visible

Am I right, then, in assuming that the time loop is there because once that=
 particular instance of the script terminates, the dialog automatically clo=
ses?

> i use 2 sub's for open and closing
>=20
> Sub Opendialog
> bEnd =3D false
> oDialogcontrol.setvisible(true)
> Do
> Wait 100  ' keep computer running (should use "wait for key event" if exi=
sted)
> Loop while not bEnd
> end sub
>=20
> sub CloseDialog(dialog as object)
>  dialog.setvisible(false)
>  Bend =3D true
> end sub

Will this make the dialog invisible immediately, or as soon as the next loo=
p in the other routine ends?

Thanks!

This is exactly what I need!


Hal


> Hop it Helps
>> I've mentioned the sticky-note project I'm working on yesterday in two e=
mails.
>>=20
>> Now I'm running into a problem: I'd like to display a number of sticky-n=
otes, but to display any kind of dialog in BASIC, I need to do something li=
ke this:
>>=20
>> 	oSticky =3D createUnoDialog(DialogLibraries.HalLib.StickyNote)
>> 	oSticky.Execute()
>>=20
>> And the program will stop until I close the dialog, either by the close =
button, a cancel, or OK, or another button.
>>=20
>> That means the only way to have multiple dialogs open is to open one and=
 from there, open the next, and then open the next and so on.
>>=20
>> Is there some way, from BASIC, to display a dialog and leave it open wit=
hout it stopping a script?
>>=20
>>=20
>> Thank you!
>>=20
>>=20
>>=20
>> Hal--
>> -----------------------------------------------------------------
>> To unsubscribe send email to [email protected]
>> For additional commands send email to [email protected]
>> with Subject: help
>=20
> --=20
> -----------------------------------------------------------------
> To unsubscribe send email to [email protected]
> For additional commands send email to [email protected]
> with Subject: help
>=20

--=20
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help