This is my final version of FFLite.bas and FFUltra.bas Both help build GUI code using a visual editor. Lite is the first one you should fire up and see how easy it is to create a GUI, pen the code and preview it. Ultra will import old .bas files and let you tweak the forms the code contains. Then you can export the changes maintaining the integrity of the original .bas file.
Lite is really easy to use, there is help text but you should not need it, just play!
The application opens with a blank project set at 320 x 360 with a visible snap to grid set at 10 pixels. The default window type is window_nf and colors are black on white.
The default font is Consolas 9. When starting a project it is best to set the screen size, snap to grid, colors and font that you like prior to adding controls.
Use the right hand set of comboboxes to adjust those settings. You can amend these settings during project development but existing controls will not automatically snap to the new settings. They will need repositioned. The grid size can be from 1 to 30 and be set visible or invisible. Controls can be moved to the very edge of the form but no more. You can expand the form at any time. This snap to grid means that you can set out your controls with great precision and regimentation.
The area you see gridded represents the client area of the window you are building. If you need more room just increase the X or Y. Above that gridded area the left hand set of comboboxes offer these options:
File Restore New Save .ffu Load .ffu ----------- Write .bas (FFUltra) Export .bas (FFUltra)
Add New StatictText TextBox ListBox ComboBox Button BmpButton GraphicBox RadioButton CheckBox GroupBox Texteditor Menu
Preview The .bas will be written and run as preview.bas
Preview neatly allows you to have a peek at how your GUI is looking, close it and continue developing or choose to write the .bas to a file name of your choice.
If you have a .ffu project started you can reload that, [Restore] will load the last working session. Every session is automatically stored, just close the application. On restart select [Restore] and the .ffu session will be restore. Use [Save] to write projects away permanently to a named .ffu file. [New] will start a new .ffu project named Untitled.
To create a GUI form, set the size and then add a control of your choice from the [Add New] combobox. It will appear on the form at the insertion point. You can move the insertion point by left clicking on the form. If you add a control the insertion point will automatically move down ready for the next insertion. When you add or highlight a control you can use CtrlC and then CtrlV to copy and paste it again. You may also delete any highlighted control by pressing Del.
When the form is highlighted you may reposition it with the mouse or expand it. Click on the bottom right quadrant to expand the control. Or anywhere else on the control to move it. It will highlight in green while expanding and red while moving or highlighted.
When you move or expand the control it will snap to the nearest grid point. This keeps the controls regimented and of equal size. Single line text controls will adopt the height of the font and will not shrink beyond the height of the font. You can amend the grid color and size at any time.
You can select the background and foreground color for the whole project, certain controls can have their own background color. So too with fonts, certain controls can have their own font. A control's font and color can be set and reset at will.
When you right click on the form a Property window will open. If no control is highlighted the property window will contain info about the project. If a control is highlighted then the property window will contain info about that control. The name, text content and resource can be amended and will be stored and used. The property window also contains info about the project itself, the file name, the window type and the form name. The latter two can be amended in the properties window, the file name is amended during the save process.
You can name the control, the controls text content and say array$( or .bmp resource associated with the control. Generally speaking anywhere you see a ? means that the property should be given a meaningful name by yourself.
At any time you may click on the [Preview] button to see your GUI live. Close the GUI window to return to your project. Once you are happy that the project is complete enough to save then use [Write] to write the .ffu and .bas file simultaneously. A filedialog will present with the project name and let you choose where to save the file to.
If you are using FFUltra you can [import] a .bas file. All forms contained within the .bas will be listed in the #form combobox. When you import a .bas the first form found is loaded, there after you can load other forms via the #form combobox.
You can amend the controls and then [export] the changes back to the .bas file. Only the form selected will be amended, If you wish to amend several forms then export each one as it is amended. When you export changes they are saved to the .bas and the amended .bas is reloaded and redisplayed.
If you have not tried this tool yet perhaps the approaching holiday is time to give it a go. It is an easy way to create neat GUI applications. It even writes the code for you. Its strength is in its ease of use, a few clicks of the mouse and you will be placing controls, resizing and repositioning till your happy. Then the next surprise, click on preview and see your ACTUAL GUI!
This took a few seconds to click together. Its all about getting those pesky x,y width, height numbers easily.
Once that was done I clicked on PREVIEW and get to see the real GUI, and the code is all written for you!