WebTree: In single selection mode, you can't unselect the selected item with the mouse anymore.

[GB.WEB.GUI]
* BUG: WebTree: In single selection mode, you can't unselect the selected item with the mouse anymore.
* BUG: WebTree: Settings the Mode property correctly update the control.
This commit is contained in:
Benoît Minisini 2022-10-29 16:52:41 +02:00
parent 4202851f8a
commit c734ead9c1
4 changed files with 30 additions and 2 deletions

View file

@ -359,3 +359,15 @@ Public Sub WebTextArea1_KeyPress()
WebForm.Print("WebTextArea1: keypress: " & Key.Shortcut)
End
Public Sub btnCopy_Click()
WebTextArea1.Copy()
End
Public Sub btnMultiple_Click()
WebTree1.Mode = If(WebTree1.Mode = Select.Single, Select.Multiple, Select.Single)
End

View file

@ -196,8 +196,15 @@
List = [("Élément 1"), ("Élément 2"), ("Élément 3"), ("Élément 4"), ("<i>Élément 5</i>"), ("Élément 6"), ("Élément 7"), ("Élément 8"), ("<span style=\"color:red;\">Élément 9</span>"), ("Élément 10"), ("Élément 11"), ("Élément 12")]
UseHTML = True
}
{ WebHBox6 WebHBox
#MoveScaled(1,46,128.75,6)
{ btnCopy WebButton
#MoveScaled(1,1,16,4)
Text = ("Copy")
}
}
{ WebTextArea1 WebTextArea
#MoveScaled(1,46,128.75,16)
#MoveScaled(1,53,128.75,16)
Height = "8em"
}
Index = 2
@ -264,8 +271,12 @@
#MoveScaled(1,1,15,4)
Text = ("Check")
}
{ btnMultiple WebButton
#MoveScaled(17,1,15,4)
Text = ("Multiple")
}
{ lblTreeEvent WebLabel
#MoveScaled(17,1,30,4)
#MoveScaled(33,1,30,4)
Expand = True
Border = True
}

View file

@ -540,6 +540,8 @@ End
Private Sub Mode_Write(Value As Integer)
$iMode = Value
UnSelectAll
Me.Refresh
End

View file

@ -1298,6 +1298,9 @@ gw = {
elt.focus();
if (!event && !checked)
return;
if (event && event.shiftKey && last)
gw.table.checkRange(id, last, row, checked);
else