-
ObjectType objectType() const
Returns the form control object type.
ObjectType value | Description |
OBJECT_UNKNOWN | Unknown control |
OBJECT_BUTTON | Button control |
OBJECT_CHECKBOX | Check-box control |
OBJECT_DROP | Drop-down (combo box) control |
OBJECT_GBOX | Group box control |
OBJECT_LABEL | Label control |
OBJECT_LIST | List box control |
OBJECT_RADIO | Radio button control |
OBJECT_SCROLL | Scroll bar control |
OBJECT_SPIN | Spin box control |
OBJECT_EDITBOX | Edit box control |
OBJECT_DIALOG | Dialog control |
-
CheckedType checked() const
Returns whether a check box is selected or a radio button is selected. This attribute only applies to check box and radio button form controls.
-
void setChecked(CheckedType checked)
Sets whether a check box is selected or a radio button is selected. This attribute only applies to check box and radio button form controls.
CheckedType value | Description |
CHECKEDTYPE_UNCHECKED | Object is unchecked or unselected. |
CHECKEDTYPE_CHECKED | Object is checked or selected. |
CHECKEDTYPE_MIXED | Mixed selection. Applies only to check boxes. |
-
const wchar_t* fmlaGroup()
Returns the cell reference in a group box is linked to. Only applies to group box form controls.
-
void setFmlaGroup(const wchar_t* group)
Sets the cell reference in a group box is linked to. Only applies to group box form controls.
-
const wchar_t* fmlaLink()
Returns the cell reference is linked to. Only applies to check boxes, radio buttons, scroll bars, spin boxes, drop-downs and list boxes.
-
void setFmlaLink(const wchar_t* link)
Sets the cell reference is linked to. Only applies to check boxes, radio buttons, scroll bars, spin boxes, drop-downs and list boxes.
-
const wchar_t* fmlaRange()
Returns the cell reference with range of source data cells. This attribute only applies to list box and drop-down form controls.
-
void setFmlaRange(const wchar_t* range)
Sets the cell reference with range of source data cells. This attribute only applies to list box and drop-down form controls.
-
const wchar_t* fmlaTxbx()
Returns the cell reference with the source data that the form control object's data is linked to. This attribute applies only to label and edit box form controls.
-
void setFmlaTxbx(const wchar_t* txbx)
Sets the cell reference with the source data that the form control object's data is linked to. Any cell range can be specified but only the first cell in the range is considered. This attribute applies only to label and edit box form controls.
-
const wchar_t* name()
Returns the name for this embedded control.
-
const wchar_t* linkedCell()
Returns the worksheet range linked to the control's value.
-
const wchar_t* listFillRange()
Returns the range of source data cells used to populate the list box.
-
const wchar_t* macro()
Returns the custom function associated with the object.
-
const wchar_t* altText()
Returns alternative text for the object.
-
bool locked() const
Returns whether the object is locked when the sheet is protected.
-
bool defaultSize() const
Returns whether the object is at its default size.
-
bool print() const
Returns whether the object is printed when the document is printed.
-
bool disabled() const
Returns whether the object is allowed to run an attached macro.
-
const wchar_t* item(int index)
Returns the item by index from a list box or drop-down form control.
-
int itemSize() const
Returns the number of items in a list box or drop-down form control.
-
void addItem(const wchar_t* value)
Adds the item to a list box or drop-down form control.
-
void insertItem(int index, const wchar_t* value)
Inserts the item to the specified position to a list box or drop-down form control.
-
void clearItems()
Clears all items from a list box or drop-down form control.
-
int dropLines() const
Returns the number of lines in the drop-down before scroll bars are added.
-
void setDropLines(int lines)
Sets the number of lines in the drop-down before scroll bars are added. This attribute only applies to drop-down form controls. This value must be at least 0 and at most 30000.
-
int dx() const
Returns the width of the scroll bar in pixels.
-
void setDx(int dx)
Sets the width of the scroll bar in pixels. This attribute only applies to list boxes, scroll bars, spin boxes and drop-downs.
-
bool firstButton() const
Returns whether the object is the first button in a set of radio buttons.
-
void setFirstButton(bool firstButton)
Sets whether the object is the first button in a set of radio buttons. This attribute only applies to radio button form controls.
-
bool horiz() const
Returns whether the scroll bar is horizontal.
-
void setHoriz(bool horiz)
Sets whether the scroll bar is horizontal. This attribute only applies to scroll bar form controls.
-
int inc() const
Returns the change in the current value of a scroll bar or a spin box form control as a result of on an increment click.
-
void setInc(int inc)
Sets the change in the current value of a scroll bar or a spin box form control as a result of on an increment click. It must be at least 0 and at most 30000. This attribute applies only to scroll bar or spin box form controls.
-
int getMax() const
Returns the maximum value generated by the scroll bar or by the spin box.
-
void setMax(int max)
Sets the maximum value generated by the scroll bar or by the spin box. It must be at least 0 and at most 30000. This attribute only applies to scroll bars and spin boxes.
-
int getMin() const
Returns the minimum value generated by the scroll bar or by the spin box.
-
void setMin(int min)
Sets the minimum value generated by the scroll bar or by the spin box. It must be at least 0 and at most 30000. This attribute only applies to scroll bars and spin box.
-
const wchar_t* multiSel() const
Returns the indices of selected items as a comma-delimited list. The list indices are one-based. This attribute is valid only if the attribute selType has the value "multi". This attribute applies only to list box form controls.
-
void setMultiSel(const wchar_t* value)
Sets the indices of selected items as a comma-delimited list. The list indices are one-based. This attribute is valid only if the attribute selType has the value "multi". This attribute applies only to list box form controls.
-
int sel() const
Returns the index of the selected item. The index is one-based. If set to a value of 0, no items are selected. This attribute applies only to list box and drop-down form controls.
-
void setSel(int sel)
Sets the index of the selected item. The index is one-based. If set to a value of 0, no items are selected. This attribute applies only to list box and drop-down form controls.
-
bool fromAnchor(int* col, int* colOff, int* row, int* rowOff)
Returns the top left location of a control within a document.
-
bool toAnchor(int* col, int* colOff, int* row, int* rowOff)
Returns the bottom right location of a control within a document.