I’m currently learning wxWidgets that I’m finding quite flexible so far. However, when I move to wxFormBuilder in order to create more complex UI, it becomes painful. Let me give you a quick example that builds just fine in Visual Studio 2022 (just putting the MainFrame.cpp here):
#include "MainFrame.h"
#include <wx/wx.h>
#include <vector>
MainFrame::MainFrame(const wxString& title) : wxFrame(nullptr, wxID_ANY, title)
{
wxPanel* panel = new wxPanel(this);
wxButton* button = new wxButton(panel, wxID_ANY, "Button", wxPoint(300, 275), wxSize(200, 50));
}
When I’m trying to create the same in wxFormBuilder, it complains as soon as I want to add a panel to my main frame. It seems it absolutely wants me to use the AUI Manager. Without aui_managed selected for my frame, there’s no way I can add any widget, whereas it is totally possible to implement while coding the app manually.
Am I missing something or is it a constraint in wxFormBuilder? When I select AUI Manager at Frame level, I can add widgets but I have to deal with a lot more complexity as widgets now come with AUI and a whole set of new properties. A simple button for instance comes with border, caption, close button etc. and I can’t even attach it to the pane but only to the frame. I don’t understand the rational of adding this constraint.