Monday, 20 October 2014

Quickly Populating a Form in Data Forms Action! for Linux


When building GUI applications, there can sometimes be a lot of tedious work involved in getting controls onto your form, laying them out and then binding them to data.


Once you've decided on the data you want to display on a Form, the next step usually involves building a query to get the data and then drag-n-dropping each control onto the form; and finally binding each control to it's respective column on whichever resultset it takes its data from.


Adding a Data View control to a form and binding to a Datasource.


Adding Labels and Fields bound to the Data View.


But wouldn't it be nice to automate that a bit, so that you can could create the controls and bind them directly as you drop them on the Form?

Well that's what Data Forms Action! now allows you to do via the 'Quick Controls' context menu.

This popup dialog allows you to take any columns from a dataset which is bound to a data view, listbox or drop-down combo and directly create controls that can be placed straight onto the Form.



The Quick Controls dialog.


So here it is step by step.

1. Drag a data view onto the Form and bind it to a dataset.

2. Right-click the context menu to get the Quick Controls dialog.

3. Select the columns you want to appear on the Form and choose whether they are labels or fields.

4. Drag the controls directly onto the Form.



5. Ready to Run!


Obviously that's still a bit rough n' ready to accept as the final product, but with some minor adjustments that can be improved.

So after some small changes, resizing the controls and giving the name label a background color, here's the final result.

This was created on Linux Mint, and all without writing one line of code.

See what you can do with your data, download the demo here:
 Data Forms Action! 

No comments:

Post a comment