Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 304545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:17:26+00:00 2026-05-12T07:17:26+00:00

I have been learning Delphi for the last 3 years, on a hobby/occupational level.

  • 0

I have been learning Delphi for the last 3 years, on a hobby/occupational level. I am happy to say that I have now progressed to the point that I can look back on my early code with horror and embarrassment. So I am now going through some of my early apps and rewriting/ refactoring them.

One of the bad habits I am trying to get away from is accessing components on one form from another unit. In an effort to enforce this, I have been experimenting with using frames as a method of information hiding. So instead of having a form with components on it, I am creating a frame to hold all the form components, then placing the frame on a form, moving the frame declaration into the private declarations,

type
  TMyForm = class(TForm)
   private
    MyFrame: TMyFrame;
    procedure SetTimeDate(const Value: TMyItem);
    function ReadTimeDate:TMyItem ;

then registering the frame in the form initialization section

initialization 
begin
RegisterClasses([TMyFrame])

I am then declaring the properties I need in the public section of the form unit, which has access to the frame and its components.

  public
    property TimeDate: TOverlayItem  read ReadTimeDate  write SetTimeDate;

I am also using frames to consolidate often repeated component groups.

This seems to work for the purposes I want (hiding Myframe and its components), but does anyone else have any experience of this method?

Are there any drawbacks with using frames?
Am I actually gaining any benefit from doing this?
Are there any problems with using nested frames within frames?
Are there any good practice guides to using frames in Delphi?
Are there better/ easier ways of achieving the same effect with regard to GUI information hiding in Delphi?

HMcG

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:17:26+00:00Added an answer on May 12, 2026 at 7:17 am

    It sounds like you are still having a lot of logic in your UI layer. Forms/Panels shouldn’t have that much Value properties (except maybe for Dialogs).

    If you want more structure than read up on the MVC pattern.

    Having said all that, Frames can be a good way to organize the GUI. Like with everything, don’t overuse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been learning C++ for three months now and in that time created
I have been learning to use Emacs for a little while now. So far
I have been learning C++ with some books from school that are from the
I have been learning Scala for the past couple of months and now I
I have been learning python for some time now. While starting this learning python
I have been learning GWT and Hibernate together for the last few weeks and
I have been learning php for sometime now. Besides reading books and doing tutorials
I have been learning about various functional languages for some time now including Haskell,
I have been learning ASP.NET MVC in the last few months and I think
I have been learning Xcode 4.2 for a bit now and still can't get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.