
A picture is worth a thousand words. For this reason, conzept 16 has long offered the option of assigning symbols to certain interface objects. The small images create clarity and therefore also increase user acceptance. After all, working with an attractively designed interface is more enjoyable. But developers of conzept 16 applications can also be pleased, as the upcoming version 5.7.08 will bring some simplifications in the handling of icons.
How it was so far
The use of symbols is solved within conzept 16 by tile graphics. A tile graphic ultimately represents an image that combines n x m tiles of a fixed size in a grid (Fig. 1). The figure shows an example of a tile graphic with 30 symbols, which is divided into 10 columns and 3 rows. When using the tiles for button, list and menu objects, each tile also contains a border of one pixel. However, this only serves as a graphical separation to make editing the tile graphic clearer.
Before a tile graphic can be used, it must first be imported into the database using the resource management function.
The advantage of the tile graphic is that it only has to be loaded once (e.g. per frame object) and can then be used by all subordinate objects.
For example, frame objects have the property wpTileNameMenu
. This defines the tile graphic for all MenuItem objects in the menu. The corresponding tile from the tile graphic is referenced via the wpImageTileUser
property of the MenuItem object. Further information can be found in the blog article Verwendung von Icons und benutzerdefinierten Bildern.
As efficient as the tile graphics method is for conzept 16 applications, it does have one disadvantage: the symbols that make up the tile graphics are usually stored in separate graphics files. An image editing program is therefore needed to create the tile graphic. Although there are also corresponding tools (e.g. ImageMagick) to automate this process, it would be easier to use the existing graphic files directly.
ICO
The icon format (ICO), which is commonly used under Windows, is ideal here. It has the advantage that it can contain several representations of one and the same icon, but in different sizes and color resolutions (Fig. 2). The illustration shows this using the example of a smiley symbol, which is available in 4 sizes and as RGB with transparency.
Icons are already used in conzept 16, but these are limited to the output in the icon or picture object. In addition, the wpIcon
property of the frame object is used to display an application icon in the title bar of the frame.
In future, the wpIcon
property will also be offered for the following objects:
- Button
- ColorButton
- GroupTileButton
- HyperLink
- MenuButton
- MenuItem
- NotebookPage
- StatusbarButton
- ToolbarButton
The property wpIcon
has priority over wpImageTileUser
, which is used in the previous system to select a tile. The functionality fits seamlessly into the existing system and takes into account the existing properties that are relevant for the symbol display (e.g. wpImageOption
).
To select the icon size to be displayed, the objects also have the wpTileSize
property. This was previously only available for the _App
object and determines the size of the standard symbols supplied by conzept 16 (_WimImg
constants). As the property is now available in the respective object, it is also possible to display icons of different sizes (Fig. 3).
Further details
The wpTileSize
property can in principle take on any value, but is limited to a maximum size of 256 pixels, which also corresponds to the standard maximum size of Windows. If the required size is not available in the icon referenced by wpIcon
, the icon with the smallest deviation is selected. If there are several icons with the same deviation, the color depth is decisive.
If property wpIcon
is not set, wpTileSize
has an effect on the symbol specified by wpImageTile
(Fig. 4). This means that the standard symbols predefined by conzept 16 can also be output in different sizes. However, this is only possible if the extended mode for the icon display (wpTileTheme
) is activated.
By default, wpTileSize
has the value _WinTileSizeApp
, which means that the symbol size set by the _App
object is used.