cvefa Posted August 18, 2018 Posted August 18, 2018 Hi everyone, How can i find and remove dynamicly created object on runtime ? I want to find Panelx1 (dynamicly created.) and remove. is it possible ? UniSession.AddJS('if (Ext.get("Panelx1")) {Ext.get("Panelx1").remove();}'); mypanel := TUnipanel.Create(Self); with Tunipanel(InsertControl(mypanel)) do begin Caption := '1'; LayoutConfig.Flex := 1; layoutconfig.Height := '100%'; Parent := UniContainerPanel1; Name := 'Panelx1'; end; Thanks Quote
Wilton Ergon Posted August 18, 2018 Posted August 18, 2018 for x:=0 to unicontainerpanel.componentscount -1 do begin if unicontainerpanel.components[x]) is tunipanel then if tunipanel(unicontainerpanel.components[x])).name='Panelx1' then unicontainerpanel.components[x]).free; end; Quote
cvefa Posted August 19, 2018 Author Posted August 19, 2018 Thanks wilton_rad Not need to find again client side. delphi code is enought. Quote
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.