Quantcast
Channel: Programming – Truelogic Blog
Browsing all 135 articles
Browse latest View live

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 Article


6e. 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 Article


6f. 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 Article

6g. 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 Article

7.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 Article


7a.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 Article

7b.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 Article

7c.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 Article


7d.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 Article


8.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 Article

8a.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 Article

8b.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 Article

8c.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 Article


8d.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 Article

8e.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 Article


8f.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 Article

9.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 Article


9a. 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 Article

9b.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 Article

9c. 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
Browsing all 135 articles
Browse latest View live