wxAutoExcel  2.0.0
wxAutoExcel::wxExcelControlFormat Class Reference

Represents Microsoft Excel ControlFormat object. More...

Inheritance diagram for wxAutoExcel::wxExcelControlFormat:
wxAutoExcel::wxExcelObject

Public Member Functions

void AddItem (const wxString &text, long *index)
 Adds an item to a list box or a combo box. More...
 
wxString List (long index)
 Returns or sets the text entries in the specified list box or a combo box, as an array of strings, or returns or sets a single text entry. More...
 
void RemoveAllItems ()
 Removes all entries from a Microsoft Excel list box or combo box. More...
 
void RemoveItem (long index, long *count=NULL)
 Removes one or more items from a list box or combo box. More...
 
long GetDropDownLines ()
 Returns the number of list lines displayed in the drop-down portion of a combo box. More...
 
void SetDropDownLines (long dropDownLines)
 Sets the number of list lines displayed in the drop-down portion of a combo box. More...
 
bool GetEnabled ()
 True if the object is enabled. More...
 
void SetEnabled (bool enabled)
 True if the object is enabled. More...
 
long GetLargeChange ()
 Returns the amount that the scroll box increments or decrements for a page scroll (when the user clicks in the scroll bar body region). More...
 
void SetLargeChange (long largeChange)
 Sets the amount that the scroll box increments or decrements for a page scroll (when the user clicks in the scroll bar body region). More...
 
wxString GetLinkedCell ()
 Returns the worksheet range linked to the control's value. More...
 
void SetLinkedCell (const wxString &linkedCell)
 Sets the worksheet range linked to the control's value. More...
 
long GetListCount ()
 Returns the number of entries in a list box or combo box. More...
 
wxString GetListFillRange ()
 Returns the worksheet range used to fill the specified list box. More...
 
void SetListFillRange (const wxString &listFillRange)
 Sets the worksheet range used to fill the specified list box. More...
 
long GetListIndex ()
 Returns the index number of the currently selected item in a list box or combo box. More...
 
void SetListIndex (long listIndex)
 Sets the index number of the currently selected item in a list box or combo box. More...
 
bool GetLockedText ()
 True if the text in the specified object will be locked to prevent changes when the workbook is protected. More...
 
void SetLockedText (bool lockedText)
 True if the text in the specified object will be locked to prevent changes when the workbook is protected. More...
 
long GetMax ()
 Returns the maximum value of a scroll bar or spinner range. More...
 
void SetMax (long max)
 Sets the maximum value of a scroll bar or spinner range. More...
 
long GetMin ()
 Returns the minimum value of a scroll bar or spinner range. More...
 
void SetMin (long min)
 Sets the minimum value of a scroll bar or spinner range. More...
 
long GetMultiSelect ()
 Returns the selection mode of the specified list box. More...
 
void SetMultiSelect (long multiSelect)
 Sets the selection mode of the specified list box. More...
 
bool GetPrintObject ()
 True if the object will be printed when the document is printed. More...
 
void SetPrintObject (bool printObject)
 True if the object will be printed when the document is printed. More...
 
long GetSmallChange ()
 Returns the amount that the scroll bar or spinner is incremented or decremented for a line scroll (when the user clicks an arrow). More...
 
void SetSmallChange (long smallChange)
 Sets the amount that the scroll bar or spinner is incremented or decremented for a line scroll (when the user clicks an arrow). More...
 
long GetValue ()
 Returns a Long value that represents the name of specified control format. More...
 
void SetValue (long value)
 Sets a Long value that represents the name of specified control format. More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "ControlFormat". More...
 
- Public Member Functions inherited from wxAutoExcel::wxExcelObject
bool IsOk_ () const
 Returns true if the object has a valid dispatch. More...
 
wxString GetAutomationObjectName_ (bool stripUnderscores=false) const
 Returns object name as provided by IDispatch->GetTypeInfo()->GetDocumentation(MEMBERID_NIL, &name, NULL, NULL, NULL). More...
 
wxSharedPtr< wxAutomationObject > GetAutomationObject_ ()
 Returns the underlying wxAutomationObject. More...
 
 operator bool () const
 Returns true if the object has a valid dispatch and its last automation call (if any), i.e. More...
 
WXLCID GetAutomationLCID_ () const
 Returns the locale identifier used in automation calls. More...
 
bool SetAutomationLCID_ (WXLCID lcid)
 Sets the locale identifier to be used in automation calls. More...
 
bool GetPropertyAndMethodNames_ (wxArrayString &propertyNames, wxArrayString &methodNames, bool includeHidden=false)
 Returns lists of property and method names the automation interface exposes. More...
 
bool GetUnimplementedObject_ (const wxString &name, wxAutomationObject &object)
 Helper function for receiving an automation object not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Additional Inherited Members

- Public Types inherited from wxAutoExcel::wxExcelObject
enum  ErrorFlags {
  Err_DoNothing = 0 , Err_LogOnInvalidDispatch = 1 , Err_AssertOnInvalidDispatch = 1 << 1 , Err_ThrowOnInvalidDispatch = 1 << 2 ,
  Err_LogOnInvalidArgument = 1 << 3 , Err_AssertOnInvalidArgument = 1 << 4 , Err_ThrowOnInvalidArgument = 1 << 5 , Err_LogOnFailedInvoke = 1 << 6 ,
  Err_AssertOnFailedInvoke = 1 << 7 , Err_ThrowOnFailedInvoke = 1 << 8 , Err_LogOnInvalidReturnType = 1 << 9 , Err_AssertOnInvalidReturnType = 1 << 10 ,
  Err_ThrowOnInvalidReturnType = 1 << 11 , Err_LogOnOtherError = 1 << 12 , Err_AssertOnOtherError = 1 << 13 , Err_ThrowOnOtherError = 1 << 14
}
 Flags affecting the behaviour of wxExcelObject and its descendants when an error occurs during accessing an Excel object property or calling its method. More...
 
- Static Public Member Functions inherited from wxAutoExcel::wxExcelObject
static unsigned GetErrorMode_ ()
 Sets the error mode to the combination of wxExcelObject::ErrorFlags. More...
 
static void SetErrorMode_ (unsigned mode)
 Sets the error mode as the combination of wxExcelObject::ErrorFlags. More...
 
static bool GetUnimplementedCollectionItem_ (wxAutomationObject &collection, const long index, wxAutomationObject &item, bool asProperty)
 Helper function for obtaining an item from MS Excel collection not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Detailed Description

Represents Microsoft Excel ControlFormat object.

Member Function Documentation

◆ AddItem()

void wxAutoExcel::wxExcelControlFormat::AddItem ( const wxString &  text,
long *  index 
)

Adds an item to a list box or a combo box.

MSDN documentation for ControlFormat.AddItem.

◆ List()

wxString wxAutoExcel::wxExcelControlFormat::List ( long  index)

Returns or sets the text entries in the specified list box or a combo box, as an array of strings, or returns or sets a single text entry.

An error occurs if there are no entries in the list.

MSDN documentation for ControlFormat.List.

◆ RemoveAllItems()

void wxAutoExcel::wxExcelControlFormat::RemoveAllItems ( )

Removes all entries from a Microsoft Excel list box or combo box.

Todo:
Is List a property (and should have a setter too) or a method?

MSDN documentation for ControlFormat.RemoveAllItems.

◆ RemoveItem()

void wxAutoExcel::wxExcelControlFormat::RemoveItem ( long  index,
long *  count = NULL 
)

Removes one or more items from a list box or combo box.

MSDN documentation for ControlFormat.RemoveItem.

◆ GetDropDownLines()

long wxAutoExcel::wxExcelControlFormat::GetDropDownLines ( )

Returns the number of list lines displayed in the drop-down portion of a combo box.

MSDN documentation for ControlFormat.DropDownLines.

◆ SetDropDownLines()

void wxAutoExcel::wxExcelControlFormat::SetDropDownLines ( long  dropDownLines)

Sets the number of list lines displayed in the drop-down portion of a combo box.

MSDN documentation for ControlFormat.DropDownLines.

◆ GetEnabled()

bool wxAutoExcel::wxExcelControlFormat::GetEnabled ( )

True if the object is enabled.

MSDN documentation for ControlFormat.Enabled.

◆ SetEnabled()

void wxAutoExcel::wxExcelControlFormat::SetEnabled ( bool  enabled)

True if the object is enabled.

MSDN documentation for ControlFormat.Enabled.

◆ GetLargeChange()

long wxAutoExcel::wxExcelControlFormat::GetLargeChange ( )

Returns the amount that the scroll box increments or decrements for a page scroll (when the user clicks in the scroll bar body region).

MSDN documentation for ControlFormat.LargeChange.

◆ SetLargeChange()

void wxAutoExcel::wxExcelControlFormat::SetLargeChange ( long  largeChange)

Sets the amount that the scroll box increments or decrements for a page scroll (when the user clicks in the scroll bar body region).

MSDN documentation for ControlFormat.LargeChange.

◆ GetLinkedCell()

wxString wxAutoExcel::wxExcelControlFormat::GetLinkedCell ( )

Returns the worksheet range linked to the control's value.

If you place a value in the cell, the control takes this value. Likewise, if you change the value of the control, that value is also placed in the cell.

MSDN documentation for ControlFormat.LinkedCell.

◆ SetLinkedCell()

void wxAutoExcel::wxExcelControlFormat::SetLinkedCell ( const wxString &  linkedCell)

Sets the worksheet range linked to the control's value.

If you place a value in the cell, the control takes this value. Likewise, if you change the value of the control, that value is also placed in the cell.

MSDN documentation for ControlFormat.LinkedCell.

◆ GetListCount()

long wxAutoExcel::wxExcelControlFormat::GetListCount ( )

Returns the number of entries in a list box or combo box.

Returns 0 (zero) if there are no entries in the list.

MSDN documentation for ControlFormat.ListCount.

◆ GetListFillRange()

wxString wxAutoExcel::wxExcelControlFormat::GetListFillRange ( )

Returns the worksheet range used to fill the specified list box.

Setting this property destroys any existing list in the list box.

MSDN documentation for ControlFormat.ListFillRange.

◆ SetListFillRange()

void wxAutoExcel::wxExcelControlFormat::SetListFillRange ( const wxString &  listFillRange)

Sets the worksheet range used to fill the specified list box.

Setting this property destroys any existing list in the list box.

MSDN documentation for ControlFormat.ListFillRange.

◆ GetListIndex()

long wxAutoExcel::wxExcelControlFormat::GetListIndex ( )

Returns the index number of the currently selected item in a list box or combo box.

MSDN documentation for ControlFormat.ListIndex.

◆ SetListIndex()

void wxAutoExcel::wxExcelControlFormat::SetListIndex ( long  listIndex)

Sets the index number of the currently selected item in a list box or combo box.

MSDN documentation for ControlFormat.ListIndex.

◆ GetLockedText()

bool wxAutoExcel::wxExcelControlFormat::GetLockedText ( )

True if the text in the specified object will be locked to prevent changes when the workbook is protected.

MSDN documentation for ControlFormat.LockedText.

◆ SetLockedText()

void wxAutoExcel::wxExcelControlFormat::SetLockedText ( bool  lockedText)

True if the text in the specified object will be locked to prevent changes when the workbook is protected.

MSDN documentation for ControlFormat.LockedText.

◆ GetMax()

long wxAutoExcel::wxExcelControlFormat::GetMax ( )

Returns the maximum value of a scroll bar or spinner range.

The scroll bar or spinner won’t take on values greater than this maximum value.

MSDN documentation for ControlFormat.Max.

◆ SetMax()

void wxAutoExcel::wxExcelControlFormat::SetMax ( long  max)

Sets the maximum value of a scroll bar or spinner range.

The scroll bar or spinner won’t take on values greater than this maximum value.

MSDN documentation for ControlFormat.Max.

◆ GetMin()

long wxAutoExcel::wxExcelControlFormat::GetMin ( )

Returns the minimum value of a scroll bar or spinner range.

The scroll bar or spinner won’t take on values less than this minimum value.

MSDN documentation for ControlFormat.Min.

◆ SetMin()

void wxAutoExcel::wxExcelControlFormat::SetMin ( long  min)

Sets the minimum value of a scroll bar or spinner range.

The scroll bar or spinner won’t take on values less than this minimum value.

MSDN documentation for ControlFormat.Min.

◆ GetMultiSelect()

long wxAutoExcel::wxExcelControlFormat::GetMultiSelect ( )

Returns the selection mode of the specified list box.

Can be one of the following constants: xlNone, xlSimple, or xlExtended.

MSDN documentation for ControlFormat.MultiSelect.

◆ SetMultiSelect()

void wxAutoExcel::wxExcelControlFormat::SetMultiSelect ( long  multiSelect)

Sets the selection mode of the specified list box.

Can be one of the following constants: xlNone, xlSimple, or xlExtended.

MSDN documentation for ControlFormat.MultiSelect.

◆ GetPrintObject()

bool wxAutoExcel::wxExcelControlFormat::GetPrintObject ( )

True if the object will be printed when the document is printed.

MSDN documentation for ControlFormat.PrintObject.

◆ SetPrintObject()

void wxAutoExcel::wxExcelControlFormat::SetPrintObject ( bool  printObject)

True if the object will be printed when the document is printed.

MSDN documentation for ControlFormat.PrintObject.

◆ GetSmallChange()

long wxAutoExcel::wxExcelControlFormat::GetSmallChange ( )

Returns the amount that the scroll bar or spinner is incremented or decremented for a line scroll (when the user clicks an arrow).

MSDN documentation for ControlFormat.SmallChange.

◆ SetSmallChange()

void wxAutoExcel::wxExcelControlFormat::SetSmallChange ( long  smallChange)

Sets the amount that the scroll bar or spinner is incremented or decremented for a line scroll (when the user clicks an arrow).

MSDN documentation for ControlFormat.SmallChange.

◆ GetValue()

long wxAutoExcel::wxExcelControlFormat::GetValue ( )

Returns a Long value that represents the name of specified control format.

MSDN documentation for ControlFormat.Value.

◆ SetValue()

void wxAutoExcel::wxExcelControlFormat::SetValue ( long  value)

Sets a Long value that represents the name of specified control format.

MSDN documentation for ControlFormat.Value.

◆ GetAutoExcelObjectName_()

virtual wxString wxAutoExcel::wxExcelControlFormat::GetAutoExcelObjectName_ ( ) const
inlinevirtual

Returns "ControlFormat".

Reimplemented from wxAutoExcel::wxExcelObject.