Forum: wxRuby Why the & in the middle of a string?

755ce658078632d051cc60c811613066?d=identicon&s=25 Ann Maybury (Guest)
on 2011-05-07 07:15
(Received via mailing list)
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")
2aa32559134aa3d596fb749f8ffccde7?d=identicon&s=25 hendra kusuma (Guest)
on 2011-05-07 08:24
(Received via mailing list)
On Sat, May 7, 2011 at 12:44 PM, Ann Maybury <ann.maybury@gmail.com>
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 : *C*hoose colour and Choose *f*ont
if you try running it, press alt and you will see it
8e9ab605d7a3f93c134cc84c96a096fd?d=identicon&s=25 Phillip & Kerrie Shelton (Guest)
on 2011-05-08 01:33
(Received via mailing list)
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 Maybury" <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")
755ce658078632d051cc60c811613066?d=identicon&s=25 Ann Maybury (Guest)
on 2011-05-08 02:34
(Received via mailing list)
Phillip & Kerrie Shelton <philkez <at> 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 Maybury" <ann.maybury <at> 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
2aa32559134aa3d596fb749f8ffccde7?d=identicon&s=25 hendra kusuma (Guest)
on 2011-05-09 06:30
(Received via mailing list)
On Sun, May 8, 2011 at 7:32 AM, Ann Maybury <ann.maybury@gmail.com>
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 topic is locked and can not be replied to.