I recently discovered wxLua and I'm in love with it, despite only having written simple test scripts so far. I run a bunch of game servers and have to change a lot of passwords regularly, so I thought for my first program, to get the hang of wxLua, I'd write a simple random password generator.
Most of the utility programs I've written in the past were made in Visual Basic, and I haven't had to design many layouts programmatically recently, so I thought I'd use wxFormBuilder to get the rough layout, then read though the generated code and figure out how it all works. Problem is, I can't for the life of me figure out how to design any kind of layout other than a few controls in a line. The only video tutorials I could find went into detail about setting up the events, etc., and I was going to do all that by editing the Lua file afterwards; can't find anything that just shows how to do basic layouts.
This is the kind of layout I'm looking to make:
It took a couple of minutes to do that in Visual Basic, so I expected to be able to do it in wxFormBuilder in a few minutes, but I'm dumb apparently.
Could anyone give me some tips on how do basically anything in wxFormBuilder please? All I know so far is that I need to start with a frame and then a box spacer.
Need Help Getting Started in wxFormBuilder
Re: Need Help Getting Started in wxFormBuilder
In order to achieve that you need to know about "sizers" which is the layout element used in wxWidgets. You don't use absolute positioning, because the sizes of elements can change among different OS or user settings (font size etc).
http://neume.sourceforge.net/sizerdemo/
This is pretty confusing for most new wxWidgets users, but it's worth it.
Green = outer Vertical box sizer
Red = several Horizontal box sizers
Black = stretch spacers - needed to center the elements in between
Cyan = flexgridspacer - needed to make the text boxes align vertically
http://neume.sourceforge.net/sizerdemo/
This is pretty confusing for most new wxWidgets users, but it's worth it.
Green = outer Vertical box sizer
Red = several Horizontal box sizers
Black = stretch spacers - needed to center the elements in between
Cyan = flexgridspacer - needed to make the text boxes align vertically
Use the source, Luke!
Re: Need Help Getting Started in wxFormBuilder
Ah, nice. That looks like exactly what I needed. Thank you very much
Edit: Yep, got it exactly how I wanted it now. Thanks again!
Edit: Yep, got it exactly how I wanted it now. Thanks again!