This is a simple question but its hard to explain -
In my programs, I put GUI, DB/File access, Program specific algorithms, general utils, myvars, etc. in separate units.
My question relates to updating the GUI display.
Take a simple application with 3 levels of info on the screen --->
1. Customer info
2. Invoice Header
3. Invoice details
On the Customer level I have a Next and Prev buttons.
On the Invoice Header I have Next and Prev Buttons.
Now the question:
If my user clicks on any of the Next/Prev buttons I will call my db/file access units to fill myvars with data and then call (as required):
DisplayCustomer;
DisplayInvoiceHeader;
DisplayInvoiceDetails;
To keep my Form definition unit smaller I would like something like this
Procedure OnClickNextCustomer(....);
begin
GetNextCustomer;
DisplayCustomer;
DisplayInvoice;
DisplayInvoiceDetails;
end;
The GetNextCustomer is easy = its in my db/file access unit.
But the DisplayCustomer/Invoice/InvoiceDetails is trickier to put in a separate unit, as the form components are described at a higher level. For many applications this would not be a problem because of the the number of fields usually displayed, My application has hundreds of fields, and to make my units more readable, I want to isolate the 'Display' programming down to a unit.
Ideas appreciated
Thanks all