Image.SetProperties

Image.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of an image object.

Parameters

ObjectName

(string) The name of the image object.

Properties

(table) A table containing the image object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ImageFile

string

The image file to load.

UseTransColor

boolean

Whether to use a transparent color in the image object.

TransparentColor

number

The color to use as a transparent color in the image object.

Tolerance

number

The tolerance to use for the transparent color, between 0 and 100. 0 requires an exact match to TransparentColor. Increasing this value allows shades of TrasnparentColor to be transparent as well.

Opacity

number

Number between 0 and 100 corresponding to the percent opacity that the image object will observe. A value of 0 makes the image invisible while a value of 100 makes the image 100% visible.

HitTest

number

Whether AutoPlay should allow the mouse to interact with the image when it is anywhere within the bounds of the image object, or only when it is on a non-transparent section of the image itself:

CONSTANT

VALUE

DESCRIPTION

HITTEST_STANDARD

0

The mouse should interact with the image object anywhere within the bounds of the object.

HITTEST_ALPHA

1

The mouse should interact with the image object on any part of the image which is not transparent.

Enabled

boolean

True if the image object should be enabled, false if it should not be.

Visible

boolean

True if the image object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the image object.

Height

number

The height (in pixels) of the image object.

TooltipText

string

The mouseover tooltip of the image object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that will be displayed when the mouse is over the image object:

CONSTANT

VALUE

DESCRIPTION

CURSOR_ARROW

0

Standard mouse arrow cursor.

CURSOR_HAND

1

Hand cursor.

CURSOR_BLACK_ARROW

2

Black arrow cursor.

CURSOR_CROSSHAIR

3

Crosshair cursor.

CURSOR_EXPLORE

4

Explore cursor.

CURSOR_HELP

5

Help cursor.

CURSOR_MAGNIFY

6

Magnify cursor.

CURSOR_MEDIA

7

Media cursor.

CURSOR_MONEY

8

Money cursor.

CURSOR_NOTEPAD

9

Notepad cursor.

CURSOR_PENCIL

10

Pencil cursor.

CURSOR_PRINTER

11

Printer cursor.

CURSOR_SPEAKER

12

Speaker cursor.

CURSOR_UP_ARROW

13

Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the image object.

CONSTANT

VALUE

DESCRIPTION

SND_NONE

0

No highlight sound.

SND_STANDARD

1

Standard highlight sound.

SND_CUSTOM

2

Custom highlight sound.

HighlightSoundFile

string

The path to the image object's custom highlight sound file. If the image object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, HighlightSound must be set to SND_CUSTOM.

ClickSound

number

The type of sound that will be played when the mouse clicks the image object.

CONSTANT

VALUE

DESCRIPTION

SND_NONE

0

No click sound.

SND_STANDARD

1

Standard click sound.

SND_CUSTOM

2

Custom click sound.

ClickSoundFile

string

The path to the image object's custom click sound file. If the image object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, ClickSound must be set to SND_CUSTOM.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also: Related Actions