|
|
Re: graphical issue after removing all tabs from a widget_tab [message #84306 is a reply to message #84305] |
Wed, 15 May 2013 13:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Morgan Rehnberg writes:
> I've created a tab bar using widget_tab and added several tabs to it. If I remove a tab, all the others shift over as expected. However, if I remove all the tabs and then add some new ones, the new tabs overlap unnaturally. Here's a picture of what I'm talking about:
>
> Before: http://tinypic.com/r/1zudtu/5
> Remove all tabs, re-add....
> After: http://i44.tinypic.com/alqmu1.png
>
> I'm just removing the tabs recursively, nothing fancy:
>
> for i=0, n_elements(tab_list)-1 do widget_control, tab_list[i],/destroy
>
> What's going on here?
Motif widgets are notoriously finicky when it comes to destroying them
and creating them. I've never had any luck with them at all. (The same
code almost always works on Windows machines.)
My recommendation is to come up with a plan that doesn't include
destroying the widgets. Maybe you can just make them inactive instead.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|