Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > tkinter: Can You Underline More Than 1 Char In A Menu Title

Reply
Thread Tools

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

 
 
Tim Daneliuk
Guest
Posts: n/a
 
      01-27-2005
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 http://www.velocityreviews.com/forums/(E-Mail Removed)
PGP Key: http://www.tundraware.com/PGP/

 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      01-28-2005
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+yn7RajPkZ EHLibL+ACglLAx
eOkRfB8l+tIUUibGHw6itZQ=
=IGHj
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Tim Daneliuk
Guest
Posts: n/a
 
      01-28-2005
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 (E-Mail Removed)
PGP Key: http://www.tundraware.com/PGP/
 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a
 
      02-01-2005
Tim Daneliuk <(E-Mail Removed)> 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, (E-Mail Removed)
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Tim Daneliuk
Guest
Posts: n/a
 
      02-01-2005
Tim Roberts wrote:

> Tim Daneliuk <(E-Mail Removed)> 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 (E-Mail Removed)
PGP Key: http://www.tundraware.com/PGP/
 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      02-01-2005
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>



 
Reply With Quote
 
Tim Daneliuk
Guest
Posts: n/a
 
      02-01-2005
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 (E-Mail Removed)
PGP Key: http://www.tundraware.com/PGP/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C++ 0 03-05-2008 08:41 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C Programming 0 03-05-2008 03:26 AM
asp:menu control and underline on menuitem text Jerry C ASP .Net Web Controls 3 05-02-2007 02:55 PM
(const char *cp) and (char *p) are consistent type, (const char **cpp) and (char **pp) are not consistent lovecreatesbeauty C Programming 1 05-09-2006 08:01 AM
/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre silverburgh.meryl@gmail.com C++ 3 03-09-2006 12:14 AM



Advertisments