![]() | Products |
| Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
| Messages 1 to 4 of 4 total |
| Sat, Oct 5 2024 6:18 PM | Permanent Link |
Artur2024 | How to programmatically remove Pages from TPagePanel and how to add new Pages?
Thank you |
| Sat, Oct 5 2024 7:32 PM | Permanent Link |
erickengelke | Artur2024 wrote:
> How to programmatically remove Pages from TPagePanel and how to add new Pages? Here's the code with two buttons, one to add a page and one to delete it. It seems short enough to post here. Erickc unit pageexample; interface uses WebCore, WebUI, WebForms, WebCtrls, WebBtns, WebPages, WebCtnrs; type TForm1 = class(TForm) Button1: TButton; PagePanel1: TPagePanel; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } page : TPage; public { Public declarations } end; var Form1: TForm1; implementation procedure TForm1.Button1Click(Sender: TObject); var button : TButton; begin if not assigned( page ) then begin page := pagepanel1.NewPage; page.tab.caption := 'Something'; button := TButton.Create( page ); button.Top := 30; button.Left := 30; end; end; procedure TForm1.Button2Click(Sender: TObject); begin if assigned (page ) then begin page.Free; page := Nil; end; end; EWB Programming Books and Nice Component Library See my EWB BLOG posts, at: http://www.erickengelke.com |
| Sun, Oct 6 2024 11:57 AM | Permanent Link |
Artur2024 | Thank you very much for your help, I couldn't handle it.
I see that without this fragment: button := TButton.Create( page ); button.Top := 30; button.Left := 30; everything works too. Does it matter? |
| Sun, Oct 6 2024 9:06 PM | Permanent Link |
erickengelke | Artur2024 wrote:
I see that without this fragment: { button := TButton.Create( page ); button.Top := 30; button.Left := 30; } everything works too. Does it matter? It was just showing how to create something on a page. Just filler. It's not needed. Erick EWB Programming Books and Nice Component Library See my EWB BLOG posts, at: http://www.erickengelke.com |
This web page was last updated on Saturday, May 9, 2026 at 08:16 AM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

