CLIM mail archive
command name in a menu bar From: Scott McKay <email@example.com> Date: Tue, 28 Jun 94 16:12:25 EDT
Date: Thu, 16 Jun 94 10:55 MET DST
From: "Berthe Y. Choueiry" <firstname.lastname@example.org>
I don't know what is the "cleanest" way to implement the
following. Any advice will be much appreciated.
I would like to have a command (in the menu of an application
frame) whose "label" (in the menu) can be toogled. Is there a way to
modify the "label" dynamically? can I have a push-button (or something
similar) in a frame menu bar?
The only "official" way do it is to add and remove the menu item by
hand. There might be host-dependent ways to bash the menu as well.
... and there are a few times that this doesn't work very well.
The :AFTER suboption to the :MENU option of add-command-to-command-table allows
a value of :start, :end, nil. a string, or :sort. If you want to toggle between
two titles (like "Show Foo" and "Hide Foo") you want both to always appear in
the same location in the menu. Unless this is the beginning or end of the menu,
then you will want to use the string to identify the predecessor. But if the
name of the name of the preceeding menu item toggles, you won't be able to
specify a string. Also, There doesn't seem to be a way to indicate that you
want the new menu item to follow a separator.
I think IWBNI an index into the menu could also be used to specify the location
of the new command in the menu.
Main Index |