Toolbar properties

Toolbar position, size and some other properties can be easily set by moving, resizing the toolbar, and using the right-click menu. They are saved in the registry. Other properties can be set in the Properties dialog. They are placed in the first line of toolbar text, so you can also edit them directly. They are applied when launching the toolbar.

 

Syntax

Available options

1. Set toolbar position.

 /mov x y

 

Here x and y are toolbar position, in pixels. If the parameters are (or begin with) xm and ym, toolbar will be under the mouse pointer. Coordinates are relative to the owner window or screen top-left or other corner (depends on the Coordinates setting). Use mov0 to apply only first time.

 

Example:

 /mov xm ym+100

 

2. Set toolbar dimensions.

 /siz width height

 

Use siz0 to apply only first time.

 

3. Set toolbar dimensions for shrunken state.

 /ssiz width height

 

Use ssiz0 to apply only first time.

 

4. Set icon size.

 /isiz width height

 

Default size is 16x16. If cy is omitted, it will be equal to cx. If cx is more than cy, text is placed below icon.

 

5. Set maximum and/or minimum button size.

 /bsiz maxwidth minwidth

 

QM 2.2.1: Works with all styles. Added minwidth.

 

6. Set initial settings of the right-click menu. In the Properties dialog it is "Style flags".

 /set flags mask

 

Here flags is combination of the following values:

1 Follow owner.
2 Show text.
4 Activate owner.
8 Auto shrink.
16 Equal buttons.
32 No sizing border.
64 Tooltips always.
128 Vertical.
0x000 Coordinates: top-left.
0x100 Coordinates: top-right.
0x200 Coordinates: bottom-left.
0x300 Coordinates: bottom-right.
0x400 Coordinates: auto select.
0x1000 All desktops.
0x2000 Quick icons.
0x4000 (QM 2.2.0) 1-pixel border.
0x8000 (QM 2.2.1) 3D buttons.

 

You can optionally use mask to apply only some flags. Will be applied only those bits of flags that are 1 in mask. Other bits will be retrieved from the registry. First time (if toolbar settings are not found in the registry) are applied all flags regardless of mask.

 

Example:

 /set 1|2|8|0x400

 

Use set0 to apply only first time.

 

7. Set toolbar window style and extended style.

 /style st exst

 

Here st and exst are style and extended style of the toolbar window. Window styles are defined in the WinStyles function in the System\Declarations folder.

 

Example:

 /style (WS_CAPTION | WS_SYSMENU)

 

8. Set background and text color.

 /col color textcolor

 

Here color and textcolor are colors in 0xBBGGRR format. Value 1 to 31 will set one of system colors.

 

9. Set hot item background and text color.

 /hcol color textcolor

 

If you set hot item background color, Windows themes (visual styles) are not applied, and the toolbar may look differently.

 

Does not work when 3D buttons.

 

10. Set transparency.

 /transp opacity color

 

opacity - value between 0 (makes the toolbar completely transparent) and 255 (completely opaque).

color - sets the specified color completely transparent. Completely transparent areas are transparent to the mouse too. Optional.

 

On Vista, hot button may look distorted. It is because its color is gradient, and some lines match the transparent color and therefore are transparent. Try to change background color with /col.

 

11. Set background image (bmp, gif or jpg file).

 /bmp "file"

 

Example:

 /bmp "$my qm$\images\tb1.bmp"

 

12. Glass. QM 2.2.0.

 /glass

 

On Windows Vista, the toolbar will be translucent, like title bars of windows. Has no effect on older Windows versions, or if not supported by hardware or software (e.g. on Vista Home edition, or Aero theme is not used). Incompatible with /bmp, transparent color and hot color (these are ignored if /glass is used).

 

13. Set font. QM 2.2.0.

 /font XXXX

 

Font can be set in Properties.

 

On Vista does not work when 3D buttons.

 

14. Lock toolbar.

 /lock flags

 

flags - combination of the following values. If flags is not used, are applied all flags except 128.

1 don't show the right-click menu.
2 disable moving.
4 disable resizing.
8 disable modifying. This disables drag&drop features, and three first items in the right-click menu. Even if this option is not used, toolbar cannot be modified if it is encrypted, or is in read-only folder or file, or is in locked file.
16 disable the Close item in the right-click menu.
128 lock only if the toolbar is in a shared file ([s] folder).

 

15. You can specify an ini file where toolbar size, position and right-click menu settings must be stored. By default, these settings are stored in the registry.

 /ini "file"

 

Example:

 /ini "$personal$\My Notes\Notes.ini"

 

16. Set hook function.