Forms Designer - Working with the Picture control
To add a picture control to the form click on the icon on the controls palette.
Picture control can either act as a normal push button containing a picture or as a static picture. Once the control has been placed onto the form a picture can be selected by changing the Picture property in the controls properties list. Note that initially at design time in the forms designer only files from the that PC client are available. At runtime, connected to the server, picture files can be loaded from the server directly from within the program by setting the Cache$property.
The caption text for a picture control is set with the Text$ property. To include an accelerator key in the caption text simply insert an ampersand (&) before the required character.
Normally pictures are automatically stretched when they are displayed. An alternative display method can be set with the PictureAlignment property.
It is possible to set a transparent color within the bitmap with the TransparentBitmap property. The specified color will then be replaced by the current background color of the control as specified by the BackColor property. If the NoFill property is set then the current background color or background picture of the form will replace the transparent color.
Starting with KClient 7.00 it is possible to use 32 bit per pixel .png images with an alpha channel. In this case the TransparentBitmap value will be ignored and the bitmap will always be rendered using the alpha channel for transparency.
Using the control as a picture button
For the control to act as a picture button, that is to allow the button to go up and down when clicked, the Thickness property must be set to a value other than zero.
Using the control as a static picture control
To make the picture look like a static picture you should set the Thickness property to 0 to prevent the button from being moved up and down if it is clicked. The NoFocusRect property should be set to TRUE to remove the focus rectangle from the button face and to remove the text label from the picture the Text$ should be set to blank. The border around the picture can be removed by setting NoBorder to TRUE.
Using a stock picture
To select a stock picture you need to double click on the Picture property within the properties list for the control. Select the required stock picture from the Picture Name drop down. See Stock Pictures for a complete list of available pictures.
Other useful picture control properties
Useful picture control Event handlers