Multiple problems in wxWidgets Layout Application

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Multiple problems in wxWidgets Layout Application

Post by doublemax »

Yeah, that'll be hard to do with a single grid-based sizer.

I drew some boxes representing different sizers and the sizer structure:
dentalorganizerdatosgenerales-sizers.png

Code: Select all

red - wxBoxSizer vertical 
  green  - wxBoxSizer horizonzal
    blue - wxBoxSizer vertical
      cyan - wxBoxSizer horizonal
      cyan - wxBoxSizer horizonal
      cyan - wxBoxSizer horizonal
    blue - wxBosSizer vertical
The structure goes deeper until you reached the inner most controls

It will be difficult - but not impossible - for a beginner to write this sizer code by hand. Do it step by step, so that you can detect and fix errors right away. Trying to find a mistake in a big sizer structure is very difficult, even for experienced users.

So maybe you should try a graphical GUI editor for this.
Use the source, Luke!
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Multiple problems in wxWidgets Layout Application

Post by DavidHart »

bgining2this, unless something has changed, you're using CodeLite; and that comes with a graphical GUI editor: wxCrafter.
Peter H
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Mar 12, 2021 12:29 pm

Re: Multiple problems in wxWidgets Layout Application

Post by Peter H »

Yes, wxCrafter is inbuilt to Codelite, but especially for beginners I would wholeheartedly recommend Dialogblocks. I have tried both.

Reasons:
The implementation of GridBagSizer in wxCrafter is not very helpful.
In Dialogblocks controls can be inserted by point and click to a grid coordinate of GridBagSizer and controls can be moved by drag and drop in the grid.
(Unfortunately this is not supported for containers, in this case the coordinates must be changed manually)
It is possible to insert or remove columns and rows in a GridBagsizer, without changing all the coordinates manually.
(GridbagSizer is only available in the paid version, unfortunately, but for professional use the price is a no-brainer, and for Hobbyists it is affordable)
By pressing F5 you get instantly an accurate and functional preview of your dialog.
It has inbuilt searchable full documentation of the whole wxWidgets API, right click on a control, choose "describe" and you get full description for it including methods, inheritance, usage, portability and include file.
It can compile wxwidgets, so you can ensure compilation of your project and wxWidgets is in sync and these linkage problems that are often discussed here are avoided.
It generates makefiles for gcc and others and projects for VSStudio up to VS2017, a beta version that supports VS2019 is here:http://www.dialogblocks.com/DialogBlock ... -Setup.exe

Thats just my experience, your needs or mileage might vary.
(Disclaimer: I have only tried the windows versions of both)
If you dont decide to buy it, you can still use the inbuilt documentation and use it to build wxWidgets.
Post Reply