On Monday 14 February 2005 22:46, Wendell Turner wrote:
> In the v11 gui, can I have dynamic tabs?  That is, upon initial
> startup, the program creates a TabSet with several tabs and
> calls show_modal().  As the program runs, I would like to
> dynamically add some more tabs to the existing TabSet.  I tried
> the simple/obvious calls, but the initial tabs did not change.
> Is this possible?

You do need to initialize any dynamically added components (including a 
TabSet) by calling init(), resize() and firstly().   So if ts is the TabSet 
then the following should work

      t := TabItem("label=Something")
      ts.add(t)
      t.init()
      t.resize()
      t.firstly()
      ts.resize()

The last resize is needed to re-compute the position of the tabs.

If you have any sub-components within the new TabItem, then there is no need 
to call init/resize/firstly on them, because those functions are recursive 
and so calling them on the parent TabItem is enough.

Hope this helps




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to