Form Design Improvement Request

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Form Design Improvement Request

Post 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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Post 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.
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Re: Form Design Improvement Request

Post by Lowkus »

I've been using wxSmith in CodeBlocks.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Post 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.
Manolo
Can't get richer than this
Can't get richer than this
Posts: 827
Joined: Mon Apr 30, 2012 11:07 pm

Re: Form Design Improvement Request

Post 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.
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Re: Form Design Improvement Request

Post 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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Post by ONEEYEMAN »

Hi,
You have spacers to do the margins.
And for the BitmapButton can you post the screenshot?

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Form Design Improvement Request

Post 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).
Post Reply