<div dir="ltr"><div dir="ltr">On Mon, Dec 14, 2020 at 11:59 PM Larry Dalton via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am trying to create a tcomponent that will be a tpanel with align set at albottom that will have several tbitbtns, the first of which will be kind bkclose. I want to set that button’s onclick procedure to close the form that the tpanel is on. What is the best way to write the onclick procedure?<br></blockquote><div><br></div><div>TButtonPanel already does what you are planning. You can study its code and then either inherit your own component from it or create a new one.</div><div><br></div><div>Regards,</div><div>Juha</div><div><br></div></div></div>