CTB - Toggle/State

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

CTB - Toggle/State

Post by aurumdigitus »

Will a method be forth coming to make a CTB display its toggle or state the way the native XY buttons can?

Looked in The XYplorer Roadmap and did not see anything but it may be a question of terminology or nomenclature.

It would be of inestimable value to have visual feedback on the state of a carefully crafted button and may lead to more users implementing them which would be an asset to the software in general and maybe even augment sales.

highend
Posts: 14955
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CTB - Toggle/State

Post by highend »

It would be of inestimable value to have visual feedback on the state of a carefully crafted button and may lead to more users implementing them
/signed
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66366
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CTB - Toggle/State

Post by admin »

How does the button know about its state?

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: CTB - Toggle/State

Post by aurumdigitus »

Something along theses lines ??

Code: Select all

"Icon status| Nonpushed (c:Program Files\XYplorer\graphic1.ico)| Pushed (c:Program Files\XYplorer\graphic2.ico)" Script;
As stated really think this idea would be a significant advance.

admin
Site Admin
Posts: 66366
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CTB - Toggle/State

Post by admin »

That's the icon. But I meant the state. What tells the button in what state it is in? Some variable must be connected to this. How? And how is this variable remembered across sessions?

eil
Posts: 1875
Joined: 13 Jan 2011 19:44

Re: CTB - Toggle/State

Post by eil »

just a thought: what if a defined alias would store state for icon?
(don't mean i think this is a feature to focus development)
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 66366
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CTB - Toggle/State

Post by admin »

eil wrote:just a thought: what if a defined alias would store state for icon?
Not sure what you mean. The state can be a user-defined entity, or it can depend on some volatile property of the file system, or the day time, or whatever. Witin the current framework of scripting and CTB I don't see a way to do this. Otherwise I would have long done it.

eil
Posts: 1875
Joined: 13 Jan 2011 19:44

Re: CTB - Toggle/State

Post by eil »

is it possible at all to change CTB icon with a script?(to send another icon path to already existing button) that can be a corner stone for such feature..
as in many other cases, CEA could be helpful here. :roll:
Win 7 SP1 x64 100% 1366x768|1900x1080

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: CTB - Toggle/State

Post by TheQwerty »

eil wrote:is it possible at all to change CTB icon with a script?(to send another icon path to already existing button) that can be a corner stone for such feature..
I demonstrated one way to achieve a state-like button, but it requires defining multiple buttons (one for each icon) and then having each one update the toolbar.

See here: http://www.xyplorer.com/xyfc/viewtopic. ... 463#p66463

EDIT: Wording.

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: CTB - Toggle/State

Post by aurumdigitus »

admin wrote:Witin the current framework of scripting and CTB I don't see a way to do this. Otherwise I would have long done it
On reflection this should have been obvious.

If wishes could do dishes ... :lol:

TheQwerty's work around solution by swapping the buttons is innovation and will be experimented with.

Thanks to those who participated in this thread!

PeterH
Posts: 2829
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: CTB - Toggle/State

Post by PeterH »

Just a thought about this...

The definition of the button could reference a variable, and it could define multiple icons.
If the variable is defined and numeric it defines the number of the defined icon.
If it's undefined, not numeric, or out of range of the number of icons the default icon "0" is shown.
It seems the variable must be global...

Maybe this could be a start?

eil
Posts: 1875
Joined: 13 Jan 2011 19:44

Re: CTB - Toggle/State

Post by eil »

TheQwerty wrote:I demonstrated one way to achieve a state-like button, but it requires defining multiple buttons (one for each icon) and then having each one update the toolbar.
See here: http://www.xyplorer.com/xyfc/viewtopic. ... 463#p66463
interesting variant. :)
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply