Re: Menubar with ticks ?? [message #24153] |
Mon, 12 March 2001 08:46 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Pavel A. Romashkin (pavel.romashkin@noaa.gov) writes:
> Sorry David, you seem not to be here at this time of the morning? Or
> maybe my news reader is in the time lapse mode again. I replied for you.
> I am not taking any credit, though :-)
Normally I spend the morning hovering over my newsreader, looking
for the least sign of life. But this morning I actually have some work
to do. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Menubar with ticks ?? [message #24154 is a reply to message #24153] |
Mon, 12 March 2001 08:33  |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
I think David had answered this a long time ago. He recommended simply
starting the names of menu items with a space (' '), then, on an event,
replacing that space with a check mark ('v' or whatever). There may even
be code on David's site (http://www.dfanning.com)
Sorry David, you seem not to be here at this time of the morning? Or
maybe my news reader is in the time lapse mode again. I replied for you.
I am not taking any credit, though :-)
Pavel
Sean Heukels wrote:
>
> Does IDL have this ??
>
> I mean people who use Windows will know.
> An option in a meny bar that ism toggled by re-selecting.
> ON it has a V (tick) before its name and OFF it doesn't
>
> I have some things that can be toggled in a program and the problem
> I am encountering is that I run out of space and would like
> to move some things to the menubar
>
> Thanx Seansan
|
|
|
Re: Menubar with ticks ?? [message #24156 is a reply to message #24154] |
Mon, 12 March 2001 08:33  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Sean Heukels (sean77=cuthere=@dds.nl) writes:
> Does IDL have this ??
>
> I mean people who use Windows will know.
> An option in a meny bar that ism toggled by re-selecting.
> ON it has a V (tick) before its name and OFF it doesn't
>
> I have some things that can be toggled in a program and the problem
> I am encountering is that I run out of space and would like
> to move some things to the menubar
No, IDL has nothing like this. Here is a piece of
code that shows you how you might fake it, however:
*****************************************************
PRO Example_Button_Events, event
Widget_Control, event.id, Get_Value=buttonValue, Get_UValue=buttonUValue
Widget_Control, event.id, Set_Value=buttonUValue, Set_UValue=buttonValue
END
PRO EXAMPLE
tlb = Widget_Base(Column=1, Title='Make a Choice...')
selectID = Widget_Button(tlb, Value='Animal Selections...', /Menu, $
Event_Pro='Example_Button_Events', Scr_XSize=200)
choice1 = Widget_Button(selectID, Value='Choose Dogs', /Menu)
button = Widget_Button(choice1, Value='Retriever', UValue='* Retriever')
button = Widget_Button(choice1, Value='Boxer', UValue='* Boxer')
button = Widget_Button(choice1, Value='Great Dane', UValue='* Great Dane')
choice2 = Widget_Button(selectID, Value='Choose Cows', /Menu)
button = Widget_Button(choice2, Value='Holstein', UValue='* Holstein')
button = Widget_Button(choice2, Value='Angus', UValue='* Angus')
button = Widget_Button(choice2, Value='Jersey', UValue='* Jersey')
Widget_Control, tlb, /Realize
XManager, 'example', tlb, /No_Block
END
************************************************************ ******
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|