Jump to content

Dynamically create and remove components on unitabsheet


d.bernaert

Recommended Posts

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;

Link to comment
Share on other sites

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?

Link to comment
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...