Examples_wxWidgets icon indicating copy to clipboard operation
Examples_wxWidgets copied to clipboard

Shows how to use wxWidgets controls only by programming code (c++17).

wxWidgets Examples

Shows how to use wxWidgets controls only by programming code (c++17).

wxwidgets

Hello World

  • HelloWorldEmoticons The classic first application HelloWorld with emoticons.
  • HelloWorldGenericStaticText The classic first application HelloWorld with wxGenericStaticText.
  • HelloWorldMessageDialog The classic first application HelloWorld with wxMessageDialog.
  • HelloWorldMessageDialog2 The classic first application HelloWorld with wxMessageDialog.
  • HelloWorldPaint The classic first application HelloWorld with wxEVT_PAINT event.
  • HelloWorldSay The classic first application "Hello, World!" with Say.
  • HelloWorldStaticText The classic first application HelloWorld with wxStaticText.
  • wxWidgetsHelloWorld The classic first application HelloWorld presented as skeleton by wxWidgets.

Applications

  • Application shows how to create a simple wxWidgets application with wxApp.
  • ApplicationAndAssert shows how to create a simple wxWidgets application and how to manage assert.
  • ApplicationAndException shows how to create a simple wxWidgets application and how to manage exception.
  • ApplicationAndMain shows how to create a wxWidgets application and main method with wxApp.
  • ApplicationAndMain2 shows how to create a wxWidgets application and main method with wxApp.
  • ApplicationIcon shows how to create a wxWidgets application and icon with wxApp.

Common Controls

  • ActivityIndicator shows how to create an ActivityIndicator widget with wxActivityIndicator.
  • AnimationCtrl shows how to create a AnimationCtrl widget with wxAnimationCtrl.
  • BitmapButton shows how to create a BitmapButton widget with wxBitmapButton.
  • Button shows how to create a Button widget and Event Click with wxButton.
  • CalendarCtrl shows how to create a CalendarCtrl widget with wxCalendarCtrl.
  • CheckBox shows how to create a CheckBox widget with wxCheckBox.
  • CheckListBox shows how to create a CheckListBox widget with wxCheckListButton.
  • Choice shows how to create a Choice widget with wxChoice.
  • ComboBox shows how to create a ComboBox widget with wxComboBox.
  • CommandLinkButton shows how to create a CommandLinkButton widget with wxCommandLinkButton.
  • Control shows how to create a Control widget with wxControl.
  • DirCtrl shows how to create a Directory Control widget with wxDirCtrl.
  • FileCtrl shows how to create a File Control widget with wxFileCtrl.
  • Gauge shows how to create a Gauge widget with wxGauge.
  • GenericStaticBitmap shows how to create a StaticBitmap widget with wxGenericStaticBitmap.
  • HyperlinkCtrl shows how to create an HyperLink widget with wxHyperlinkCtrl.
  • ListBox shows how to create a ListBox widget with wxListBox.
  • ListCtrl shows how to create a ListCtrl widget with wxListCtrl.
  • RadioButton shows how to create a RadioButton widget with wxRadioButton.
  • RichTextCtrl shows how to create a RichTextBox widget with wxRichTextCtrl.
  • RichToolTip shows how to create a RichToolTip widget with wxRichToolTip.
  • ScrollBar shows how to create a ScrollBar widget with wxScrollBar.
  • SearchCtrl shows how to create a SearchCtrl widget with wxSearchCtrl.
  • Slider shows how to create a Slider widget with wxSlider.
  • SpinCtrl shows how to create a SpinCtrl widget with wxSpinCtrl.
  • SpinCtrlDouble shows how to create a SpinCtrlDouble widget with wxSpinCtrlDouble.
  • StaticBitmap shows how to create a StaticBitmap widget with wxStaticBitmap.
  • StaticBitmap2 shows how to create a StaticBitmap widget with wxStaticBitmap.
  • StaticText shows how to create a StaticText widget with wxStaticText.
  • TaskBarIcon shows how to create a TaskBarIcon widget with wxTaskBarIcon.
  • TextCtrl shows how to create a TextCtrl widget with wxTextCtrl.
  • TobbleButton shows how to create a TobbleButton widget and Event Click with wxTobbleButton.
  • TreeCtrl shows how to create a TreeView widget with wxTreeCtrl.
  • WebView shows how to create a WebViewwidget with wxWebView.

Book Controls

  • AuiNotebook shows how to create a AuiNotebook widget with AuiNotebook.
  • Choicebook shows how to create a Choicebook widget with wxChoiceBook.
  • Listbook shows how to create a Listbook widget with wxListBook.
  • Notebook shows how to create a Notebook widget with wxNoteBook.
  • Simplebook shows how to create a Simplebook widget with wxSimplebook.
  • Toolbook shows how to create a Toolbook widget with wxToolbook.
  • Treebook shows how to create a Treebook widget with wxTreebook.

Picker Controls

  • ColourPickerCtrl shows how to create a ColourPickerCtrl widget with wxColourPickerCtrl.
  • DatePickerCtrl shows how to create a DatePicker widget with wxDatePickerCtrl.
  • DirPickerCtrl shows how to create a DirPickerCtrl widget with wxDirPickerCtrl.
  • FilePickerCtrl shows how to create a FilePickerCtrl widget with wxFilePickerCtrl.
  • FontPickerCtrl shows how to create a FontPickerCtrl widget with wxFontPickerCtrl.
  • TimePickerCtrl shows how to create a TimePicker widget with wxTimePickerCtrl.

Custom controls

  • DomainSpinCtrl shows how to create a DomainSpinCtrl widget with own wxDomainSpinCtrl (wxPanel with wxTextCtrl and wxSpinButton).
  • Line shows how to create a custom control Line from wxPanel.
  • NumericTextCtrl shows how to create a custom control NumericTextCtrl from wxTextCtrl.

Containers

  • CollapsiblePane shows how to create a CollapsiblePane container with wxCollapsiblePane.
  • Frame shows how to create a simple Frame container with wxFrame.
  • Panel shows how to create a simple Panel container with wxPanel.
  • RadioBox shows how to create a simple RadioBox container with wxRadioBox.
  • SplitterWindow shows how to create a simple SplitterWindow container with wxSplitterWindow and wxPanel.
  • StaticBox shows how to create a simple StaticBox container with wxStaticBox.

Menus and toolbars

  • AuiToolbar shows how to create a AuiToolbar widget with wxAuiToolbar.
  • MainMenu shows how to create a MainMenu widget with wxMenu.
  • Menu shows how to create a (contextual) Menu widget with wxMenu.
  • StatusBar shows how to create a StatusBar widget with wxStatusBar.
  • StatusBarWithoutPanels shows how to create a StatusBar widget with wxStatusBar.
  • ToolBar shows how to create a ToolBar widget with wxToolBar.

Window Docking

  • AuiManager shows how to create a AuiManager widget with wxAuiManager.
  • AuiNotebook shows how to create a AuiNotebook widget with AuiNotebook.
  • AuiToolbar shows how to create a AuiToolbar widget with wxAuiToolbar.

Components

  • ArtProvider shows how to create a simple ArtProvider component with wxArtProvider.
  • BusyCursor shows how to show or hide wxBusyCursor.
  • Config shows how to create a simple Config component with wxConfig.
  • Config2 shows how to create a simple Config component with wxConfig.
  • Cursor shows how to create a simple Cursor component with wxCursor.
  • ImageList shows how to create a simple ImageList component with wxImageList.
  • Timer shows how to create a simple Timer component with wxTimer.
  • ToolTip shows how to create a ToolTip component.

Common Dialogs

  • ColorDialog shows how to create a ColorDialog with wxColourDialog.
  • DirDialog shows how to create a DirDialog with wxDirDialog.
  • FontDialog shows how to create a FontDialog with wxFontDialog.
  • MultiChoiceDialog shows how to create a MultiChoiceDialog with wxMultiChoiceDialog.
  • NumberEntryDialog shows how to create a NumberEntryDialog with wxNumberEntryDialog.
  • OpenFileDialog shows how to create a OpenFileDialog with wxOpenFileDialog.
  • PasswordEntryDialog shows how to create a PasswordEntryDialog with wxPasswordEntryDialog.
  • RearrangeDialog shows how to create a RearrangeDialog with wxRearrangeDialog.
  • SaveFileDialog shows how to create a SaveFileDialog with wxSaveFileDialog.
  • SingleChoiceDialog shows how to create a DirDialog with wxSingleChoiceDialog.
  • SymbolPickerDialog shows how to create a SymbolPickerDialog with wxSymbolPickerDialog.
  • TextEntryDialog shows how to create a TextEntryDialog with wxTextEntryDialog.

Dialogs

  • AboutBox shows how to create a AboutBox with wxAboutBox.
  • BusyInfo shows how to create a BusyInfo with wxBusyInfo.
  • FindReplaceDialog shows how to create a FindReplaceDialog with wxFindReplaceDialog.
  • GenericAboutBox shows how to create a GenericAboutBox with wxGenericAboutBox.
  • GenericFindReplaceDialog shows how to create a GenericFindReplaceDialog with wxGeenericFindReplaceDialog.
  • GenericProgressDialog shows how to create a GenericProgressDialog with wxGenericProgressDialog.
  • MessageDialog shows how to create a MessageDialog with wxMessageDialog.
  • NotificationMessage shows how to create a NotificationMessage with wxNotificationMessage.
  • PrintAbortDialog shows how to create a PrintAbortDialog with wxPrintAbortDialog.
  • ProgressDialog shows how to create a ProgressDialog with wxProgressDialog.
  • Wizard shows how to create a Wizard with wxWizard.

Custom Dialogs

  • UserDialog shows how to create a UserDialog with wxDialog.

Events

  • ApplicationIdle shows how to create an application and catch idle event.
  • CustomEvent shows how to create a CustomEvent event with wxCommandEvent.
  • FrameAndEvents shows how to create a Frame and catch some events.
  • FrameClick shows how to create a Frame and catch click event.
  • FramePaint shows how to create a Frame and catch paint event.
  • KeyEvents shows how to create a Frame and catch key events.
  • MouseEvents shows how to create a Frame and catch mouse events.
  • ProcessEvent shows how to override ProcessEvent method.

Painting

  • DeviceContext shows how to create a form and catch paint event.
  • GraphicsContext shows how to create a form and catch paint event.

OpenGL

  • Dice shows how to create a wxGLCanvas and wxGLContext.

Others

  • AutoScroll shows how to create an auto scroll widget with wxPanel.
  • BitmapButtonWithLabel shows how to create a Button with Bitmap and Label widget with wxButton.
  • BoxedPanel shows how to create boxed panels with wxPanel and wxBoxSizer.
  • ColoredFrames shows how to create colored background forms.
  • Colors demonstrates the use of wxControl widget with wxColour..
  • CursorFromFile shows how to create Cursor from cur or ani file with wxCursor.
  • DirDialogShowWindowModal shows how to create a DirDialogWindowModal with wxDirDialog.
  • DisplayInformations shows how to get screen information of wxDisplay.
  • FrameAndThread shows how to dialog with a frame widget from a thread.
  • FrameAndThreadWithCallAfter shows how to dialog with a frame widget from a thread with CallAfter method.
  • FrameIcon shows how to assign an icon to frame.
  • FrameShow shows how to display a frame in different ways.
  • MdiFrame shows how to create a MDI (Multiple Document Interface) frame.
  • MessageDialogShowWindowModal shows how to create a MessageDialog dialog with wxMessageDialog using ShowWindowModal method.
  • OpenFileDialogShowWindowModal shows how to create a OpenFileDialogShowWindowModal dialog with wxFileDialog using ShowWindowModal method.
  • SaveFileDialogShowWindowModal shows how to create a SaveFileDialogShowWindowModal dialog with wxFileDialog using ShowWindowModal method.
  • OpenFileDialogWindowModal shows how to create a OpenFileDialogWindowModal with wxOpenFileDialog.
  • SaveFileDialogWindowModal shows how to create a SaveFileDialogWindowModal with wxSaveFileDialog.
  • StaticBoxAndCheckBox shows how to use wxStaticBox and wxCheckBox.
  • StaticBoxAndRadioButton shows how to use wxStaticBox and wxRadioButton.
  • StaticTextAndUnicode demonstrates the use of wxStaticText widget and Unicode text.
  • TextCtrlMultiline shows how to create a multiline TextCtrl widget with wxTextCtrl.
  • TextEntryDialogPassword shows how to create a password TextEntryDialog dialog with wxTextEntryDialog.
  • TextEntryDialogMultiline shows how to create a multiline TextEntryDialog dialog with wxTextEntryDialog.
  • UserDialogShowWindowModal shows how to create a UserDialog with wxDialog using ShowWindowModal method.

Download

git clone https://github.com/gammasoft71/Examples_wxWidgets Examples_wxWidgets

Build and run

To build this project, open "Terminal" and type following lines:

Windows

mkdir build && cd build
cmake ..
start wxWidgetsExamples.sln

Select any project and type Ctrl+F5 to build and run it.

macOS :

mkdir build && cd build
cmake .. -G "Xcode"
open ./wxWidgetsExamples.xcodeproj

Select any project and type Cmd+R to build and run it.

Linux with Code::Blocks :

mkdir build
cd build
cmake .. -G "CodeBlocks - Unix Makefiles"
xdg-open ./wxWidgetsExamples.cbp > /dev/null 2>&1

Select any project and type F10 to build and run it.

Linux :

mkdir build
cd build
cmake ..
cmake --build . --config Debug
./AnyProject

Remarks

This project run with wxWidgets 3.1.4 or above and CMake 3.0 or above.