ImageSrc1 - property of the PmgButtonState object
Description:
The file name with the path to the image file displayed in the button in the state 1.
Note:
Property access
for read and write.
The default value of this property is defined in the "
Picture file" configurator of this object.
It is recommended to
always use the path with #pmres: or #appres:.
After writing the pathname of the image file (
svg, jpg, png, bmp, wmf ...), this new image will be displayed on the next redrawing the panel (see the
PmgObject.Refresh method).
By entering an invalid file or an empty string, displaying the image is suppressed.
This property is also functional in
Web panels. Reading this property is functional in
Web panels only if this property has been modified previously - i.e. it is not possible to read the value that has been defined only in the "
Picture file" configurator.
Example:
Displays the image in the state 1
JavaScriptVBScriptSelect and copy to clipboard
var oBtnState = pMe.Items("/BtnState");
var sImageSrc1 = oBtnState.ImageSrc1;
// Reading from the property
oBtnState.ImageSrc1 = "#pmres:Img/IconRun1.svg";
// Writing into the property
Dim oBtnState
Set oBtnState = pMe.Items("/BtnState")
Dim sImageSrc1
sImageSrc1 = oBtnState.ImageSrc1
' Reading from the property
oBtnState.ImageSrc1 = "#pmres:Img/IconRun1.svg"
' Writing into the property