Jump to content
uniGUI Discussion Forums
mika

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.

Share this post


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

but instead create them by myself when they are actually needed.

Hello,

Well, you can create dynamically, right?

Share this post


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.

Share this post


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)

Share this post


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;

 

Share this post


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 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×