Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 16 total
Thread Simple Form Builder using ElevateDB
Wed, Oct 29 2014 10:03 AMPermanent Link

Trinione

Hi:
Currently I use D2007 and see little reason to pay such a steep price to upgrade to XEx when I can get my work done using D2007 and components.

Building db related forms to be monotonous and repetitive though, so I looked about and did not find what I was looking for to so I went ahead and wrote some code.

Basically, this is how it works:
1 - Select a Database
2 - List all the tables and fields in a Grid
3 - Check the fields that I need on the form
4 - Create the PAS and DFM code
5 - Save the code in a selected folder with the file name and type name set properly
6 - Add New file to project

NOTE: I have developed it using TMSSoftware components, but if you don't use this you can EASILY modify the code to use any component. Just follow the basic logic and change the code accordingly.

This is version 0.01, and I have it that all selected fields create Edit boxes. Drop downs comes next, followed by the DB Navigation option etc.

The Grid has fields for the type of data and the Label of the field.

This makes it much faster for me to create the forms I want.

Yes, I know that Delphi has tools, but I found it difficult to just have a Simple Form as a starter, and I just use the IDE to move the components around.

Is this code worth sharing.



Attachments: screenshot01.jpg
Wed, Oct 29 2014 11:52 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Trinione


>Currently I use D2007 and see little reason to pay such a steep price to upgrade to XEx when I can get my work done using D2007 and components.

I'm on D2006 and I agree.

>Building db related forms to be monotonous and repetitive though, so I looked about and did not find what I was looking for to so I went ahead and wrote some code.

>Is this code worth sharing.

Anything like this is worth sharing, wether people use it or not is up to them. I unlikely to use it because my DB related forms are anything but monotonous, monsterous and annoying yes but monotonous no, however, I do usually have a number of simple forms as well and it may speed things up there.

I've put a lot of my code into either the extensions or binaries, I am using some stuff that others have shared so its worth it.


Roy Lambert
Thu, Oct 30 2014 6:02 PMPermanent Link

Adam Brett

Orixa Systems

Trinione

Really happy to see and share this code. I personally use DevEx components which include some really fancy auto-form capabilities (which the user can even update / edit at run-time). They cost money, but for me it is worth it in the time-saving.

Before you do too much (if you can afford the DevEx components) check them out. I am pretty sure they work with D2007 (I use XE2, but used D2007 with DevEx for ages). There is a demo here: https://documentation.devexpress.com/#WindowsForms/CustomDocument4922

Note that I have written a bit of automation code for the Datalayout, which means it can be made to construct user-forms at Runtime. I do not do any GUI coding at all as a result. I leave it to my users, having coded systems for the app to auto-create something decent without any work from me.

If this is of interest I am happy to share it.
Fri, Oct 31 2014 1:53 PMPermanent Link

Trinione

Adam:
Thanks. But, I am pretty much committed to TMSSoftware components.

What I posted is really a starter, since I am going to be developing my own Wizard to create apps in the manner I create them. I really just need a quick way to create my programs. For example, I don't use the Navigation Bar much, but a TMS Select List. I just want to click a checkbox, and the form is created along with the EDB components etc. Fast and easy.

I know that TMS has something similar, however, it is not available for D2007 Frown And, I really cannot justify the cost nor need to upgrade to XE at the ridiculous upgrade price. D2007 and external components really does just about all that I need pretty much.

When I get thru with the basic stuff I will put it on here. I am sure someone, somewhere, at some time would find it useful as well.
Sat, Nov 1 2014 6:52 PMPermanent Link

Barry

>Adam Brett wrote:

Trinione

Really happy to see and share this code. I personally use DevEx components which include some really fancy auto-form capabilities (which the user can even update / edit at run-time). They cost money, but for me it is worth it in the time-saving.

Before you do too much (if you can afford the DevEx components) check them out. I am pretty sure they work with D2007 (I use XE2, but used D2007 with DevEx for ages). There is a demo here: https://documentation.devexpress.com/#WindowsForms/CustomDocument4922

Note that I have written a bit of automation code for the Datalayout, which means it can be made to construct user-forms at Runtime. I do not do any GUI coding at all as a result. I leave it to my users, having coded systems for the app to auto-create something decent without any work from me.

If this is of interest I am happy to share it.
<

Adam,

I'm certainly interested if you are using Delphi VCL and not WinForms. Smile

If you are creating dynamic forms, how do you handle the conditional code for the form?
By that I mean when they tab from one field I need to conditionally move to a different field. Or color the field depending on value entered. Or do validation on the field value when they leave the field.

I'd love to be able to load a (DWScript?) script from the database to execute code conditional code for the form. But I don't see how this is possible.

Can you shed some light on dynamic forms and if they can be customized?

TIA

Barry
Sun, Nov 2 2014 6:53 PMPermanent Link

Trinione

To be clear, this program uses the database as a starting point to create starter forms only.

For example, with TMS components there are properties like 'Label alignment' that can be set when the DFM and PAS files are created.

Once the DFM and PAS files are created, the PAS file is added to the Project.

An example for the results of the first screenshot are included in the screenshot attached to this post.



Attachments: screenshot02.png
Mon, Nov 3 2014 3:42 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Trinione


I appreciate that you're going to be using the TMS component set but are you aware that the IDE (at least as far as D2006) already provides very similar functionality?

Drop a table on a form, Double click to open the fields editor, ctrl-F to populate with all the fields, click the fields you want on the form, drag'n'drop and the IDE will populate the form.

If you want to change from TEdit to TAdvEdit then a very simple program can do a bit of search & replace (StringReplace(xx,'TEdit','TAdvEdit',[rfREplaceAll])

Roy Lambert
Mon, Nov 3 2014 4:42 AMPermanent Link

Adam Brett

Orixa Systems

Barry


>>I'm certainly interested if you are using Delphi VCL and not WinForms. Smile

Yes I am using VCL. The DevEx guys seem to be maintaining VCL, even if they are a bit more committed to Visual Studio

>>If you are creating dynamic forms, how do you handle the conditional code for the form?
>>By that I mean when they tab from one field I need to conditionally move to a different field.
>>Or color the field depending on value entered. Or do validation on the field value when
>>they leave the field.

Conditional colouring of fields is fairly easy to do (i.e. Red for value outside expected range) with the DataLayout you can locate "ControlByFieldName", so you can move around forms cleverly too.

The Datalayout has grouping and groups can be made visible or not easily. This allows groups of fields to pop open or disappear, which might achieve the functionality you want.

>>I'd love to be able to load a (DWScript?) script from the database to execute code
>>conditional code for the form. But I don't see how this is possible.

Most conditional issues of this type I solve at the business-object level (i.e. not in the GUI), i.e. rather than writing code on the Form, I have code in the OnChange of the field. This allows lots of DB-level activity based on values entered by the user, without having to touch the GUI.

>>Can you shed some light on dynamic forms and if they can be customized?

I would say that there is no customization process I have been unable to achieve with DevEx Datalayout ... but it is not cheap, and there is a learning curve.

I think you can download a trial, and I would be happy to send some units of pascal with some of my helper-functionality.
Mon, Nov 3 2014 12:26 PMPermanent Link

Barry

Adam Brett wrote:

>I would say that there is no customization process I have been unable to achieve with DevEx Datalayout ... but it is not cheap, and there is a learning curve.

I think you can download a trial, and I would be happy to send some units of pascal with some of my helper-functionality.<

That sounds great. Can I reach you by email?

Barry
Tue, Nov 4 2014 6:47 AMPermanent Link

Adam Brett

Orixa Systems

Barry

I am "at" fullwellmill.co.uk

First part of email is my first name.
Page 1 of 2Next Page »
Jump to Page:  1 2
Image