PanelPages.Delete

Syntax:

Delete(<Page>)

Parameters:

<Page> (required)

Type: Number; PanelPage.
Number of the page to be deleted from the collection or the page.

Description:

Deletes a page from a collection of panel pages. All the controls located on that page are also deleted. If there was only one page, the controls located on that page are deleted, and a new page is added to the panel.
If the "Do not separate by pages" mode is set, all the controls are located on the same page and will be deleted only when all the pages are deleted.

Availability:

Thick client.

Example:

//Deleting unnecessary pages
IndexOf = 0;
While 
= 1 Do
    If IndexOf > Controls.Panel.Pages.Count()-Then
        Break;
    EndIf
; 
    PanelPage = Controls.Panel.Pages[IndexOf];
    If 
AccumulationRegistersTable.Find(PanelPage.Name,"Name") = Undefined Then
        Controls.Panel.Pages.Delete(IndexOf);
        Continue
;
    EndIf
;
    IndexOf = IndexOf + 1;
EndDo
; 
Controls.Panel.CurrentPage = Controls.Panel.Pages[0];


    

1C:Enterprise Developer's Community