Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Putting a Frame on a Form

Putting a Frame on a Form

Using Delphi 7.

We created a Date Picker Frame so that we could just drop it onto our forms.  The problem that is happening is that once the Date Picker Frame is placed correctly and then the form is saved, you can no longer open the Form in design mode.

We get a Message:
Error Reading Form
List index out of bounds(2).  Ignore the error and continue?

Ignoring the error and we get:
Error creating form: Access violation at address 4002EBE8 in module 'rtl70.bpl'.  Read of address 0000000C.


Thanks for the help in advance.

Tom Cusick

RE: Putting a Frame on a Form

>We created a Date Picker Frame

You mean you created a component, a custom control?

Sounds like it's buggy.  Post code.

RE: Putting a Frame on a Form

I've attached the pas file because it's over 1000 lines long and didnt want to put it all in here...  I just added the PAS file...  if you want the form too just let me know

RE: Putting a Frame on a Form

Well since it really is a frame, there are some requirements to getting frames to behave on a form.  I use frames quite a bit and always load them at run-time.

My frames are in separate units like yours and are defined in the public section of my main form.


  TMainForm = class(TForm)
    ActionList1: TActionList;    //actions:
    PageControl: TPageControl;   //tabs:
    TabSheetDept: TTabSheet;
    TabSheetPrGrp: TTabSheet;
    { Public declarations }
    DeptFrame: TDeptFrame;       //frames:
    PrGrpFrame: TPrGrpFrame;

My primary frames are created in the OnCreate() of my main form, which loads the frames into TTabSheet(s) of a TPageControl.


  DeptFrame:= TDeptFrame.Create(Self);
  DeptFrame.Parent:= TabSheetDept;
  DeptFrame.Align:= alClient;

  PrGrpFrame:= TPrGrpFrame.Create(Self);
  PrGrpFrame.Parent:= TabSheetPrGrp;
  PrGrpFrame.Align:= alClient;
And of course Freed in my OnDestroy.  This particular app has over a dozen frames.  The rest are created and loaded only when the parent tab is selected, then freed when another tab is selected.

Although you posted your frame unit code, you haven't shown how it is called.  I suspect that may be where your problem is.  You may simply have to define the frame's parent and alignment as shown.

Delphi Rules!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close