Contents Up Previous Next

wxItem: wxWindow

This is the base class for any widget or control which can be placed on a panel or dialog box.

The following styles may be used for any panel item:

wxFIXED_LENGTH The label of the item is created with a width proportional to the length of the label string, regardless of proportional font in use. This allows alignment of items if all items are given labels of the same length.

wxItem::Centre
wxItem::Command
wxItem::GetBackgroundColour
wxItem::GetButtonColour
wxItem::GetLabelColour
wxItem::GetLabel
wxItem::SetBackgroundColour
wxItem::SetButtonColour
wxItem::SetButtonFont
wxItem::SetLabel
wxItem::SetLabelColour
wxItem::SetLabelFont


wxItem::Centre

void Centre(int direction = wxHORIZONTAL)

Centres the frame on the panel or dialog box. The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.

You may still use Fit in conjunction with this call, but call Fit first before centring items.


wxItem::Command

void Command(wxCommandEvent event)

Simulate the effect of the user issuing a command to the item. See wxCommandEvent.


wxItem::GetBackgroundColour

wxColour * GetBackgroundColour(void)

Gets the item background colour.


wxItem::GetButtonColour

wxColour * GetButtonColour(void)

Gets the item button colour.


wxItem::GetLabelColour

wxColour * GetLabelColour(void)

Gets the item label colour.


wxItem::GetLabel

char * GetLabel(void)

Gets a temporary pointer to the item's label.


wxItem::SetBackgroundColour

void SetBackgroundColour(wxColour& colour)

Sets the item background colour (Motif and Windows only).


wxItem::SetButtonColour

void SetButtonColour(wxColour& colour)

Specifies the default colour for drawing value text (Motif and Windows). wxButton items do not respond to this setting under Windows.


wxItem::SetButtonFont

void SetButtonFont(wxFont *font)

Sets the item value font (not XView).


wxItem::SetLabel

void SetLabel(char *label)

Sets the item's label. A copy of the label is taken.


wxItem::SetLabelColour

void SetLabelColour(wxColour& colour)

Sets the item label's colour (Motif and Windows only).


wxItem::SetLabelFont

void SetLabelFont(wxFont *font)

Sets the item label font (not XView).