1

I'm currently trying to add MenuItems to a Menu, which works almost perfect. The MenuItems I would like to add are paths to files, so they may contain "_", which sets the MenuItem an accelerator, but how do I stop mono setting this accelerator?

Example:

_1: /media/Auslagerung/Projekte/ace/sample_project.ace

The _1 at the start is the accelerator I want to set, the path behind should be used without underline. How do I realise this?

Thanks in advance!

Sven
  • 447
  • 1
  • 6
  • 22

1 Answers1

1

Try escaping underscores with an extra underscore so they are not interpreted as mnemonics. In your example, insert an underscore after "/sample" so that the menu label string is:

_1: /media/Auslagerung/Projekte/ace/sample__project.ace

I haven't used GTK# but that is the method I used with GTK+ 2.10 in C. Hopefully it applies to mono.

jeffmagill
  • 191
  • 1
  • 6