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

Home » Public Forums » archive » Re: graphical issue after removing all tabs from a widget_tab
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: graphical issue after removing all tabs from a widget_tab [message #84303] Wed, 15 May 2013 19:00
Morgan Rehnberg is currently offline  Morgan Rehnberg
Messages: 3
Registered: May 2013
Junior Member
It only happens when I delete *all* the tabs, so maybe I can just insert a tab which says 'no image' before I delete the last real tab. I was just hoping that I was forgetting something obvious about the widget-drawing order.
Re: graphical issue after removing all tabs from a widget_tab [message #84305 is a reply to message #84303] Wed, 15 May 2013 15:56 Go to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
Yeah, I agree with David. Could you just map/unmap them as necessary?

Russell
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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL 8.0 now available
Next Topic: A function to locate values... without using histogram

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

Current Time: Wed Oct 08 09:21:39 PDT 2025

Total time taken to generate the page: 0.00397 seconds