When a panel has a header visible, a double-click collapses and expands it. How can we make it happen on a single click/tap?
You can set the AutoShow property to Never (otherwise the single click will auto show the panel) and then set Collapsed to true|false in the Click, Tap or MouseClick. Check the location of the click in case the panel is expanded using the Control.MousePosition global property.
Thanks, that works. Some code like this can be used for multiple panels on the same form:
Private Sub Panel1_Click(sender As Object, e As EventArgs) Handles Panel1.Click, Panel2.Click, Panel3.Click, Panel4.Click, Panel5.Click
If boolEnableSingleClickPanels Then
Dim boolHeaderClicked As Boolean = TryCast(sender, Wisej.Web.Panel).PointToClient(Control.MousePosition).Y < 0
If boolHeaderClicked Then TryCast(sender, Wisej.Web.Panel).Collapsed = Not TryCast(sender, Wisej.Web.Panel).Collapsed
End If
End sub
Please login first to submit.