Jump to content

Disabling automatic component creation


Recommended Posts

Is it possible to prevent certain components to be created automatically?

I have fairly large forms (ie. they have lot of components) and they are too slow to load because of that. It would be great if, for example, I could prevent certain panels and their children not being created automatically when the form opens but instead create them by myself when they are actually needed.

Any help would be greatly appreciated.

Link to post
Share on other sites

Yes I could but that would be very cumbersome task as each panel I would have to create dynamically contains many components (anywhere from 2-3 to 20-30). That's why creating each component dynamically isn't viable option. However, if I can only create parent panel containing all of those components, that would solve my problem.

Link to post
Share on other sites
29 minutes ago, mika said:

Yes I could but that would be very cumbersome task as each panel I would have to create dynamically contains many components (anywhere from 2-3 to 20-30). That's why creating each component dynamically isn't viable option. However, if I can only create parent panel containing all of those components, that would solve my problem.

Maybe you should use a frame or a form that will contain all the components and create dynamically (frame, form)

Link to post
Share on other sites

BTW, mika you can use GEpxperts:

http://www.gexperts.org/

it could automatically convert (selected) components into the code:

var
  UniListBox1: TUniListBox;

  UniListBox1 := TUniListBox.Create(Self);

  UniListBox1.Name := 'UniListBox1';
  UniListBox1.Parent := UniGroupBox1;
  UniListBox1.Left := 8;
  UniListBox1.Top := 17;
  UniListBox1.Width := 305;
  UniListBox1.Height := 84;
  UniListBox1.Hint := '';
  UniListBox1.TabOrder := 1;
  UniListBox1.MultiSelect := True;

 

Link to post
Share on other sites

Thank you for your answers. I was thinking about frames. Frames will introduce some other issues but that might still be the way to go. Tokays option might also be useful in some situations.

Thanks :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...