mika Posted March 4, 2019 Share Posted March 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2019 Share Posted March 4, 2019 22 minutes ago, mika said: but instead create them by myself when they are actually needed. Hello, Well, you can create dynamically, right? Quote Link to comment Share on other sites More sharing options...
mika Posted March 4, 2019 Author Share Posted March 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2019 Share Posted March 4, 2019 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) Quote Link to comment Share on other sites More sharing options...
Tokay Posted March 4, 2019 Share Posted March 4, 2019 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; Quote Link to comment Share on other sites More sharing options...
mika Posted March 4, 2019 Author Share Posted March 4, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.