
Sizers make the job of organize the elements in the screen for us. But first we have to some things to spaciate and organize the layout. So we will add some objects to the screen. The Layoutįirst of all we will create the layout. Here we can drag and drop controls and resources we want to build the screen. The first screen you see when create a new wxWidgets project is this: Follow that steps to create the new project. In the first article referenced in the Background section you can find a guide to create a wxProject in C::B. The better way to start is for the beginning, so open the Code::Blocks ide and create a new wxWidgets project.
#Code blocks wxwidgets tutorial how to#
The serial communication is implemented with a simple library you can find in this article with a brief description of how to use it, I explain how to use it in this article alsoīut instead of the list ports library used there I will use here another way to enumerate the ports.ĭon't worry, I will explain anyn aspect in detail. Introduction-to-wxWidgets-GUI-programming-with-wxSmith You can see how to download and compile it in this article:
#Code blocks wxwidgets tutorial code#
The examples of this article, and the code asociated, was maked with Code::Blocks using wxWIdgets 3.0.1. The idea is to go step by step explaining the code for any object separately, starting with the layout of the window and adding the diferent functions and necessary code progressively.


I will explaine how to use wxWidget evente-based timers to automatize some actions like read the serial imput buffer and display the information in the text field. In this article I will explain how to put some basic resources in a window to interact with the user, like buttons, text fields and combo boxes.Īs a bonus I will add a simple COM port library using a very basic one line terminal application as example.
