back to gui 

wxChoice

generated from ../src/mod_gui/control/choice.cpp

A choice item is used to select one of a list of strings. Unlike a listbox, only the selection is visible until the user pulls down the menu of choices. An example:


	 var items = new Array();
	 items[0] = "Opel";
	 items[1] = "Ford";
	 items[2] = "BMW";
	 // dlg is a wxDialog
	 var choice = new wxChoice(dlg, -1, wxDefaultPosition, wxDefaultSize, items);
   

Constants

Constructor

wxChoice

wxChoice()
 
wxChoice(Parent, 
         Id, 
         Position = wxDefaultPosition, 
         Size = wxDefaultSize, 
         Items = null, 
         Style = 0, 
         Validator = null)
 
Name Type Default Description
Parent wxWindow The parent of the control
Id Integer An window identifier. Use -1 when you don't need it.
Position wxPoint wxDefaultPosition The position of the choice control on the given parent.
Size wxSize wxDefaultSize The size of the choice control.
Items Array null An array of Strings to initialize the control.
Style Integer 0 The style of the control
Validator wxValidator null A validator

Constructs a new wxChoice object.

Properties

Name Type Description
columns Integer Gets/Sets the number of columns

Methods

create

create(Parent, 
       Id, 
       Position = wxDefaultPosition, 
       Size = wxDefaultSize, 
       Items = null, 
       Style = 0, 
       Validator = null) : Boolean
 
Name Type Default Description
Parent wxWindow The parent of the control
Id Integer An window identifier. Use -1 when you don't need it.
Position wxPoint wxDefaultPosition The position of the choice control on the given parent.
Size wxSize wxDefaultSize The size of the choice control.
Items Array null An array of Strings to initialize the control.
Style Integer 0 The style of the control
Validator wxValidator null A validator

Creates a wxChoice

Events

onChoice Called when an item is selected. The type of the argument that your handler receives is wxCommandEvent.


SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxControlWithItems

Constructor

wxChoice

Properties

columns

Methods

create

Events

onChoice


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.