Hal ,
It can be done!
I don't know if it's dangerous or not, but the link on oooforum.org (when it's up) either
had a link to another post or I found this by searching for "modal dialog" on
that site. This example (http://www.oooforum.org/forum/viewtopic.phtml?t=8481) uses AWT,
going through LO, to make windows. You can't use the Dialog Designer in the LO IDE, but
you get full control over your window.
I took this example, ran it, and it opened a window. So I copied the code in
the Main routine, pasted it in at the end of that routine, and it created
another window with some differences I edited in.
So, as best I can tell, you can't create multiple dialog windows with "normal"
dialogs in LO,
Yes you can, but it depends how you construct the dialog
1: Modal
oDialogcontrol.setvisible(true)
oDialogControl.execute
here the dialog is opened and only after closing your code comes back to
just behind the "excute", so al new dialogs (and other actions) have to
been opened from a button on the first dialog, the user can only works
in the last opened dialog....
2: Non Modal
public bEnd1 as boolean
odialogControl1.setvisible(true)
Do
Wait 100
Loop while not bEnd1
here the dialog is opened and your code is avancing after the setting
of bEnd1, the dialog is closed when setting bEnd1 to true.. The user
can now working outside the dialog and open different dialogs ect..
every bEnd and every dialog object have to have different namens.
Minus is that Throbers an taskbars and time keeping not works because
the machine is confused with the bEnd loops...
public bEnd2 as boolean
odialogControl2.setvisible(true)
Do
Wait 100
Loop while not bEnd2
3: AWT
is non-modal and Throbbers and task bars and time keeping are working
hope it helps
Fernand
but you can do it if you use the AWT toolkit.
But for my own stuff - this got me thinking about what I wanted to do and in
that time I've had to think, I'm beginning to wonder if I shouldn't just use my
other idea, which would store notes in a LO document and on the computer hard
drive, too - it'd basically be a stick notes program that integrates with LO so
notes can be associated with a document. But that's just a side not that, in
the time it took to research this, I may have found a different way to do
things that doesn't need two dialogs open at once.
Hal
On Feb 25, 2013, at 7:01 PM, Andrew Douglas Pitonyak <[email protected]>
wrote:
On 02/25/2013 01:52 PM, Hal Vaughan wrote:
I've been experimenting because I want to write a sticky-note program that will
allow a user to write sticky notes that accompany a document. When you switch
from one document window to another, the notes from the 1st would close and the
notes from the 2nd would open (if you've already opened them).
The problem I'm running into is that if I display a dialog (with
oDialog.setVisible(True)), I can display one, but then the next one I try to
display doesn't appear. I even tried to display a dialog then put up a message
box, and that won't work.
Is this a limit with LO BASIC? Can only one dialog be open at a time? Or is
there a way to get around this?
(I'm thinking if I can't, then I might write a program in another language to
do this, but that would be tougher and would be like almost any sticky note
program.)
Hal
http://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=5815
THis link used to have something useful, so, if this forum is up, it should be
useful!
http://www.oooforum.org/forum/viewtopic.phtml?t=14095
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info: http://www.pitonyak.org/oo.php
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted