[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] MenuItem.setText() -> "disables" MenuItem

Hi!

I had a problem when I tried to set a text into my menuItem. Well, first
my implementation seems to work. My develop environment is Linux (GTK). A
test under WinXP failed.

Here's the discription of the problem:
I tested the code from
http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-swt-home/snippits/snippet29.html.
There I made a little change. I moved the setText methods of each
MenuItem between the addListener() and shell.setsize() method. The result
was, that the menus got disabled.

A "solution" could be, leave the setText methods where they are and
put a dummy string into it. Then you can add your setText methods after
creating the menubar. The dummy text mustn't be ""! If the string is
empty your menus got disabled too.

I'm not sure, whether the bug is already known. BugNr. 30954 seems to be
something different, so I didn't add a comment.

Kind regards
Stefan