ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

generic form designer

<< < (2/2)

mnemonic:
I struggled a bit at first, but it gets easier.  Here's an example screen:

generic form designer

So, here's a hierarchy of how I lay things out (not sure of this is the proper way, but it works for me):

Project
-- Frame (if screen can co-exist with others) or a dialog (if a screen should take all focus away from its parent)
-----Panel
-------PanelSizer (vertical)
---------Horizontal sizer for each row

Once you've got them all into position, you just need to play with the proportion settings of each component on each sizer.  Once this is done, I copy the code, refactor and then tweak manually to line things up.

The code that comes out of wxFormBuilder is relatively clean.  I guess that anything that comes out of a "drag and drop" designer tends to be messy as it has to worry about the absolute positioning of each component (this might also cause all kinds of issues when expanding the window).

slowmaker:
Thanks, mnemonic. That looks like a good approach, and it's a darn sight clearer that any of the so-called documentation I found so far. I'll make a note of it.

I guess that anything that comes out of a "drag and drop" designer tends to be messy as it has to worry about the absolute positioning of each component (this might also cause all kinds of issues when expanding the window).
-mnemonic (January 03, 2010, 04:25 AM)
--- End quote ---
Nope. The drag and drop designer's output tends to be very clean precisely because it doesn't 'worry' about the positioning at all; it just spits out the coords you left the component at, and that's that. My only problem with them is that they are usually for a different language, or the designer had different ideas about code layout than I do. It doesn't cause window-expanding issues for me because these simple little programs I do don't have resizing windows; the ones that do are generally single-component (like Notepad), which is a no-brainer to handle.

My ideal solution would actually be drag-and-drop, absolute positioning, with no code output at all; just a csv text file with the coordinates and properties of each component. Then anyone could script something to mash that data into whatever format they wanted.

Thanks again for all the help, guys.

Cyeb:
What language is this for? :D  Didn't really look around the site.  I'm pretty sure you didn't mean any languages like Visual Basic, did you?  Otherwise somebody else would have posted it?  If a VB.net kind of thing is what you're looking for, why not try C#?

Edit:  No wait wait, I see now that it is for C++, XRC, and python.  SharpDevelop and Visual Studio are IDE's for C#, and they come with form designer type of things, which are very easy to use...Not sure how it compares to wsFormBuilder, but it's nearly as easy as Visual Basic.

Navigation

[0] Message Index

[*] Previous page

Go to full version