Learn how to program cross platform graphical user interfaces in C++ using wxWidgets.
All the GUIs we've created so far use absolute positioning and fixed size controls. As a result, they do not scale when the window is resized!
It is also too easy to create UIs which look good on one platform and not another.
We start by taking the easy way out - preventing the application from scaling at all! This approach may be alright for some very simple applications, but usually we want our applications to scale gracefully.
Next, we try to implementing a very simple adaptive layout "manually".
We detect when the window size changes and then reposition and rescale a control accordingly. Unfortunately, this approach is quite error prone and it also doesn't handle platform differences well.
The best solution turns out to be abandoning absolute positioning and using so called sizers instead!
The next few videos in this series will cover sizers in detail.
wxWidgets website:
[ Ссылка ]
Support me on Patreon:
[ Ссылка ]
Chapters:
0:00 - Welcome!
0:07 - Bad UI Scaling
0:29 - Sample Application
1:13 - Prevent Resizing!
2:02 - Manual Adaptive Layout
4:37 - Platform Differences
5:19 - Sizers
Ещё видео!