6d. wxWidgets – Event Propagation
OVERVIEW In the previous section we saw how events are generated and handled. Most events are derived from the wxCommandEvent class. There are some events [...]
View Article6e. wxWidgets – Vetoing Events
OVERVIEW Continuing from the previous section where we looked at event propagation, in this section we see how to cancel processing events. Event processing may [...]
View Article6f. wxWidgets – Using Window Identifiers
OVERVIEW Every control or widget that you create is given an id. An id can be system-generated or it can be a predefined system id [...]
View Article6g. wxWidgets – Using Bind and Unbind
OVERVIEW As mentioned before in a previous section, Bind is the preferred way to do event handling. The main advantage of Bind is that you [...]
View Article7.wxWidgets – Dialogs
OVERVIEW Dialogs are windows that require some interaction from the user. Generally dialogs are modal i.e until the user interacts with the dialog, the dialog [...]
View Article7a.wxWidgets – wxMessageDialog
OVERVIEW In the sample code below, we will invoke 4 different kinds of system dialogs when a button is clicked. SAMPLE CODE dialog-messages.h dialog-messages.cpp main.h [...]
View Article7b.wxWidgets – wxFileDialog
OVERVIEW In the sample code below, we use the wxFileDialog to select a text file , whose contents are then shown in a textbox. SAMPLE [...]
View Article7c.wxWidgets – wxFontDialog
OVERVIEW In the sample code below, we display a line of text and then use the wxFontDialog to change the font . We have added [...]
View Article7d.wxWidgets – Creating Custom Dialog
OVERVIEW We now create a custom dialog which takes the code from the two previous sections and puts them together to show a dialog where [...]
View Article8.wxWidgets – Widgets Part 1
OVERVIEW In this section we take a look at controls and widgets which are commonly used. 8.Widgets Part 1 8a.wxCheckBox 8b.wxBitmapButton 8c.wxToggleButton 8d.wxStaticLine 8e.wxStaticText 8f.wxSlider
View Article8a.wxWidgets – wxCheckBox
OVERVIEW A wxCheckBox acts as a toggle control – either it is checked or not checked. We can set a 3-state checkbox as well, but [...]
View Article8b.wxWidgets – wxBitmapButton
OVERVIEW We use wxBitmapButton when we want to show an image on a button. We can also show text along with the image, in which [...]
View Article8c.wxWidgets – wxToggleButton
OVERVIEW wxToggleButtons are like checkboxes in that they represent two states- true or false. Except here, they generate a command event every time since they [...]
View Article8d.wxWidgets – wxStaticLine
OVERVIEW wxStaticLine lets you draw horizontal or vertical lines in a window. The default style is horizontal unless your specify a wxLI_VERTICAL style. For both [...]
View Article8e.wxWidgets – wxStaticText
OVERVIEW We have used wxStaticText a lot in the previous examples. It is used to display either a single or multiple lines of text. In [...]
View Article8f.wxWidgets – wxSlider
OVERVIEW wxSliders allow the user to control a range of values , which represent the starting and ending point of the slider. Every time the [...]
View Article9.wxWidgets – Widgets Part 2
OVERVIEW Under this section we look at some more advanced widgets. 9.Widgets Part 2 9a. wxListBox 9b.wxNoteBook 9c. wxScrolledWindow 9d. wxGrid
View Article9a. wxWidgets – wxListBox
OVERVIEW A wxListBox is a list which displays strings as items. It can select either a single item or multiple items. In the code below, [...]
View Article9b.wxWidgets – wxNoteBook
OVERVIEW A wxNotebook is basically a tab control which lets you group controls together in tab sections. In the sample code below, we create a [...]
View Article9c. wxWidgets – wxScrolledWindow
OVERVIEW wxWidgets provides a class called wxScrolled<T> which is a template for specialized scrolling classes. It has two implementations of this class: wxScrolledCanvas wxScrolledWindow In [...]
View Article