Image Control

Image control to display images from external files, embedded in script, located in application resources or system icons.  Image control example

Property Default Value Description
id empty id (name) of the script data object associated with control
align stretched Alignment of the control
path none relative to script path to file containing the image to disply. Accepts *.ico, *.bmp, *.gif, *.png, *.jpg files. Can not be combined with sys_icon, resource properties or inline image.
sys_icon none One of the standard system icons to display. See enumeration below. May be also exact ID (number) of the system resource. Can not be combined with path or resource or inline image.
resource -1 ID of application resource (registered icons) to display. May also point to variable containing resource ID. Can not be combined with path or sys_icon or inline image.
Icon Description
warning IDI_EXCLAMATION Icon
error IDI_HAND icon
information IDI_ASTERISK icon
application IDI_APPLICATION icon
question IDI_QUESTION icon
winlogo IDI_WINLOGO icon
shield IDI_SHIELD icon

Test image referenced in example can be downloaded here and shall be placed aside to script

image.hejs
var nMyImage = Application.RegisterImageString(
'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAL\
 EwAACxMBAJqcGAAABMdJREFUeJztml1sFFUYhp/vTGkhIIjhp1JaXKA/KmpISMBERBKJgWgCUaLxwsRE\
 gajELm0IIeraC3/BllISAwkXaAIXiIkaE6whXFi9AAxcoLBLsRBoQH4ClAu67c53vGiLFWh22+6ZwTDP\
 1ezk23OefTNn5uyZAxERERERERH3KpKt4GiCQi5SGIRMPhk9kUysjs5sdQXZCgqvsYYiPsmPVnB0XWM7\
 8Ea2uqwB3ERpR2gZjlQQqKXYGBbkWp9zAOrxSlX93R9AWy3F3T7ncq03LmX+D0QBhNHpiTgzU6spCqPv\
 WwklACtU4fFLaw2Twui/P6EEkPG5rMKcjM9vqdVMDMOhj1AC0Pv5vfdwOgX8EOZwCCWAWXV0oXQYSAJz\
 8WgMwwPCfAoYxIcLwBGElck4S8LRCAG7HA9ljECHhZUKVixbwhgKoQTQWsoUYzAG2isbOGAsOxBieLwF\
 kIxTkozzThAuoQTgK+UAFloBxPCBQhrL+iM1jK5soN0qa1PVJFy7BBZAMs6yfp0+AWAtfwC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\
 kxFeHLzS3U3WANrHsfEh2BSAS165fG4Ya5ARERERERER9wT/AEf2d0oCmO/IAAAAAElFTkSuQmCC');
 
var dialog_template = 
'@<dialog title="Image Test Dialog" resizing="both" id="test_image"> \
   <paragraph text="Image from file:"/> \
   <image path="test.png" align="left"/> \
   <paragraph text="Image embedded in dialog resources (in-line):"/> \
   <image align="left"> \
	iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAL \
	EwAACxMBAJqcGAAAA9NJREFUeJztml1oW2UYx3/PmzQ1pZPNgq1WZcoUx9yVzBuR4YU6BD/ALYknLd3G \
	6EAUZIofoxVGL1Y/QL1RNtGtup6kH5TpxaYwGIq72MUQLwYViw6ZzDERtLUubfK8XlShla5JtO97Kju/ \
	m0Dyf5Jf/jnJe3LOgZiYmJiYmJirFama2DacAlLuVZaZpt/LDOy4XC2WrPpEqcoekP3LIuWTcvp9YFe1 \
	WPUC/kb1R4z58r84+cG2gWyuNV17ASRzDGZWfgFdw22U9UKtcePS5f9AXEDUAlETFxC1QNREV8Dmk0ny \
	xUPsPLoqMgfqWgaXmfaLvcB2StMNQEdUGtFsAfniJkR7/1LIExQei8SDKAroOnQNlgFAsWRApxA5QOdY \
	i3cXoihgNt2DsB5r+glzI2CeB1rRmTe9u+C7gFy4AdEXgXF+ubYPgMHsQdCTQCcd4QNeffBagBXEvAsm \
	iWU3nz5cmrtfLGp3g5ao8A5bjjX6c/JZwJNDAYb7gMOEuS8WPFbIfwvSjzHruO63Pd6c8FVA9ydNQD+q \
	k1T0pUUzJfMqqj8gupdc2OrFC18FTE0/jeEmxOynGFxcNDOa/QORl8E0kzC9XrzwUcC24WasfQGrP9Hc \
	9PaS2dvHi6h+jdJNtnCzczd8FJDSHRhpQeR1Dj46vWR23z4lYfowNJCQZ5274bwAK8BToFM0pt+raaRk \
	jqL6PdbuZOtQ2q2f6wJyhY3AnVhG+ODxyZpmRjIVjBzGyGpS+qBTP1wXkCSN6jSYj+qaExMC5zB26a/M \
	MuD23+CR4DTYZhBb31x2ArjVjdRCPCyDdb55z7jdAvLFXcBrVHT9Fdf/xeg+0MDkqgnEDBDmXnEn6HoL \
	sLQDa0iytq650poWjLkFa9udeM3DdQHfzN0mNtQ1N6t3AWAYX3anf+D4N6ByAmUWNFPXmNi5fMUec2E1 \
	H7cFFPI/I3YA5CHyhdrW9GBoIyrbwX5GMTjr1A8fq8CM2YtyAWyBYPjuJbPB4G3YyscYLaH6jHM3fBQw \
	mr2EmEfACFI+Rb7QRy68cUGmc6yFoPgcNvEVmBtQs3XuGIF7/BwWDzNn6Bi6BysfgvSQkB7yxe+wXMLq \
	avTyHYgRhLNY00WYOePFC5/nBY5kJ8DeS1Dcgtg81mzC2nUY8yvWjiEyzPnrx/j8/rI3J7yfGBFLyHHg \
	uN/XvTLxucGoBaImLiBqgaiJC4haIGriAqIWiJqrvoDa9wSNjhIUVv6VouVyWz2faz27wq2IPFG/kW+q \
	XwA/n+oFnG97g7Xn3vq3OpHROFOJWiEmJiYmJiZmZfMnip4VYPdCd4kAAAAASUVORK5CYII= \
   </image> \
   <paragraph text="Image from application resources (custom):"/> \
   <image resource="nMyImage" align="left"/> \
   <paragraph text="Image from application resources (standard):"/> \
   <image resource="12" align="left"/> \
   <paragraph text="Using of system icons:"/> \
   <group> \
	   <image sys_icon="information" align="left"/> \
	   <image sys_icon="warning" align="left"/> \
	   <image sys_icon="error" align="left"/> \
   </group> \
   <group uniform="true" align="right"> \
	   <button title="&amp;OK" returnval="ok" default="true"/> \
	   <button title="&amp;Cancel" returnval="cancel"/> \
   </group> \
</dialog>@';
dialog(dialog_template);