Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
Remove all pages from a TPagePanel |
Tue, Jan 26 2016 8:08 AM | Permanent Link |
Michael Dreher | Hi,
to remove all pages from a TPagePanel I've written a function procedure RemoveAllPages(pagePanel : TPagePanel); begin while (pagePanel.PageCount > 0) do pagePanel.Pages[0].Close; end; that was working fine until I compiled the code under 2.04 B1, where I get an - "can't access property ttab_setactive that is null or undefined" script error, when "RemoveAllPages" removed some pages, and the the next time a TPage constructor is called with: - page := TPage.Create(ppControl); Is something wrong removing pages this way? Please have a look. The complete code is in the attachment. Michael Dreher Attachments: PagePanelRemovePages.zip |
Tue, Jan 26 2016 12:05 PM | Permanent Link |
Trinione | Michael:
What about: PagePanel1.ActivePage := PagePanel1.Pages[i]; PagePanel1.RemoveActivePage; |
Tue, Jan 26 2016 1:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< that was working fine until I compiled the code under 2.04 B1, where I get an - "can't access property ttab_setactive that is null or undefined" script error, when "RemoveAllPages" removed some pages, and the the next time a TPage constructor is called with: >> Sounds like a bug. I'll have a fix for this in the next build. Tim Young Elevate Software www.elevatesoft.com |
Thu, Jan 28 2016 2:02 AM | Permanent Link |
Michael Dreher | Trinione wrote:
/// Michael: /// /// What about: /// PagePanel1.ActivePage := PagePanel1.Pages[i]; /// PagePanel1.RemoveActivePage; Thanks. I tried various methods.... procedure RemoveAllPages_OtherMethod(pagePanel : TPagePanel); begin while (pagePanel.PageCount > 0) do begin pagePanel.ActivePage := pagePanel.Pages[0]; pagePanel.RemoveActivePage(); end; end; procedure RemoveAllPages_Another_OtherMethod(pagePanel : TPagePanel); var k : integer; begin for k := pagePanel.PageCount - 1 downto 0 do begin pagePanel.Pages[k].Close(); end; end; procedure RemoveAllPages_Another_Another_OtherMethod(pagePanel : TPagePanel); var k : integer; begin for k := pagePanel.PageCount - 1 downto 0 do begin pagePanel.ActivePage := pagePanel.Pages[k]; pagePanel.RemoveActivePage(); end; end; ... but they all failed for the same reason. For study the code is in the attachment. Michael Dreher Attachments: PagePanelRemovePages.zip |
Thu, Jan 28 2016 10:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
It turns out that this was already fixed from another report, so it's "all good" for the next build. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 07:30 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |