tkinter: Can You Underline More Than 1 Char In A Menu Title

Discussion in 'Python' started by Tim Daneliuk, Jan 27, 2005.

  1. Tim Daneliuk

    Tim Daneliuk Guest

    I am currently underling the first character of a menu title (to indicate
    its shortcut/accelerator key) like this:

    self.WildBtn = Menubutton(self.mBar, text=WILDMENU, underline=0, state=DISABLED)

    However, I intend to actually have two separate keys invoke this menu
    to have it behave differently in different circumstances.

    Is it possible to underline more than a single character as I am doing
    with the 'underline=0' above. I tried 'underline=(0,2)' but that didn't
    work.

    Ideas?

    TIA,
    --
    ----------------------------------------------------------------------------
    Tim Daneliuk
    PGP Key: http://www.tundraware.com/PGP/
     
    Tim Daneliuk, Jan 27, 2005
    #1
    1. Advertising

  2. Tim Daneliuk

    Jeff Epler Guest

    On Thu, Jan 27, 2005 at 06:38:22AM -0500, Tim Daneliuk wrote:
    > Is it possible to underline more than a single character as I am doing
    > with the 'underline=0' above. I tried 'underline=(0,2)' but that didn't
    > work.


    No.

    Jeff

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.6 (GNU/Linux)

    iD8DBQFB+bG1Jd01MZaTXX0RAqvPAJ9nXk7km0ju+yn7RajPkZEHLibL+ACglLAx
    eOkRfB8l+tIUUibGHw6itZQ=
    =IGHj
    -----END PGP SIGNATURE-----
     
    Jeff Epler, Jan 28, 2005
    #2
    1. Advertising

  3. Tim Daneliuk

    Tim Daneliuk Guest

    Jeff Epler wrote:

    > On Thu, Jan 27, 2005 at 06:38:22AM -0500, Tim Daneliuk wrote:
    >
    >>Is it possible to underline more than a single character as I am doing
    >>with the 'underline=0' above. I tried 'underline=(0,2)' but that didn't
    >>work.

    >
    >
    > No.
    >
    > Jeff


    I love a clear answer ;) thanks...

    --
    ----------------------------------------------------------------------------
    Tim Daneliuk
    PGP Key: http://www.tundraware.com/PGP/
     
    Tim Daneliuk, Jan 28, 2005
    #3
  4. Tim Daneliuk

    Tim Roberts Guest

    Tim Daneliuk <> wrote:
    >
    >I am currently underling the first character of a menu title (to indicate
    >its shortcut/accelerator key) like this:
    >
    > self.WildBtn = Menubutton(self.mBar, text=WILDMENU, underline=0, state=DISABLED)
    >
    >However, I intend to actually have two separate keys invoke this menu
    >to have it behave differently in different circumstances.


    You can, of course, CHANGE the underlined character to match the
    circumstances.
    --
    - Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Feb 1, 2005
    #4
  5. Tim Daneliuk

    Tim Daneliuk Guest

    Tim Roberts wrote:

    > Tim Daneliuk <> wrote:
    >
    >>I am currently underling the first character of a menu title (to indicate
    >>its shortcut/accelerator key) like this:
    >>
    >> self.WildBtn = Menubutton(self.mBar, text=WILDMENU, underline=0, state=DISABLED)
    >>
    >>However, I intend to actually have two separate keys invoke this menu
    >>to have it behave differently in different circumstances.

    >
    >
    > You can, of course, CHANGE the underlined character to match the
    > circumstances.


    Yeah, I understand that ... what I want is two characters simulatenously
    underlined ... oh well, another solution will be arranged...

    --
    ----------------------------------------------------------------------------
    Tim Daneliuk
    PGP Key: http://www.tundraware.com/PGP/
     
    Tim Daneliuk, Feb 1, 2005
    #5
  6. Tim Daneliuk wrote:

    >>>However, I intend to actually have two separate keys invoke this menu
    >>>to have it behave differently in different circumstances.

    >>
    >> You can, of course, CHANGE the underlined character to match the
    >> circumstances.

    >
    > Yeah, I understand that ... what I want is two characters simulatenously
    > underlined ... oh well, another solution will be arranged...


    if you want a menu choice to have different behaviour depending on what
    key you use to invoke them, you should use two different choices.

    </F>
     
    Fredrik Lundh, Feb 1, 2005
    #6
  7. Tim Daneliuk

    Tim Daneliuk Guest

    Fredrik Lundh wrote:
    > Tim Daneliuk wrote:
    >
    >
    >>>>However, I intend to actually have two separate keys invoke this menu
    >>>>to have it behave differently in different circumstances.
    >>>
    >>>You can, of course, CHANGE the underlined character to match the
    >>>circumstances.

    >>
    >>Yeah, I understand that ... what I want is two characters simulatenously
    >>underlined ... oh well, another solution will be arranged...

    >
    >
    > if you want a menu choice to have different behaviour depending on what
    > key you use to invoke them, you should use two different choices.
    >
    > </F>
    >
    >
    >


    That is my intention. I have a menu that lists a set of regular expressions
    available for a particular task. However, the regex are applied in two
    different ways for this task. I want a common menu for displaying all
    the choices, but two separate "Accelerator Keys" to invoke it, depending
    on the desired application...

    --
    ----------------------------------------------------------------------------
    Tim Daneliuk
    PGP Key: http://www.tundraware.com/PGP/
     
    Tim Daneliuk, Feb 1, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lovecreatesbeauty
    Replies:
    1
    Views:
    1,149
    Ian Collins
    May 9, 2006
  2. Weng Tianxiang
    Replies:
    2
    Views:
    555
    Eric Smith
    Feb 16, 2010
  3. Jerry C

    asp:menu control and underline on menuitem text

    Jerry C, May 1, 2007, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    446
    Jerry C
    May 2, 2007
  4. Steven D'Aprano
    Replies:
    0
    Views:
    143
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    116
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page