You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-11-13 19:29:46 UTC
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.
itg-assistant commentedon Jun 12, 2026
Andrew Niese answered 2017-11-15 20:37:45 UTC
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