DIAdemヘルプ

Method: Refresh for TaskPanel

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

Method: Refresh for TaskPanel

Triggers the EventRefresh event for a control in user dialog boxes. With the Refresh method you can refresh a control after another control modifies the data of the first control.

Object.Refresh
ObjectTaskPanel
Object with this method

The following example creates three groups with entries. If you disable or enable the CheckBox1 checkbox, the example expands or collapses the handtoolGroup group.

Sub CheckBox1_EventChange(ByRef This)
  Call TaskPanel1.Refresh
End Sub

Sub TaskPanel1_EventRefresh(ByRef This)
  If (CheckBox1.Value = 1) Then
    Call This.ExpandGroup("handtoolGroup")
  Else
    Call This.CollapseGroup("handtoolGroup")
  End If
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