On Wednesday 26 January 2005 16:31, Wendell Turner wrote:
> In the v11 gui, can a program have multiple Dialog classes, or
> should there only be one at the 'top' level?

You can have multiple top-level dialogs, all accepting input - I recall this 
question came up a little while ago - see attached message below.

> I'm trying to have 
> a TabSet in the top class, where each TabItem contains a TabSet
> with more TabItems inside it, but have not achieved success,
> hence the question.

You can certainly do this too - the TabItem can contain any Component, 
including a nested TabSet.  I'm not sure how this relates to having multiple 
dialogs though, possibly I've misunderstood the gist of your question....

Hope this helps.
--- Begin Message ---
On Sunday 31 October 2004 01:45, Daniel Boulet wrote:
> Thanks for the tip.  If I wanted to have these sub-windows created
> automatically (and not rely on a particular event), would it be better
> to create the windows from within the "initially" method or the
> "init_dialog"method?
>
Actually, neither!  The problem with that approach is that show_modal blocks 
the other windows after both initially and init_dialog have been called, so 
any other windows will be blocked - not what you want.

However, there is a way to do this by using the show_child() method, which is 
a sort of cross between show_modal and show_modeless.  It doesn't block other 
windows (like show_modeless), but also it doesn't return until the window has 
closed (like show_modal).   So, if the main method of my example program was 
as follows :-

procedure main()
   d := dialog()
   d.show_modeless()
   d2 := dialog()
   d2.show_modeless()
   d3 := dialog()
   d3.show_child()
end

..then you start off with all three dialogs on the screen and accepting input.  
The last line only returns when d3 is closed, and the program exits.  This 
does mean that you can't close d3 and leave d and d2 open.  To allow that, 
with all three dialogs on an "equal footing", custom code is needed :-

procedure main()
   d1 := dialog()
   d1.show()
   d2 := dialog()
   d2.show()
   d3 := dialog()
   d3.show()

   dispatcher.add(d1)
   dispatcher.add(d2)
   dispatcher.add(d3)

   while *dispatcher.dialogs > 0 do
      dispatcher.message_loop(?dispatcher.dialogs)

end

"dispatcher" is the single instance of the class Dispatcher, which is the gui 
toolkit's event handling system.

Hope this helps

R








-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group



--- End Message ---

Reply via email to