DIAdemヘルプ

Method: RemoveItems for TaskPanel

  • 更新日2024-09-12
  • 6分で読める

Method: RemoveItems for TaskPanel

Deletes all groups and entries in the TaskPanel of a user dialog box.

Object.RemoveItems
ObjectTaskPanel
Object with this method

The following example creates three groups with entries. If you click the Button1 button, the example deletes all groups and entries and creates two new groups with entries:

Sub TaskPanel1_EventInitialize(ByRef This)
  CreateDefaultTaskPanel(This)
End Sub

Sub Button1_EventClick(ByRef This)
  Call TaskPanel1.RemoveItems
  Call CreateNewPanel(TaskPanel1)
End Sub

Sub CreateDefaultTaskPanel(ByRef This)
  Call This.AddGroup("electricGroup", "Electric Tools")
  Call This.AddGroup("handtoolGroup", "Hand Tools")
  Call This.AddGroup("textonlyGroup", "Info")
  Call This.AddLinkItem("electricGroup","drill","Drill")
  Call This.AddLinkItem("electricGroup","saw","Saw")
  Call This.AddLinkItem("handtoolGroup","hammer","Hammer")
  Call This.AddLinkItem("handtoolGroup","screwdriver","Screw driver")
  Call This.AddLinkItem("handtoolGroup","tongs","Tongs")
  Call This.AddTextItem("textonlyGroup","version","Version 1.0")
End Sub

Sub CreateNewPanel(ByRef This)
  Call This.AddGroup("animalGroup", "Animals")
  Call This.AddGroup("plantsGroup", "Plants")
  Call This.AddLinkItem("AnimalGroup","mouse","Mouse")
  Call This.AddLinkItem("AnimalGroup","cat","Cat")
  Call This.AddLinkItem("PlantsGroup","tree","Tree")
  Call This.AddLinkItem("PlantsGroup","flower","Flower")
End Sub