Commit 30d605aa authored by gambas's avatar gambas
Browse files

WebTree: Fix selection management.

[GB.WEB.GUI]
* BUG: WebTree: Fix selection management.
parent dab3489f
Pipeline #518555562 passed with stage
in 22 minutes and 4 seconds
......@@ -305,3 +305,33 @@ Public Sub btnCheck_Click()
WebTable1.ShowCheck = Not WebTable1.ShowCheck
End
Public Sub WebTree1_Expand()
lblTreeEvent.Text = "Expand: " & WebTree1.Item.Key
End
Public Sub WebTree1_Collapse()
lblTreeEvent.Text = "Collapse: " & WebTree1.Item.Key
End
Public Sub btnShowCheckTree_Click()
WebTree1.ShowCheck = Not WebTree1.ShowCheck
End
Public Sub WebTree1_KeyPress()
lblTreeEvent.Text = "KeyPress: " & Key.Shortcut
End
Public Sub WebTree1_Select()
lblTreeEvent.Text = "Select: " & WebTree1.Selection.Join()
End
......@@ -232,8 +232,21 @@
}
Index = 3
Text = ("Tab 4")
{ WebHBox4 WebHBox
#MoveScaled(1,1,133.75,6)
Spacing = True
{ btnShowCheckTree WebButton
#MoveScaled(1,1,15,4)
Text = ("Check")
}
{ lblTreeEvent WebLabel
#MoveScaled(17,1,30,4)
Expand = True
Border = True
}
}
{ WebTree1 WebTree
#MoveScaled(1,1,133.75,49)
#MoveScaled(1,8,133.75,49)
Expand = True
Mode = Select.Multiple
ShowHeader = True
......
......@@ -833,6 +833,7 @@ Public Sub _SetSelected(sKey As String, bSelected As Boolean)
Endif
$hSelection.SelectItem(sKey, bSelected)
Raise Select
End
......@@ -1199,7 +1200,7 @@ Private Sub PrintItem(hItem As _WebTreeItem, iLevel As Integer, bVisible As Bool
Else
Print "<input type=\"checkbox\"";
Endif
Print " id=\""; Me.Name & ":" & Base64(sKey); "\" class=\"gw-tree-check\"";
Print " id=\""; Me.Name & "!" & Base64(sKey); "\" class=\"gw-tree-check\"";
'Print Me._GetUpdateJS("onchange", "!" & CStr(iRow), "this.checked");
If _IsSelected(sKey) Then Print " checked";
Print ">";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment