[comp.windows.x.motif] Mnemonic doesn't print properly after label string changed

tbray@watsol.waterloo.edu (Tim Bray) (01/09/91)

I have a standard-type menubar with standard pulldowns and so on.  I want to
relabel a couple of the operations on one of the menus depending on the
application state.  I know that sounds weird, but it's good ergonomics.  These
buttons do something that's easy to understand once you've done it, but hard
to explain without saying very specifically what happens (in a context
specific way) on top of the button.

Problem is, after I change the XmNlabelString on the pushbutton, the
associated XmNmnemonic is no longer underlined when the menu pulls down.  This
although the mnemonic character remains the first character in the changed
label.  So I got smart and went in and also reset the mnemonic when I changed
the labelString.  That didn't work so I also changed the XmNaccelerator and
XmNacceleratorText, also without visible effect.  HOWEVER, the mnemonic is not
gone; it still works, it just isn't underlined any more.  Went and cruised
back and forth through the source (mostly in Label.c) but couldn't quite dope
out what was supposed to happen.  dbx says it calls _XmStringDrawMnemonic the
appropriate number of times via the ReDisplay method...

RTFM'ed quite a bit but no joy.  I suspect this is probably a bug, not my
problem, but... Any ideas?

Tim Bray
tbray@watsol.waterloo.edu