d.bernaert Posted August 29, 2022 Share Posted August 29, 2022 Hi, I'm trying to create dynamically controls on a unitabsheet and recreate them in function of a selection of the user. I see some weird behaviour when trying to remove components, components that are on another tabsheet become visible on the tabsheet where i remove the components. I'm using this routine to remove the components: I := Unitabsheet.ControlCount - 1; While I >= 0 do begin WorkControl := Unitabsheet.Controls[I]; if assigned(WorkControl) then FreeAndNil(WorkControl); Inc(I, -1); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 29, 2022 Share Posted August 29, 2022 Hello Dominique, 16 minutes ago, d.bernaert said: I see some weird behaviour when trying to remove components, components that are on another tabsheet become visible on the tabsheet where i remove the components. Hmm, how can we reproduce this issue? Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted August 29, 2022 Author Share Posted August 29, 2022 I will try to create a testcase Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted August 29, 2022 Author Share Posted August 29, 2022 Think i found it. I was trying to remove components when the form was not yet in the ready state. Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted August 29, 2022 Author Share Posted August 29, 2022 Still having problems. Here included is a very simple test case. Problemdynamiccreate.zip 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.