full row select on custom button
-
TSS
- Posts: 24
- Joined: 24 May 2013 18:00
full row select on custom button
I'd like to have a "tools/customize list/full row select" on custom button toolbar. Perhaps this is possible by script ... but I've no idea how to do this. I read posts about scripting... but it's too difficult for me. I didn't found topic how to add function form drop down menu to custom buttons.
-
RalphM
- Posts: 2090
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: full row select on custom button
No script needed, just add a new user button to your toolbar (Tools / Customize Toolbar) then edit the button (right-click on it) and enter something like this:#404 is the command ID of "Full Row Select".
Command ID's can be found by browsing "Tools / Customize Keyboard Shortcuts" where for every menu command the respective ID is displayed at the bottom of the window.
Command ID's can be found by browsing "Tools / Customize Keyboard Shortcuts" where for every menu command the respective ID is displayed at the bottom of the window.
To see the attached files, you need to log into the forum.
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
TSS
- Posts: 24
- Joined: 24 May 2013 18:00
Re: full row select on custom button
Indeed it's very simple! But everything is easy if you know where to click ;-)
Thank you very much for this advice
And by the way... is there a way to make this button "pushed down" effect for full row select ON, and "pushed up" for OFF ?
Thank you very much for this advice
And by the way... is there a way to make this button "pushed down" effect for full row select ON, and "pushed up" for OFF ?
-
RalphM
- Posts: 2090
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: full row select on custom button
As far as I recall it can be done somehow, but certainly isn't a one-liner anymore.
Since #404 is a toogle you need to check first what state it currently has (maybe SC "get") and then change the buttons state accordingly.
I think "CTBstate" is the SC to use, but never used it myself, so let's wait for a button-guru to chime in here...
Just another thought, what happens to the button's state if you use the menu to toggle this setting???
Since #404 is a toogle you need to check first what state it currently has (maybe SC "get") and then change the buttons state accordingly.
I think "CTBstate" is the SC to use, but never used it myself, so let's wait for a button-guru to chime in here...
Just another thought, what happens to the button's state if you use the menu to toggle this setting???
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: full row select on custom button
FYI, "Full Row Select" is in the context menu of any of the existing list style buttons. So it's quite near when just on of those buttons is in the toolbar.
Alternatively you can assign a keyboad shortcut to "Full Row Select".
Alternatively you can assign a keyboad shortcut to "Full Row Select".
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: full row select on custom button
Not easily.TSS wrote:And by the way... is there a way to make this button "pushed down" effect for full row select ON, and "pushed up" for OFF ?
RalphM's correct in describing all the details but there's a lot of "unfortunately"s that complicate things.
Unfortunately, #404 / Full Row Select is not one of the options whose state can be retrieved with the Get() SC.
Unfortunately, it isn't even a simple boolean key in any of XYplorer's INI files. It gets stored in the Style bit-flag under the appropriate list mode within the active tabset's pane.ini file.
Unfortunately, even if you are okay with saving the pane.ini file to retrieve the true status there's no good way to detect when the option is changed outside of the custom button.
Thus, unfortunately, it is rather difficult to have the button be truly representative of the option's actual state.
Given all that I'd use the following in your left-click script:
Code: Select all
"Toggle Full Row Select"
#404; // Tools | Customize List | Full Row Select
CTBState(! CTBState()); // Toggles CTB's state.Code: Select all
"Toggle Button State" CTBState(! CTBState()); // Toggle CTB's state-
TSS
- Posts: 24
- Joined: 24 May 2013 18:00
Re: full row select on custom button
Thank You TheQwerty !
That's what I'm looking for! I know there will be no effect when I select it via "customize list" drop down menu, but now when I have dedicated button for that - I'm gonna using it instead drop down menu or key-shortcut! Also your right-click button state is very handy to change it for some reason.
summing: thank you all for your help! I got what I wanted.
That's what I'm looking for! I know there will be no effect when I select it via "customize list" drop down menu, but now when I have dedicated button for that - I'm gonna using it instead drop down menu or key-shortcut! Also your right-click button state is very handy to change it for some reason.
summing: thank you all for your help! I got what I wanted.
XYplorer Beta Club