Why the & in the middle of a string?

In the samples directory of WxRuby-ruby 192 there is a file called
dialogs.rb.

Within this file there is a series of menu appends . A subset of is
shown
below.


file_menu.append(DIALOGS_CHOOSE_COLOUR, "&Choose colour")
file_menu.append_separator()
file_menu.append(DIALOGS_CHOOSE_FONT, "Choose &font")

On Sat, May 7, 2011 at 12:44 PM, Ann M. [email protected]
wrote:


What is the & trying to tell me? Why not just “Choose colour” or “Choose
font”

That give you shortcut alt+key on the label
something like : Choose colour and Choose font
if you try running it, press alt and you will see it

It has to do with keyboard short cuts. That & puts a line under the next
char and when the dialog is open you can use that key to do that action
instead of the mouse. So with the sample dialog in your email, if you
type
‘c’ you will open the colour chooser and ‘f’ gets you the font dialog

On 07/05/2011 3:14 PM, “Ann M.” [email protected] wrote:

In the samples directory of WxRuby-ruby 192 there is a file called
dialogs.rb.

Within this file there is a series of menu appends . A subset of is
shown
below.


file_menu.append(DIALOGS_CHOOSE_COLOUR, "&Choose colour")
file_menu.append_separator()
file_menu.append(DIALOGS_CHOOSE_FONT, "Choose &font")

Phillip & Kerrie Shelton <philkez gmail.com> writes:

It has to do with keyboard short cuts. That & puts a line under the next char
and when the dialog is open you can use that key to do that action
instead of
the mouse. So with the sample dialog in your email, if you type ‘c’ you
will
open the colour chooser and ‘f’ gets you the font dialog

On 07/05/2011 3:14 PM, “Ann M.” <ann.maybury gmail.com> wrote:In the
samples directory of WxRuby-ruby 192 there is a file called
dialogs.rb.Within
this file there is a series of menu appends . A subset of is shown
below.----------------------------------
file_menu.append(DIALOGS_CHOOSE_COLOUR, “&Choose colour”)
file_menu.append_separator() file_menu.append(DIALOGS_CHOOSE_FONT,
“Choose &font”)-----------------------------------------------What is
the &
trying to tell me? Why not just “Choose colour” or “Choose font”

THANKS FOR YOUR RESPONSE.

When I run the samples/dialogs/dialogs.rb from which my question arose,
there
are no underlines following the &. Is there some configuration option
that I
may be missing?

aNN

On Sun, May 8, 2011 at 7:32 AM, Ann M. [email protected]
wrote:

open the colour chooser and ‘f’ gets you the font dialog
“Choose &font”)-----------------------------------------------What is the &

Press and hold Alt key
you should see it

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs