wxListBox::wxListBox

void wxListBox(void)

Constructor, for deriving classes.

void wxListBox(wxPanel *parent, wxFunction func, char *label, Bool multiple_selection = wxSINGLE, int x = -1, int y = -1, int width = -1, int height = -1, int n, char *choices[], int style = 0, char *name = "listBox")

Constructor, creating and showing a list box.

func may be NULL; otherwise it is used as the callback for the list box. 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 as the listbox label.

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 list box.

n is the number of possible choices, and choices is an array of strings of size n. wxWindows allocates its own memory for these strings so the calling program must deallocate the array itself.

multiple_selection is wxMULTIPLE or TRUE for a multiple selection list box, wxSINGLE or FALSE for a single selection list box.

The name parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual listboxes.