From: Hidetoshi NAGAI Date: 2005-05-05T17:58:29+09:00 Subject: Re: Tkmenubar and checkbuttons From: Joe Van Dyk Subject: Tkmenubar and checkbuttons Date: Thu, 5 May 2005 17:10:29 +0900 Message-ID: > I have this snippet as part of my Tk menu bar spec: > > ['Options', > ['Display Map', proc {show_map()}], > ['Hide Map', proc {hide_map()}] > > How can I combine those two menu options into a single checkbutton > menu option? The API documentation on it wasn't clear at all. I'm very sorry. Is the following the one of the samples which you want? --------------------------------------------------- map_st = TkVariable.new : ['Options', ['Display Map', map_st, nil, nil, {:command=>proc{show_map()}}], ['Hide Map', map_st, nil, nil, {:command=>proc{hide_map()}}] ] --------------------------------------------------- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)