Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 7 of 7 total |
Destroy Panel Run Time |
Mon, Mar 14 2016 7:17 AM | Permanent Link |
Pasquale Web Pos srl | How do i check if there is a TPanel create at RUN-TIME ?
How I do DESTROY this TPanel ? |
Mon, Mar 14 2016 7:34 AM | Permanent Link |
squiffy Telemix Ltd. | The "Free" method will destroy most objects.
To identify the runtime ones over design time ones, you can either use the "tag" property on the panel (setting it to, for example, 1 if it's a runtime creation), or else you could keep your own TObject array. Then you could loop over either your own object array or the form's Component list (to pull out the ones with a tag=1). Hope that makes sense. |
Mon, Mar 14 2016 7:40 AM | Permanent Link |
Pasquale Web Pos srl | How do I point the object (ricaricheonline named) if I create a RUN-TIME ?
If i write ricaricheonline.free the compiler generate error . squiffy wrote: The "Free" method will destroy most objects. To identify the runtime ones over design time ones, you can either use the "tag" property on the panel (setting it to, for example, 1 if it's a runtime creation), or else you could keep your own TObject array. Then you could loop over either your own object array or the form's Component list (to pull out the ones with a tag=1). Hope that makes sense. |
Mon, Mar 14 2016 7:44 AM | Permanent Link |
squiffy Telemix Ltd. | (posted this in answer to your other question - should have been here )
You would either need to create a tobject array and loop through to find the object you require, or you can loop through the form's Component array - again this is pseudocode as I can't test right now : for i := 0 to Form1.ComponentCount - 1 do begin if (Component[i] is TPanel) then if Component[i].Tag = 1 then Component[i].Free; end; Might not be 100% correct but it shows the principle. You could further check to see if it's name is the one you are looking for. There are examples of TObject Array in the docs. |
Mon, Mar 14 2016 8:25 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Pasquale,
<< the compiler generate error . >> Please post the error message. Tim Young Elevate Software www.elevatesoft.com |
Mon, Mar 14 2016 8:46 AM | Permanent Link |
Matthew Jones | Pasquale wrote:
> How do i check if there is a TPanel create at RUN-TIME ? > > How I do DESTROY this TPanel ? You might like to read my post at http://matthew-jones.com/making-a-prettier-grid-in-elevate-webbuilder/ where I do this, and keep objects with references to the components for access. -- Matthew Jones |
Mon, Mar 14 2016 8:56 AM | Permanent Link |
squiffy Telemix Ltd. | One other thing - because you're playing with the created object you might find it slightly easier if you do this :
Instead of creating the object on the "with" line, assign the newly created object to a variable, then use that in the "with" |
This web page was last updated on Wednesday, October 9, 2024 at 05:37 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |