Installing Icon File

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
noel
Posts: 2
Joined: 30 Dec 2011 09:57

Installing Icon File

Post by noel »

Hi,

How do I install the icons designed by FeatureCreep onto XYPlorer.

Thanks in advance.

Regards

Noel

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Installing Icon File

Post by serendipity »

noel wrote:Hi,

How do I install the icons designed by FeatureCreep onto XYPlorer.

Thanks in advance.

Regards

Noel
Hi and Welcome,
The icons can be used for Toolbar's user buttons only, but common default buttons can be replicated using user buttons.
Currently upto 32 buttons can be customized to have their own icons. I can give you a step by step method to do it if this is what you want.

FeatureCreep
Posts: 162
Joined: 02 Dec 2011 21:18

Re: Installing Icon File

Post by FeatureCreep »

Hi noel,

Someone else was having problems
http://www.xyplorer.com/xyfc/viewtopic. ... 9&start=60
so here are some pointers.

Guide to using User Buttons with standard XY commands

XYplorer has 32 User Buttons. You can assign your own custom User Command or Script to these buttons as well as your own choice of image. You can also assign any standard XYplorer command to a User Button.

First you need to find out the Function ID for the command you want to assign to your User Button.

Function ID
------------------------
1. Click the "Help" menu then "Make List of Commands..."
2. Open a text editor and paste.
3. Get the reference number of the command you want the button to activate.

There is also an OpenOffice .ODS spreadsheet "XYplorer Menu Reference.ods", showing XYplorer commands and Function IDs by menu, included in the FeatureCreep zip file (but it is not fully up to date e.g. the View menu has since been rearranged). Also, see note below about using standard button names instead of Function IDs.

There are also a few commands in that "List of Commands" that cannot be found in the standard menus.

Place A User Button on the Toolbar
------------------------------------
1. Right-click any toolbar button and click Customize Toolbar...
The Customize Toolbar dialog box should appear.
2. Select any User Button (blue dots with white star at the bottom) from the "Available buttons" list on the left
3. Click "Add"
4. Move the button to the desired toolbar location on the list of "Current buttons" on the right with the "Up" and "Down" buttons
5. Click "OK"
The Custom Button (blue dot with white star) should appear on your toolbar.

Edit a User Button
-----------------------
In this example we'll create a User Button for the Mini Tree (command reference 489).
We'll assume the icons you want to use are located in a subfolder of your XYplorer data folder.
i.e. ...XYplorer\Data\Icons\16\
If your not sure where your XYplorer data folder is located, click menu items:
Go > Go To Application Data Folder

Also, in this example, we will use icon files containing single small (16x16) icons only, whose filename is the same as their corresponding Function ID. These can be found in folder "Vista ICO format 16x16 (XY command reference as filename)" in the FeatureCreep zip file i.e. copy that folder to ...XYplorer\Data\Icons\ and rename it to "16".

1. Right-click the User Button you added earlier to the toolbar and click "Edit"
You should see the "Edit User Button" dialog.
2. Enter the following in the first three boxes.
Name: Mini Tree
Icon: Icons\16\489.ico
On click: #489
3. Click "OK"

The "Name" is the tooltip that will appear when you hover the cursor over the button. The "Icon" can be any ICO, ICL, EXE, or DLL file (but see note about icon sizes below). It need not be located in your XYplorer data folder, but if it is not, specify the full path. "Click" is what the button actually does on left-click.

Many apps let you use your own custom button images but few let you do that for any command. And XYplorer lets you do far more than that.

Add a Dropdown Right-click Menu to a User Button
------------------------------------------------
The fourth box labelled "On right-click" in the "Edit User Button" dialog is for adding a dropdown right-click menu to a User Button. Assuming you are using the same icon files (and location) as above, you can add a menu to your (Mini Tree) User Button with most tree-related commands (and with appropriate icons alongside each item).

1. Click the "Edit" button to the right of the "On right-click:" button.
The "Edit Right-Click Script" dialog box should appear.
2. Paste the following and click "OK".

"Minimize Tree|Icons\16\511.ico" #511
"Load Last Mini Tree|Icons\16\512.ico" #512
"Mini Tree From Recent|Icons\16\513.ico" #513
"Set as Favorite Mini Tree…|Icons\16\515.ico" #515
"Load Favorite Mini Tree|Icons\16\516.ico" #516
"Hide Current Folder|Icons\16\514.ico" #514
"Edit Mini Tree…|Icons\16\630.ico" #630
-
"Fully Collapse Numpad Divide|Icons\16\1010.ico" #1010
"Fully Collapse Drive Ctrl+Numpad Divide|Icons\16\1009.ico" #1009
"Fully Expand Numpad Multiply|Icons\16\1011.ico" #1011
-
"Optimize Tree Shift+Numpad Divide" #1040
"Lock Tree|Icons\16\488.ico" #488
"Refresh Tree F4|Icons\16\482.ico" #482
"Reset Tree Ctrl+Shift+F4|Icons\16\484.ico" #484
"Refresh Current Folder Shift+F4|Icons\16\483.ico" #483
-
"Show Icons|Icons\16\391.ico" #391
"Show PlusMinus|Icons\16\392.ico" #392
"Show Lines|Icons\16\393.ico" #393
"Mark Favorites (Icon)|Icons\16\394.ico" #394
"Mark Favorites (Bold)|Icons\16\395.ico" #395
"Narrow Tree|Icons\16\396.ico" #396
"Rename On Slow Double-Click|Icons\16\397.ico" #397
"Apply Highlighting|Icons\16\398.ico" #398


Don't paste me!
+++++++++++++++++++++++++++++++
Including keyboard shortcuts e.g. "Ctrl+Shift+F4" is optional. Put a number of spaces before the keyboard shortcuts to make them right-align on the menu.

Although there are currently only 32 User buttons, there is no limit (other screen size) to the number of right-click menu items you can add to them.

Special Button Names
---------------------
You can also use some special names for standard buttons instead of command reference numbers e.g.
Mini Tree minitree
Calculate Folders calcfosi
Folder View Settings fvs

To find these names right-click a User Button on the toolbar and click "Customize Toolbar". The special names will then appear in square brackets next to each button in the "Customize Toolbar" dialog box. Note, you must click a User Button (you have previously placed on the toolbar), not a standard button, to see these names.

You might want to use these button names for some standard buttons that have functionality you cannot get with a command reference number. You can still add your own custom right-click menu.

Only a small subset of XYplorer commands have a standard button and some e.g. "Enable Color Filters" has a button but no reference number. You must use the special button name "cofi" for this command in a User Button.

1. Paste the following into the "On click:" box

button "cofi"

+++++++++++++++++++++++++++++++

Display of Large and Small Buttons
----------------------------------
This is an issue that I had intended to post on the Bug Reports part of the forum and it should be followed up there. It may also just be a quirk of my system. When using ICO files containing two icons (16x16 small and 24x24 large) XYplorer would display one or tother with some slight distortion. It seems the correct icon size was not always selected.

I tried saving the ICO files with the images in different orders, with different software and in different formats (there is a Vista ICO format with PNG compression) but the problem persisted.

However, using ICO files containing only one size of icon fixed it. This is why I included separate and combined ICO files in the FeatureCreep zip. But, it also means that you would have to swap large and small icon folders if you switch between large a small button display.

Editing the User Buttons is easier when the ICO files are named with their corresponding command references and also when not in nested subfolders (no need to enter long paths and descriptive filenames). This is the setup used in the above example. But I have set this up only for the small buttons.

I will issue a new zip with a set of similarly named ICO files for the large buttons at a later date. In the meantime, if you want to use large buttons, you must use the longer path and filenames e.g.
...\XYplorer\Data\Icons\24\03 View\03 Mini Tree\Mini Tree.ico
or rename the ICO files yourself.

I'll also issue buttons for some of the newer commands (e.g. tabsets) -but keeping up with Don's output could be like playing wac-a-mole. And maybe some User Button configs you could simply paste into your XYplorer INI file (which might be closer to the "install" you were asking for).

Another place to browse Function IDs is via the Tools Menu.

Tools > Customize Keyboard Shortcuts...

There are also more options for copying a complete list to the clipboard (by this method).

This is not an exhaustive description of everything you can do with XYplorer User Buttons. See also "Droppable User Buttons" and of course "Scripting".

Hope this helped.
Last edited by FeatureCreep on 12 Jan 2012 00:31, edited 1 time in total.

noel
Posts: 2
Joined: 30 Dec 2011 09:57

Re: Installing Icon File

Post by noel »

Hi serendipity and FeatureCreep,

Sorry for the delay in replying, been out of the loop for a few days.

Thank you both for your fast response and very extensive reply.

Regards

Noel

Post Reply