user interface - Use of Frames in Delphi for GUI information hiding -


I have been learning Delphi for the past 3 years at a hobby / professional level. I am happy to say that I have progressed so much that I can look back at my initial code with scary and embarrassing. That's why I am going through some of my early apps and re-writing / reconstructing them.

One of the worst habits I am trying to go away from one unit is reaching components from another form. In an effort to implement this, I am experimenting with using frames as a method of hiding information. So instead of having a form with components on it, I am creating a frame to hold all the form components, then placing it on a form on the frame, taking the frame declaration in private announcements,

< Pre> type TMyForm = class (TForm) Private MyFrame: TMyFrame; Process SetTimeDate (const value: TMyItem); Function Readtime: TMyItem;

Then register the frame in the form initialization section

  Start the Initialization Registerclasses ([TMyFrame])  

I, then declare the properties which are required in the public block of the form unit, which have access to the frame and its components.

  Public Property Time: ToToverTMTT To write ReadTimeDate;  

I am often using frames to strengthen repetitive component groups.

It seems that I want to work (to hide microgram and its components), but does anyone have any experience of this method?

Is there a defect in using frames? Am I really receiving any benefit from doing this? Is there a problem in using nested frames within the frame? Is there a good practice guide for using frames in Delphi? Are there hidden / easy ways to get the same effect in relation to hidden GUI information in Delphi?

HMCG

It seems that there are still many arguments in your UI layer Are there. Forms / panels should not have that value property (perhaps leaving for dialog).

If you want more structure than reading on the MVC pattern.

After saying this, frames can be a good way to organize the GUI. Do not use too much, just like everything else.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -