Hi’
I discovered the addition of the text: alternative to a button name _and_ icon.
For what I can see, its advantage is its flexible width (compared to label: in the icon field).
So, I tried to migrate a few of my scripts that used a dynamic label:, before I realized:
— what can of worms it was (buttons can't be identified by their name anymore…)
— there was no real reason, and certainly no benefit in editing the name instead of the icon (in those cases)
Hence my request:
Could you make the width flexible for CTB with label:?
(Or if you’d rather differentiate, make text: available in the icon field.
label: still being fixed width, and text: being flexible. No opinion on this.)
Thanks for your attention,
Flux
Flexible width for CTB with label [Granted]
-
FluxTorpedoe
- Posts: 906
- Joined: 05 Oct 2011 13:15
Flexible width for CTB with label [Granted]
Last edited by FluxTorpedoe on 08 Mar 2022 20:56, edited 1 time in total.
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
-
admin
- Site Admin
- Posts: 66097
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Flexible width for CTB with label
Can you explain a bit more? Identify where?FluxTorpedoe wrote: ↑28 Feb 2022 16:07 — what can of worms it was (buttons can't be identified by their name anymore…)
FAQ | XY News RSS | XY X
-
FluxTorpedoe
- Posts: 906
- Joined: 05 Oct 2011 13:15
Re: Flexible width for CTB with label
I have a few scripts that rely on changing their icon/label — and may potentially be run externally (CKS, UDC…), i.e. not by clicking on their icon.
So, to ensure that they won’t change the icon/label of another button, I double-check their valid ctbindex by checking their ctbname among the names of all buttons.
Ex 1: Session Manager could display the name of the active session instead of an icon.
Ex 2: I have a Paper Folders manager (terrific script ! I need to share it…), which makes it easy to switch between paper folders and adding to the active one, etc. For this, the button displays the active paper folder name instead of an icon. And when switching from e.g. "Last trip photos from all cams" to "Various snippets to collate", the text of the icon is updated.
Well, obviously, right now their name had to be shortened to "Sigma", "Code", "Misc"…
Regarding the newly introduced menu buttons, I understand the rationale of the name:text:.
But in pretty much all other cases, if we get to the bottom of thing logically, it’s not the name of the button that’s expected to be displayed, it’s really its icon, whether it’s a a picture or a label — as is already the case in fact!
In my example, what is visible on the toolbar (e.g. Sigma or Code) is definitely not the name of the button (which is Power Paper Folders)
So I’m really fine with labels as they were !
The label is what is displayed, which is different from the name =>
1. The name is still usable by scripts (with ctbname)
2. The name is still usable as a tooltip (e.g. button displays "Sigma", but mouse over displays "Power Paper Folders [Ctrl: Open - Shift: AddTo…]")
My only wish was to make labels flexible too.
(or create an icon:text: alternative if you feel more like it)
So, to ensure that they won’t change the icon/label of another button, I double-check their valid ctbindex by checking their ctbname among the names of all buttons.
Ex 1: Session Manager could display the name of the active session instead of an icon.
Ex 2: I have a Paper Folders manager (terrific script ! I need to share it…), which makes it easy to switch between paper folders and adding to the active one, etc. For this, the button displays the active paper folder name instead of an icon. And when switching from e.g. "Last trip photos from all cams" to "Various snippets to collate", the text of the icon is updated.
Well, obviously, right now their name had to be shortened to "Sigma", "Code", "Misc"…
Regarding the newly introduced menu buttons, I understand the rationale of the name:text:.
But in pretty much all other cases, if we get to the bottom of thing logically, it’s not the name of the button that’s expected to be displayed, it’s really its icon, whether it’s a a picture or a label — as is already the case in fact!
In my example, what is visible on the toolbar (e.g. Sigma or Code) is definitely not the name of the button (which is Power Paper Folders)
So I’m really fine with labels as they were !
The label is what is displayed, which is different from the name =>
1. The name is still usable by scripts (with ctbname)
2. The name is still usable as a tooltip (e.g. button displays "Sigma", but mouse over displays "Power Paper Folders [Ctrl: Open - Shift: AddTo…]")
My only wish was to make labels flexible too.
(or create an icon:text: alternative if you feel more like it)
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
-
admin
- Site Admin
- Posts: 66097
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Flexible width for CTB with label
Hm, checking the ctbname is not necessary, the cbtindex is unique. But, I didn't dive into it too far, and I assume you have your good reasons.
So, because it was quick & easy, the next version will support the
So, because it was quick & easy, the next version will support the
text:blabla syntax also in the Icon field, leaving the Name field for whatever other purposes.FAQ | XY News RSS | XY X
-
FluxTorpedoe
- Posts: 906
- Joined: 05 Oct 2011 13:15
Re: Flexible width for CTB with label
Great! The name switching works smoothly, thank you!
(and now "Photos" and "Sigma" are fully displayed !
)
Well, now I guess I’ve no excuse not to post the Power Paper Folders script (will need to find the time)…
Just a slight nitpicking if I may…
The name displayed in the tooltip on mouseover has also changed, and is not the name of the button but the new text: in the icon field.
It would be great if instead of the redundancy, it could still display the real name (as it is by default or with label:).
> ctbindex is unique : Indeed ! But if the script is launched externally (eg via CKS), the script has no way to know what its button index is… (Hence the check (or double-check of the permanent variable) on the list of all ctbnames.)
(and now "Photos" and "Sigma" are fully displayed !
Well, now I guess I’ve no excuse not to post the Power Paper Folders script (will need to find the time)…
Just a slight nitpicking if I may…
The name displayed in the tooltip on mouseover has also changed, and is not the name of the button but the new text: in the icon field.
It would be great if instead of the redundancy, it could still display the real name (as it is by default or with label:).
> ctbindex is unique : Indeed ! But if the script is launched externally (eg via CKS), the script has no way to know what its button index is… (Hence the check (or double-check of the permanent variable) on the list of all ctbnames.)
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
-
admin
- Site Admin
- Posts: 66097
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
FluxTorpedoe
- Posts: 906
- Joined: 05 Oct 2011 13:15
Re: Flexible width for CTB with label [Granted]
Terrific!
I started to implement it in Session Manager and it’s… even nicer than I’d imagined.
Thanks a lot.
I started to implement it in Session Manager and it’s… even nicer than I’d imagined.
Thanks a lot.
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
XYplorer Beta Club