Editing buttonbar, extra & needed

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Editing buttonbar, extra & needed

Post by *wanderer »

An extra-ultra serious bug has been discovered, which needs immediate attention and resolution! :)

1. Add a button in the buttonbar
2. In the command, set an existing EXE
3. Enter a tooltip containing the & character (i.e. "Test1 & Test2")
4. Press OK to save the buttonbar
5. Rightclick on the button.

At this point, a menu appears which has as first item the tooltip of the button. This item appears as "Test1 _ Test2". Obviously when setting it, an extra & is needed.

I guess it can receive the priority it deserves (infinity -1 :)).

P.S.: For some reason, this sounded a little familiar. Something similar has been reported before, and the search revealed this.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

What a bad one :roll: :shock: :wink:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

petermad wrote:What a bad one :roll: :shock: :wink:
Indeed. Terrible. I can't work with TC any more. :)
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: Editing buttonbar, extra & needed

Post by *ts4242 »

wanderer wrote:At this point, a menu appears which has as first item the tooltip of the button. This item appears as "Test1 _ Test2". Obviously when setting it, an extra & is needed.
There isn't any bug here, it is standard Windows menu behavior, Ampersand '&' is used to underline the letter comes after it, to show '&' itself, you must double it '&&'. If you are worry about that but want TC auto double '&' for you then how TC know if you want to underline the next letter or showing '&'?
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Editing buttonbar, extra & needed

Post by *wanderer »

ts4242 wrote:There isn't any bug here
IMO there is, but after reading your comment, it seems it's not as simple as i thought at first.

If you put a single & in the tooltip, then when you mouseover the button, the & appears as normal text in the tooltip (as the user probably intended). If however you rightclick on the button, it appears as an underline, designating an access key. IMO TC should interpret it as plain text and double it in the menu, since the tooltip is meant to be plain text without access-key capabilities.

After what you said though, i can see some usefulness of working as an access key in the rightclick menu, however i think it was unintentional and i believe it's better to show it as the user intended (as plain text in the tooltip) rather than as an access key.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, the question is: Do we want to have a feature to set shortcut for first menu item or not. :) I think we don't since this action may be accomplished by just clicking that buttonbar button w/o displaying its menu.
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

MVV wrote:Well, the question is: Do we want to have a feature to set shortcut for first menu item or not. :) I think we don't since this action may be accomplished by just clicking that buttonbar button w/o displaying its menu.
Well said. In addition to that, in order to show the context menu of the button, you usually rightclick it with the mouse, so since the mouse is already over there, you can just click the first menu item and not use the access key. It could be considered a feature but i doubt anyone would use it that way...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: Editing buttonbar, extra & needed

Post by *ts4242 »

wanderer wrote:IMO TC should interpret it as plain text and double it in the menu, since the tooltip is meant to be plain text without access-key capabilities.
IMHO tooltip should follow menu standard and not vice versa, as far as tooltip doesn't support underline then TC should hide one '&' and show double '&&' as one '&'
wanderer wrote:i can see some usefulness of working as an access key in the rightclick menu,
Are you sure?
Alt+Shift+F11> L/R Arrow> Context key> C :wink:
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Editing buttonbar, extra & needed

Post by *wanderer »

ts4242 wrote:IMHO tooltip should follow menu standard and not vice versa, as far as tooltip doesn't support underline then TC should hide one '&' and show double '&&' as one '&'
IIRC, tooltips work that way (& shown as & and not underline) since Windows 3.1, you wish for that to be changed now? ;)
ts4242 wrote:
wanderer wrote:i can see some usefulness of working as an access key in the rightclick menu,
Are you sure?
I said i CAN (not can't) see some usefulness, so basically i see you have a point there.
ts4242 wrote:Alt+Shift+F11> L/R Arrow> Context key> C :wink:
:shock: :shock: :shock: You really use it that way?!?! Wow!, talk about keyboard addiction / mouse hate! :wink: :D :D :D (p.s. : just kidding here)
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: Editing buttonbar, extra & needed

Post by *ts4242 »

wanderer wrote:IIRC, tooltips work that way (& shown as & and not underline) since Windows 3.1
The same is true for Windows menu, so changing now is bad too.
wanderer wrote::shock: :shock: :shock: You really use it that way?!?! Wow!, talk about keyboard addiction / mouse hate! :wink: :D :D :D (p.s. : just kidding here)
Not me, but i asked why cm_FocusButtonBar exists?
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Editing buttonbar, extra & needed

Post by *wanderer »

ts4242 wrote:The same is true for Windows menu, so changing now is bad too.
:D :D :D :D :D
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
Post Reply