Page 1 of 1

Form Design Improvement Request

Posted: Wed Nov 07, 2018 5:07 pm
by Lowkus
Form designing with wxWidgets is a pain, it would be nice if it could have padding and margin amounts for controls, similar to how .Net allows spacing around controls. It also needs buttons that allow pictures and text with better alignment options, such as a picture centered dead middle of the button with text aligned at the bottom of the button.

Re: Form Design Improvement Request

Posted: Wed Nov 07, 2018 5:23 pm
by ONEEYEMAN
Hi,
Which tool are you trying to use, if any?
Or are you doing the design and development by hand?

There is a tool called wxGlade, which you can download, install and run.
You can design a form as WISYWIG, and then look at the resulting form to see how it will look like in the application.

There are also other RAD tools that made specifically for helping to design the different forms in wxWidgets. Some are integrated in the IDE, such as CodeBlocks and CodeLite (I believe wxSmith and wxCrafter respectfully).

Choose you poison.

Thank you.

Re: Form Design Improvement Request

Posted: Wed Nov 07, 2018 6:19 pm
by Lowkus
I've been using wxSmith in CodeBlocks.

Re: Form Design Improvement Request

Posted: Wed Nov 07, 2018 6:41 pm
by ONEEYEMAN
Hi,
Try wxGlade (latest one).
There is also wxCrafter.

I believe somewhere in wxWiki was a list of all RAD tool available for wxWidgets design.

Thank you.

Re: Form Design Improvement Request

Posted: Wed Nov 07, 2018 7:31 pm
by Manolo
i
t would be nice if it could have padding and margin amounts for controls, similar to how .Net allows spacing around controls
This is achieved by using wxSizer's https://docs.wxwidgets.org/trunk/overview_sizer.html .
It also needs buttons that allow pictures
wxBitmapButton https://docs.wxwidgets.org/trunk/classw ... utton.html
and text with better alignment options, such as a picture centered dead middle of the button with text aligned at the bottom of the button.
See wxBitmapButton styles

Using wxSmith is good... if you understand how it does what it does (see the code it generates). Don't forget that using sizers is much much much better than using fixed positions.

Re: Form Design Improvement Request

Posted: Wed Nov 07, 2018 11:36 pm
by Lowkus
Margin and Padding are not fixed positions on the form, rather they are fixed distances from the edge of a control. Margin and Padding properties are far superior to using sizers; using sizers to pad the space between form objects is like using transparent GIF's to align objects on web pages, it's a hack and needs to be replaced with something better.

wxBitmapButton does not do what I am asking for, it has some alignment options but is incapable of centering an image while placing text at the bottom.

Re: Form Design Improvement Request

Posted: Thu Nov 08, 2018 3:58 am
by ONEEYEMAN
Hi,
You have spacers to do the margins.
And for the BitmapButton can you post the screenshot?

Thank you.

Re: Form Design Improvement Request

Posted: Thu Nov 08, 2018 6:44 am
by PB
I am confused: sizers and padding/margin/border are two different and not mutually exclusive features?

All items in the sizers can have borders (i.e., a gap around them)*, the limitation is that its size cannot be different for each side (and the drawer cannot be drawn). The spacers have their use as well...

As for buttons: wxWidgets is free for all OSS but unfortunately it does not have any powerful company backing it. So all changes and additions are done by individual contributors, hence you, just as anyone else, are welcome to submit patches improving its features. Even if you refuse to spend your time and effort on doing that, you could at least ask about adding a new feature in the developer forum (this is the user forum).