Change of control owner

Post Reply
Natter
Posts: 1232
Joined: Mon May 14, 2007 9:49 am

Change of control owner

Post by Natter »

Hi,

There are 2 controls on the window - a Tbutton and a TPanel. I need to tell the TButton that it belongs to the TPanel. How can this problem be solved ?
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Change of control owner

Post by Antonio Linares »

Dear Yuri,

When you create the TButton you use .. OF <TPanelObject>

Another way is to use Windows API function SetParent()
https://learn.microsoft.com/en-us/windo ... -setparent
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply