This forum is reserved for everything you want to talk about. It could be about programming, opinions, open source programs, development in general, or just cool stuff to share!
ONEEYEMAN wrote: ↑Tue Mar 16, 2021 2:35 pm
Are you stating the fact or asking the question?
stating a fact
ONEEYEMAN wrote: ↑Tue Mar 16, 2021 2:35 pm
Also - what does MFC has to do with wxWidgets/sizers?
As I can see, MFC's sizer is simpler and more flexible than wxWidgets' sizer.
But I'm not sure, so for open discussion.
If MFC's sizer is totally better than wxWidgets' sizer, I think it's very easy for wxWdigets to adopt it.
ONEEYEMAN wrote: ↑Tue Mar 16, 2021 2:35 pm
Are you stating the fact or asking the question?
stating a fact
Is it? Really? For a simple UI one might get this impression, but resizing the parent window is not the only use case where sizers can play an important role. For example, if you want a button or label to adjust to a different text length in an i18n application, you will soon experience the limitations of MFC. The sizers in wxWidgets give you full control over such issues.
Ronald wrote: ↑Wed Mar 17, 2021 7:01 am
As I can see, MFC's sizer is simpler and more flexible than wxWidgets' sizer.
But I'm not sure, so for open discussion.
This may be true only for the simplest use cases. For complex UI layouts you are much better off with the sizer concept of wxWidgets. wxWidgets' sizers can cope easily with different text lengths or different font sizes. AFAICT that is a nightmare in MFC.
Ronald wrote: ↑Wed Mar 17, 2021 7:01 am
If MFC's sizer is totally better than wxWidgets' sizer, I think it's very easy for wxWdigets to adopt it.
You are free to implement an MFC-like layout mechanism for wxWidgets, of course. However, IMHO your time would be invested better to learn the principles of wxWidgets' sizers to their full extent.
utelle wrote: ↑Wed Mar 17, 2021 7:47 am
For example, if you want a button or label to adjust to a different text length in an i18n application, you will soon experience the limitations of MFC. The sizers in wxWidgets give you full control over such issues.
Yes, with MFC's sizer, the position & size of a control are only adjusted according to size of the parent.
So it is not totally better than wxWidgets.
However, I think if both types of sizers are avaiable and well cooperates with each other, it'll be a nice feature for who that build the UI programmatically.
ONEEYEMAN wrote: ↑Wed Mar 17, 2021 3:15 pm
Why do you think that?
Is there a reason you are not satisfied with wxWidgets layout scheme?
When building UI with codes manually, sometimes nested sizers become a little deeper.
It's not a big deal, but I think for most cases a simpler sizer is enough and more human friendly.
I'm familiar with such layout system, but for me it's not so convenient as automatic sizers in wxWidgets and at least wxBoxSizer is as simple as it could be.
Kvaz1r wrote: ↑Thu Mar 18, 2021 12:02 pm
I'm familiar with such layout system, but for me it's not so convenient as automatic sizers in wxWidgets and at least wxBoxSizer is as simple as it could be.
MFC's layout system depends on the initial layout, wx's doesn't depends on the initial layout, in this case wx wins.
Hi,
Because MFC use (or used) the native Win32 API, where there only static positioning and sizes.
There is no sizers (or any other layout system) there.
You just D&D the control on the form, then resize it and have a static form which can't be changed easily.
wx sizers system is much more flexible.
(It's even better than "JAVASucks").