Silverfrost Logo About Us | Contact Us
 

New enhanced menus

The format code %em allows you to put icons in the left hand column of menus. %em is used once for a given window and enables the use of icons for subsequent %mn and %pm menus. %em (before %mn and %pm) therefore provides an alternative to %`mn and %`pm.

When a window description contains %em, menu items can have the name of an icon resource before the text as in %mn[File[MY_ICON/Open]]. %mn[File[MY_ICON//Open]] has the same effect but the icon will not be greyed when the item is disabled. In all other respects, %mn and %pm remain unchanged.

By default %em provides a basic enhanced menu that enables you to add icons and nothing more. Otherwise you can use one or more of the following options.

w7 and w8

provide default (Windows 7 and Windows 8) background colours for an item when it is highlighted.

background=#rrggbb

sets the background colour of an item when it is highlighted (rr represents hexadecimal digits for the red component etc.).

border=#rrggbb

sets the border colour of an item when it is highlighted

marginbits=MYBITMAP

sets the background bitmap for the icon margin when an item is NOT highlighted (MYBITMAP is the name of a bitmap resource).

bits=MYBITMAP

sets the background bitmap for the whole item when it is highlighted

theme1

provides a theme that is similar to Plato v4.6x.

theme2

provides a theme that is similar to Visual Studio 2010.

Typically you can use a margin bitmap to provide a graded scale in vertical lines of colour. This bitmap could have any height but should be wide enough (say 40 pixels) for the whole margin. In the same way a background bitmap for a highlighted item could provide a graded scale in horizontal lines of colour. This bitmap could have any width but should be high enough (a little more than the size of the largest icon) for the whole item.

 

 

Copyright © 1999-2017 Silverfrost Limited