A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons.
wxRadioBox::wxRadioBox
wxRadioBox::~wxRadioBox
wxRadioBox::Create
wxRadioBox::Enable
wxRadioBox::FindString
wxRadioBox::GetSelection
wxRadioBox::GetStringSelection
wxRadioBox::Number
wxRadioBox::SetSelection
wxRadioBox::SetStringSelection
wxRadioBox::Show
wxRadioBox::GetString
void wxRadioBox(void)
Constructor, for use by derived classes.
void wxRadioBox(wxPanel *parent, wxFunction func, char *label,
int x = -1, int y = -1, int width = -1, int height = -1,
int n, char *choices[], int majorDim = 0, long style = wxHORIZONTAL, char *name = "radioBox")
void wxRadioBox(wxPanel *parent, wxFunction func, char *label,
int x = -1, int y = -1, int width = -1, int height = -1,
int n, wxBitmap *choices[], int majorDim = 0, long style = wxHORIZONTAL, char *name = "radioBox")
Constructor, creating and showing a radiobox.
func may be NULL; otherwise it is used as the callback for the radiobox. Note that the cast (wxFunction) must be used when passing your callback function name, or the compiler may complain that the function does not match the constructor declaration.
If label is non-NULL, it will be used to label the radiobox.
The parameters x and y are used to specify an absolute position, or a position after the previous panel item if omitted or default.
If width or height are omitted (or are less than zero), an appropriate size will be used for the radiobox.
n is the number of possible choices, and choices is an array of strings or bitmaps of size n. wxWindows allocates its own memory for these strings so the calling program must deallocate the array itself.
majorDim specifies the number of rows (if style is wxVERTICAL) or columns (if style is wxHORIZONTAL) for a two-dimensional radiobox.
style specifies a bitwise-or list of styles. Specify wxVERTICAL to lay out a two-dimensional radiobox in columns of specified majorDim height, or wxHORIZONTAL to lay it out in rows.
The name parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual radioboxes.
void ~wxRadioBox(void)
Destructor, destroying the radiobox item.
Bool Create(wxPanel *parent, wxFunction func, char *label,
int x = -1, int y = -1, int width = -1, int height = -1,
int n, char *choices[], int majorDim = 0, long style = wxHORIZONTAL, char *name = "radioBox")
Bool Create(wxPanel *parent, wxFunction func, char *label,
int x = -1, int y = -1, int width = -1, int height = -1,
int n, wxBitmap *choices[], int majorDim = 0, long style = wxHORIZONTAL, char *name = "radioBox")
Creates the radiobox for two-step construction. Derived classes should call or replace this function. See wxRadioBox::wxRadioBox for further details.
void Enable(Bool enable)
Enables or disables the entire radiobox.
void Enable(int n, Bool enable)
Enables or disables an individual button in the radiobox (does nothing in XView).
int FindString(char *s)
Finds a choice matching the given string, returning the position if found, or -1 if not found.
int GetSelection(void)
Gets the id (position) of the selected string.
char * GetStringSelection(void)
Gets the selected string. This must be copied by the calling program if long term use is to be made of it.
int Number(void)
Returns the number of choices in the radiobox.
void SetSelection(int n)
Sets the choice by passing the desired string position.
void SetStringSelection(char * s)
Sets the choice by passing the desired string.
void Show(int item, Bool show)
Shows or hides individual radio box controls.
char * GetString(int n)
Returns a temporary pointer to the string at position n.