ImgTag

imgTag <name> [caption] [tooltip:<string>] [style:<key>] [bitmap:<bitmap>] [opacity:<float>] [transparent:<color>]

Properties

<ImgTag>.tooltip String default:""

<ImgTag>.bitmap Bitmap default:undefined

Current image being displayed.

<ImgTag>.style Key default:#bmp_stretch

Way the bitmap will be displayed in the control.

Can be one of the following:

#bmp_stretch

#bmp_tile

#bmp_center

<ImgTag>.opacity float default:0.0

Overall opacity of the image, can range from 0.0 to 1.0

<ImgTag>.transparent color default:(color 0 0 0)

The RGB color in the source bitmap to treat as transparent.

Note:

Opacity and transparent properties only have an effect in W2K. These do not have an effect in NT.

Events

on <ImgTag> mousedown do <expr>

Called when the left mouse button is pressed down.

on <ImgTag> mouseup do <expr>

Called when the left mouse button is released.

on <ImgTag> click do <expr>

Called when the left mouse button is released.

on <ImgTag> dblclick do <expr>

Called when the left mouse button double clicked.

on <ImgTag> mouseover do <expr>

Called when the mouse is moved into the image area.

on <ImgTag> mouseout do <expr>

Called when the mouse is moved out of the image area.

 

on <ImgTag> rightclick do <expr>

Called when the right mouse button is released. Available in 3ds Max 8 and higher.

on <ImgTag> lbuttondown <Point2> <Flags> do <expr>

Called when the left mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value which is a combination of the following bits:

on <ImgTag> lbuttonup <Point2> <Flags> do <expr>

Called when the left mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> lbuttondblclk <Point2> <Flags> do <expr>

Called when the left mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttondown <Point2> <Flags> do <expr>

Called when the middle mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttonup <Point2> <Flags> do <expr>

Called when the middle mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttondblclk <Point2> <Flags> do <expr>

Called when the middle mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttondown <Point2> <Flags> do <expr>

Called when the middle mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttonup <Point2> <Flags> do <expr>

Called when the middle mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttondblclk <Point2> <Flags> do <expr>

Called when the middle mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

 

Example:

rcmenu MyRCmenu

(

menuItem mi_cs "First Option" checked:false

menuItem mi_rs "Second Option" checked:false

)

 

rollout ui_items "ui items"

(

button a2 "button"

on a2 rightClick do print a2

checkbutton a4 "checkbutton"

on a4 rightClick do print a4

local bm = bitmap 50 50 color:red

imgtag b5 "imgtag" bitmap:bm align:#center

on b5 mousedown v1 v2 do

format "% ; % ; % ; %\n" b5 #mousedown v1 v2

on b5 lbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttondown v1 v2

on b5 mbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttondown v1 v2

on b5 rightClick v1 v2 do

format "% ; % ; % ; %\n" b5 #rightClick v1 v2

on b5 rbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttondown v1 v2

on b5 mouseup v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseup v1 v2

on b5 click v1 v2 do

format "% ; % ; % ; %\n" b5 #click v1 v2

on b5 lbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttonup v1 v2

on b5 mbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttonup v1 v2

on b5 rbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttonup v1 v2

on b5 dblclick v1 v2 do

format "% ; % ; % ; %\n" b5 #dblclick v1 v2

on b5 lbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttondblclk v1 v2

on b5 mbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttondblclk v1 v2

on b5 rbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttondblclk v1 v2

on b5 mouseout v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseout v1 v2

on b5 mouseover v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseover v1 v2

 

mapbutton a11 "mapButton"

on a11 rightClick do print a11

materialbutton a12 "materialbutton"

on a12 rightClick do print a12

pickbutton a13 "pickbutton"

on a13 rightClick do (print a13; popupmenu MyRCmenu)

)

createdialog ui_items width:100

 

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types