in contex menu of paste button on toolbar, "paste special" is listed as a submenu now. could cancel the submenu, put the contents in the contex menu directly?
thank you
cancel paste special submenu on toolbar
Re: cancel paste special submenu on toolbar
Sometimes when Don says not possible what he really means is the amount of work and changes needed to achieve and maintain this is more than he'd like to spend.
I believe in this case it's "not possible" because the Paste Special item is calling command #210 which is the Edit > Paste Special submenu. To flatten this Don would have to add all of those commands to the toolbar button and this would result in duplicate code and require maintaining the list of items in at least 2 different locations.
That said you can replace the default Paste button with a Custom Toolbar Button (CTB) and have full control over the items shown.
As an example:
Note that to keep this button up-to-date with any future changes to the Edit > Paste Special menu you'll have to manually update the button - however you can now customize the items shown and remove those you don't use.
If you have any other questions feel free to ask!
I believe in this case it's "not possible" because the Paste Special item is calling command #210 which is the Edit > Paste Special submenu. To flatten this Don would have to add all of those commands to the toolbar button and this would result in duplicate code and require maintaining the list of items in at least 2 different locations.
That said you can replace the default Paste button with a Custom Toolbar Button (CTB) and have full control over the items shown.
As an example:
- Open Tools > Customize Toolbar...
- In the Available Buttons list find and select a User Button.
- Add -> it to your toolbar.
- Click OK.
- Right-Click the user button on your toolbar and select Edit...
- Copy the following to your clipboard:
Code: Select all
Snip: CTB 1 XYplorer 13.00.0004, 10/2/2013 9:24:49 AM Action NewUserButton Name Paste Icon :paste ScriptL "<get MenuCaption 202 1>|:paste|1" #202; // Edit | Paste ScriptR /* ** Just a quick explanation of the following scripts. ** Let's use the paste item as an example: ** "<get MenuCaption 202 1>|:paste|1" #202; // Edit | Paste ** ** First, we needed to look up the command ID for the Paste command. ** This is done by opening Help > List All Commands and locating the command we ** want. In this case it is #202 Edit | Paste. ** ** Now we can create the script for this command. ** "<get MenuCaption 202 1>|:paste|1" ** This is the menu caption, icon, and item state. Broken down further: ** <get MenuCaption 202 1> ** This is the variable form of the Get() function and returns the ** translated menu caption for command ID 202. The '1' at the end ** tells XY to append the currently assigned keyboard shortcut. ** |:paste ** Optional: This uses the icon of the 'Paste' toolbar button. ** These labels can be retrieved by right-clicking a custom toolbar ** button and selecting 'Customize Toolbar' - the label follows the ** button name in '[]' (i.e. 'Paste [paste]') ** |1 ** Optional: This makes this menu item the default / bold. ** #202; ** This is the script that is executed when the user selects this item. ** In this case it calls the command 202 which is 'Edit | Paste'. */ "<get MenuCaption 200 1>|:cut" #200; // Edit | Cut "<get MenuCaption 201 1>|:copy" #201; // Edit | Copy "<get MenuCaption 202 1>|:paste|1" #202; // Edit | Paste - "<get MenuCaption 211 1>" #211; // Edit | Paste Special | Paste Here to New Subfolder... "<get MenuCaption 273 1>" #273; // Edit | Paste Special | Paste Here with Path... "<get MenuCaption 207 1>" #207; // Edit | Paste Special | Paste Here As... - "<get MenuCaption 212 1>" #212; // Edit | Paste Special | Paste (Move) "<get MenuCaption 213 1>" #213; // Edit | Paste Special | Paste (Copy) "<get MenuCaption 272 1>" #272; // Edit | Paste Special | Paste (Backup) - "<get MenuCaption 218 1>" #218; // Edit | Paste Special | Paste As Shortcut(s) "<get MenuCaption 208 1>" #208; // Edit | Paste Special | Paste As Hard Link(s) "<get MenuCaption 270 1>" #270; // Edit | Paste Special | Paste As Symbolic Link(s) "<get MenuCaption 271 1>" #271; // Edit | Paste Special | Paste As Junction(s) - "<get MenuCaption 275 1>" #275; // Edit | Paste Special | Paste Extracted "<get MenuCaption 274 1>" #274; // Edit | Paste Special | Paste Zipped - "<get MenuCaption 209 1>" #209; // Edit | Paste Special | Paste Folder Structure - "<get MenuCaption 219 1>" #219; // Edit | Paste Special | Paste Text Into New File "<get MenuCaption 206 1>" #206; // Edit | Paste Special | Paste Image Into New File - "<get MenuCaption 214 1>" #214; // Edit | Paste Special | Mark Files in Clipboard as 'Cut' "<get MenuCaption 215 1>" #215; // Edit | Paste Special | Mark Files in Clipboard as 'Copied' - "<get MenuCaption 216 1>" #216; // Edit | Paste Special | Edit Files in Clipboard... "<get MenuCaption 217 1>" #217; // Edit | Paste Special | Clear Clipboard FireClick 0 - In the Edit User Button dialog right-click the Clear button and select Paste Snippet.
- Click OK.
Note that to keep this button up-to-date with any future changes to the Edit > Paste Special menu you'll have to manually update the button - however you can now customize the items shown and remove those you don't use.
If you have any other questions feel free to ask!
Re: cancel paste special submenu on toolbar
I got it. Think you!
XYplorer Beta Club