Re: using 2 menubars [message #30799] |
Fri, 17 May 2002 00:48 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
carine castillon (carine.castillon@noveltis.fr) writes:
> I want to insert 2 menubars (1 menubar, 1 toolbar) in my widget_base. Is it
> possible ?
Yes, like this:
************************************************************ ************
PRO toolbar_event, event
help, event, /struct
end
PRO toolbar
tlb = widget_base(/column, MBar=menuID)
toolbar = widget_base(tlb, /ROW, /FRAME)
tools = ['new','save','open','print1','undo','redo']
toolbuttons = lonarr(n_elements(tools))
filebutton = widget_button(menuID, Value='File')
button = widget_button(filebutton, Value='Open')
button = widget_button(filebutton, Value='Save')
button = widget_button(filebutton, Value='Quit', /Separator)
editbutton = widget_button(menuID, Value='Edit')
button = widget_button(editbutton, Value='Undo')
button = widget_button(editbutton, Value='Redo')
button = widget_button(editbutton, Value='Delete')
processbutton = widget_button(menuID, Value='Process')
button = widget_button(processbutton, Value='Smooth')
button = widget_button(processbutton, Value='Histogram Equalize')
button = widget_button(processbutton, Value='Edge Enhance')
for I = 0, n_elements(tools) - 1 do begin
file = filepath(tools[I],subdir = ['resource','bitmaps'])
toolbuttons[I] = widget_button(toolbar, VALUE = file, /BITMAP)
endfor
draw = widget_draw(tlb, XSIZE = 400, YSIZE = 400)
widget_control, tlb, /REALIZE
xmanager, 'toolbar', tlb
END
************************************************************ ************
> Or, Can anyone tell me how can I insert 2 menubars in my window ?
It is not possible.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|