A bitmap control is used to place a bitmap image on the rollout.
The syntax is:
bitmap <name> [<caption>] \
[ fileName:<filename_string> | bitmap:<bitmap> | iconSize:<point2> iconName:<filename> ] \
[ applyUIScaling:<boolean> ]
The default alignment of bitmap
items is #center
.
There is no caption or text displayed with bitmap
items.
EXAMPLE:
rollout test_bitmaps "Testing Bitmap" ( bitmap the_bmp fileName:"my_pic.bmp" ) createDialog test_bitmaps
If the bitmap specified by filename cannot be found, the bitmap control will be empty as shown in the screenshot above.
Parameters:
fileName:
The name of the bitmap file to load and display. The size of the bitmap image in the rollout is the bitmap file image size. The specified file name is searched for in the following directories (in order of search): current MAXScript directory, MAXScript startup directory, MAXScript directory, 3ds Max bitmap directories, and then the 3ds Max image directory.
bitMap:
You can specify a bitMap:
creation parameter in place of the fileName:
parameter that is used to specify a bitmap file. This allows you to use an existing bitmap value, such as those generated by a call to the render function. You can set bitmap
to an "empty" image of a specified size by specifying a bitmap value constructor.
iconName: IconSize:
These parameters load the name specified by iconName
from the multi-resolution icon from the pre-compiled icon resource file (see the Icon Guide in the 3ds Max Developer's Guide) based on the iconSize
and current display resolution and scaling. The default size is \[24x24\]
.
applyUIScaling:
Indicates whether to apply UI scaling on high-DPI displays. The default is true.
EXAMPLE:
rollout test_bitmaps "Testing Bitmap" ( bitmap BitmapImage bitmap:(bitmap 50 50 color:blue) ) createDialog test_bitmaps
Properties
<bitmap>.fileName String
The bitmap item file name as a string. You can change the image at any time by setting this property to a new name, but it will not resize the display area in the rollout; it will always be the size set from the initial image.
<bitmap>.bitmap TextureMap
A write-only property that is used to set the image displayed from a MAXScript bitmap value, as might be derived from functions like render()
or selectBitmap()
. You can change the image at any time by setting this property to a bitmap value, but it will not resize the display area in the rollout; it will always be the size set from the initial image.
<bitmap>.width Integer
Get/set the width of the bitmap item in pixels.
<bitmap>.height Integer
Get/set the height of the bitmap item in pixels.
<bitmap>.applyUIScaling Boolean
Gets / sets whether UI scaling is applied to the bitmap on high-DPI displays.
Events
-- none --