Bitmap UI Control

User Interface Controls > Common Properties > Layout > Types > Bitmap

 

   

Creating User Interfaces - Quick Navigation

A bitmap control is used to place a bitmap image on the rollout.

The syntax is:

bitmap <name> [<caption>] [fileName:<filename_string> | bitmap:<bitmap>] 	 

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
NOTE:

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.

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.

   

Events

-- none --

See Also