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

Form Design Improvement Request

Postby Lowkus » Wed Nov 07, 2018 5:07 pm

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: 2752
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Postby ONEEYEMAN » Wed Nov 07, 2018 5:23 pm

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: 51
Joined: Sun May 01, 2016 2:48 am

Re: Form Design Improvement Request

Postby Lowkus » Wed Nov 07, 2018 6:19 pm

I've been using wxSmith in CodeBlocks.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2752
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Postby ONEEYEMAN » Wed Nov 07, 2018 6:41 pm

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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 603
Joined: Mon Apr 30, 2012 11:07 pm

Re: Form Design Improvement Request

Postby Manolo » Wed Nov 07, 2018 7:31 pm

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: 51
Joined: Sun May 01, 2016 2:48 am

Re: Form Design Improvement Request

Postby Lowkus » Wed Nov 07, 2018 11:36 pm

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: 2752
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Form Design Improvement Request

Postby ONEEYEMAN » Thu Nov 08, 2018 3:58 am

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: 1741
Joined: Sun Jan 03, 2010 5:45 pm

Re: Form Design Improvement Request

Postby PB » Thu Nov 08, 2018 6:44 am

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


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 1 guest