Control Attributes

All of the control types have numerous attributes you can use to modify their appearance. All the available attributes are listed in the following table in alphabetical order, with their allowed values and the controls that they can be used with.

Attribute

Description

Allowed Values

Applies To

boxStyle

Whether a box control arranges

horizontal, vertical

box

icons horizontally (the default)

or vertically

columns

The number of columns in a gallery

1 to 1024 columns

gallery

Table continued on following page

Attribute

Description

Allowed Values

Applies To

description

A long description of a control, shown in menus when the menu's itemSize is set to large

1 to 4096 characters

button, toggleButton, splitButton, checkBox, menu, dynamicMenu, gallery

Enabled

Whether a control is enabled

true, false

All controls

Id

A custom control ID

1 to 1024 characters

All controls

idMso

A built-in control ID

1 to 1024 characters

All controls

idQ

A qualified control (see later)

1 to 1024 characters

tab, group or menu

Image

The name of a custom image within the workbook file

1 to 1024 characters

All controls that have an image

imageMso

The name of a built-in control, whose image should be used

1 to 1024 characters

All controls that have an image

invalidate ContentOnDrop

Whether to fire the content-related callbacks whenever a control is dropped

true, false

combobox, gallery, dynamicMenu

itemHeight

The height of a gallery item, in pixels

1 to 4096

gallery

itemSize

The size of items in a menu; large items show their descriptions as well as their labels

normal, large

menu

itemWidth

The width of a gallery item, in pixels

1 to 4096

gallery

keytip

The shortcut key combination used to access the control

1 to 3 characters

All controls, tab and group

label group

The control's caption

1 to 1024 characters

All controls, tab and

maxLength

The maximum length of textual input

1 to 1024

editBox, comboBox

rows

The number of rows in a gallery

1 to 1024 rows

gallery

screentip

The small tip that shows when the mouse hovers over a control

1 to 1024 characters

All controls

showImage

Whether a control's image is displayed

true, false

All controls that have an image

showItemImage

Whether images are displayed for drop-down items

true, false

comboBox, dropDown, gallery

showItemLabel

Whether labels are displayed for drop-down items

true, false

comboBox, dropDown, gallery

Attribute

Description

Allowed Values

Applies To

showLabel

Whether a control's label is displayed

true, false

All controls

size

The size of a control: normal-size takes up one row; large-size takes up three rows

normal, large

All controls

sizeString

A representative string used to set the width of a control

1 to 1024 characters

editBox, comboBox, dropDown

supertip

The large tip that shows when the mouse hovers over a control

1 to 1024 characters

All controls

tag

Arbitrary text

1 to 1024 characters

All controls

title

The text for a menu's title

1 to 1024 characters

menu, menuSeparator

visible

Whether a control is visible

true, false

All controls, tab and group

0 0

Post a comment