[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Floating base widget

I would like to create a window which can never be obscured by its
group leader, but I can't seem to force the window to remain "on top."

According to the IDL documentation, by setting the "floating" keyword
when creating a top-level base, the "floating base widget will always
appear above the base specified as the group leader." 

In the sample code below, the second base is designated as "floating",
but I can easily obscure it with the group leader.  I'm running IDL 5.2
on a Sun SPARC.

pro done, event
  widget_control, event.id, get_uvalue=tlb
  widget_control, tlb, /destroy

; Create simple main window
tlb = widget_base(title='Main Window', xsize=100, ysize=100)
widget_control, tlb, /realize
xmanager, 'mainwindow', tlb, /no_block

; Create another window with main window as group leader
popup = widget_base(title='Popup', tlb_frame_attr=31, /floating, group_leader=tlb)
cancelID = widget_button(popup, val='Cancel', event_pro='done', uval=tlb)

widget_control, popup, /realize
xmanager, 'popup', popup, /no_block

Is there something else I have to do to get the desired behavior?

Dan Peduzzi