Page 1 of 1
CTB - Toggle/State
Posted: 15 Mar 2012 14:43
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.
Re: CTB - Toggle/State
Posted: 15 Mar 2012 15:02
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
Re: CTB - Toggle/State
Posted: 15 Mar 2012 15:08
by admin
How does the button know about its state?
Re: CTB - Toggle/State
Posted: 15 Mar 2012 15:37
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.
Re: CTB - Toggle/State
Posted: 15 Mar 2012 15:48
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?
Re: CTB - Toggle/State
Posted: 15 Mar 2012 17:35
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)
Re: CTB - Toggle/State
Posted: 15 Mar 2012 17:41
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.
Re: CTB - Toggle/State
Posted: 15 Mar 2012 21:14
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.

Re: CTB - Toggle/State
Posted: 15 Mar 2012 21:53
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.
Re: CTB - Toggle/State
Posted: 15 Mar 2012 23:41
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 ...
TheQwerty's work around solution by swapping the buttons is innovation and will be experimented with.
Thanks to those who participated in this thread!
Re: CTB - Toggle/State
Posted: 15 Mar 2012 23:49
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?
Re: CTB - Toggle/State
Posted: 15 Mar 2012 23:52
by eil
interesting variant.
