in reply to Perl Gtk2: Key Accelerators for Buttons

But is it possible to add a Accelerator Key-Combo (mnemonic) to a button which doesn't contain a Label INSIDE the button..?

Yup, all that accelerator stuff does is add a key listener, and connects a signal to a specific key combo

You can do that without a label, label just saves you typing

Cheapest/Easiest way is to create a menu, and associate hotkeys with the same action/callback/signal as the buttons

  • Comment on Re: Perl Gtk2: Key Accelerators for Buttons

Replies are listed 'Best First'.
Re^2: Perl Gtk2: Key Accelerators for Buttons
by mmartin (Monk) on Aug 08, 2013 at 14:31 UTC
    Hey Anonymous Monk, thanks for the reply!

    Humm, that's a good idea... I thought I remember seeing something about Accelerators when looking over
    some Tutorials/Reference Guides.

    I just looked it up and found it on the couple sites I've been using as reference guides.

    Here's One:
           --> http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Accelerator.html

    And Here's a BETTER one with actual explanations of everything, which was actually hard to find when I first
    started this script. It's not the same Object/Widget as the other link, but this site in general has GREAT
    explanations of all the Widgets and their Methods/Functions:
           --> https://developer.gnome.org/gtk2/2.24/gtk2-Accelerator-Maps.html


    Thanks again for the reply Anonymous Monk, I'll most likely be adding a Menu bar and assign the Accelerators
    within there, like you suggested...


    Thanks Again,
    Matt