comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Tab Widgets changes at runtime?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Tab Widgets changes at runtime? [message #45845 is a reply to message #45835] Tue, 11 October 2005 11:13 Go to previous message
Doug is currently offline  Doug
Messages: 6
Registered: October 2005
Junior Member
Gianluca,

You should be able to add tabs by creating new bases with the tab widget as
their parent. Delete tabs by applying widget_control's "destroy" keyword to
a specific child base of the tab.

Here's some sample code:

pro delete_tab_event, e
widget_control, e.id, get_uvalue = tabBase
widget_control, tabBase, /destroy
end

pro add_tab_event, e

widget_control, e.id, get_uvalue = tabControl

newTab = widget_base( tabControl, title = 'Some Title' )
deleteButton = widget_button( newTab, $
value = 'Delete Me', $
uvalue = newTab, $
event_pro = 'delete_tab_event' )

end

pro adding_tabs

topBase = widget_base( /column )

tabControl = widget_tab( topBase, xsize = 300 )

addTabButton = widget_button( topBase, $
value = 'Add New Tab', uvalue = tabControl, $
event_pro = 'add_tab_event' )

widget_control, topBase, /realize
xmanager, 'adding_tabs', topBase

end

Hope this helps.

Doug

"Gianluca Li Causi" <licausi@mporzio.astro.it> wrote in message
news:1129040656.595058.149910@g14g2000cwa.googlegroups.com.. .
> Hi all,
>
> I've the following problem: I have a nice tab widget with N tabs and I
> want to add new tabs or delete some of them on the basis of some user's
> choice.
>
> I've noticed that Widget_Control and Widget_Info cannot control
> adding/deleting tabs, so is there a way to do this?
>
> Thanks a lot!
> Gianluca
>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: measuring lines
Next Topic: Quick question regarding "where" function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 15 22:31:56 PDT 2025

Total time taken to generate the page: 9.44592 seconds