Vizard 7 » Command Index » Vizard objects » node3d » <node3d:GUI:buttonlabel>.overflow
7.7

<node3d:GUI:buttonlabel>.overflow

Changes the way the button handles the length of the text relative to its length.

<node3d:GUI:buttonlabel>.overflow(  
mode  
)  
mode
Can be one of the following:

Overflow Modes

viz.OVERFLOW_GROW

The node length will grow to fit the length of the selected text.

viz.OVERFLOW_SHRINK

The text size will be scaled down so that it fits in the node.

viz.OVERFLOW_CROP

The text will be cropped to fit in the node.


Remarks

This command controls how the button will behave when the label cannot fit into the bounds of the button. The default overflow mode is viz.OVERFLOW_GROW

Return Value

None

Example

list = viz.addButtonLabel("Hello there Bob-O")
list.setPosition(.5,.5)
list.setLength(.333)
list.overflow(viz.OVERFLOW_CROP)


This will cut the displayed text to just "Hello"