wx.ControlWithItems Class Reference

Inheritance diagram for wx.ControlWithItems:

wx.Control wx.Window wx.EvtHandler wx.Object wx.Choice wx.ComboBox wx.ListBox wx.CheckListBox

List of all members.

Public Member Functions

 ControlWithItems (IntPtr wxObject)
int FindString (wxString str)
int FindString (string str)
string GetString (int n)
void SetString (int n, string label)
bool SetStringSelection (string selectedLabel)
override bool ShouldInheritColours ()
Maintaining items.
int Append (string item, ClientData clientData)
int Append (wxString item, ClientData clientData)
int Append (string item)
void Append (string[] items)
void Clear ()
void Delete (int n)
int Insert (string item, int pos, ClientData clientData)
int Insert (wxString item, int pos, ClientData clientData)
int Insert (string item, int pos)
Client data of items
The .NET interface does not distinguish between client data and client object: The interface only supports client objects.

Refer to class SystemObjectClientData.

ClientData GetClientObject (int n)
bool HasClientObjectData (int n)
void SetClientData (int n, ClientData data)

Properties

int Count [get]
bool IsEmpty [get]
int Selection [get, set]
string[] Strings [get]
string StringSelection [get, set]
string this [int n] [get, set]


Detailed Description

base class of some controls presenting a list of items.

Constructor & Destructor Documentation

wx.ControlWithItems.ControlWithItems ( IntPtr  wxObject  ) 


Member Function Documentation

int wx.ControlWithItems.Append ( string  item,
ClientData  clientData 
)

This will append item to the end of the item list and associate it with the provided client data. The client data may be null.

Returns:
The index of the new item.

int wx.ControlWithItems.Append ( wxString  item,
ClientData  clientData 
)

int wx.ControlWithItems.Append ( string  item  ) 

void wx.ControlWithItems.Append ( string[]  items  ) 

void wx.ControlWithItems.Clear (  ) 

Deletes all items.

void wx.ControlWithItems.Delete ( int  n  ) 

int wx.ControlWithItems.FindString ( wxString  str  ) 

int wx.ControlWithItems.FindString ( string  str  ) 

Finds an item whose label matches the given string.

Returns:
The zero-based position of the item, or -1 if the string was not found.

ClientData wx.ControlWithItems.GetClientObject ( int  n  ) 

Reads client data for item n.

string wx.ControlWithItems.GetString ( int  n  ) 

Get the label of the entry of index n. Refer also to the indexer of this class.

bool wx.ControlWithItems.HasClientObjectData ( int  n  ) 

int wx.ControlWithItems.Insert ( string  item,
int  pos,
ClientData  clientData 
)

Inserts the item into the list before pos, associating the given, typed or untyped, client data pointer with the item. Not valid for ListBox.wxLB_SORT or ComboBox.wxCB_SORT styles, use Append() instead.

Returns:
The return value is the index of the newly inserted item. If the insertion failed for some reason, -1 is returned.

int wx.ControlWithItems.Insert ( wxString  item,
int  pos,
ClientData  clientData 
)

int wx.ControlWithItems.Insert ( string  item,
int  pos 
)

void wx.ControlWithItems.SetClientData ( int  n,
ClientData  data 
)

void wx.ControlWithItems.SetString ( int  n,
string  label 
)

Set the label of the entry of index n. Refer also to the indexer of this class.

bool wx.ControlWithItems.SetStringSelection ( string  selectedLabel  ) 

Select the designated label. Return true on success and false otherwise. Refer also to property StringSelection().

override bool wx.ControlWithItems.ShouldInheritColours (  )  [virtual]

Reimplemented from wx.Window.


Property Documentation

int wx.ControlWithItems.Count [get]

Returns the number of items.

bool wx.ControlWithItems.IsEmpty [get]

True iff this is empty.

int wx.ControlWithItems.Selection [get, set]

string [] wx.ControlWithItems.Strings [get]

All the currently known labels. Read only property. Alternatively, use the indexer of this class.

string wx.ControlWithItems.StringSelection [get, set]

Also refer to method SetStringSelection() that returns a Boolean that is true on success and false otherwise.

string wx.ControlWithItems.this[int n] (  )  [get, set]

This is equivalent to the methods GetString() and SetString().


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads