jj 13.12 ribbon close on mouse click

This commit is contained in:
Jonathan Jenne
2017-12-13 14:56:19 +01:00
parent d49297816a
commit d061c5e0b5
2 changed files with 20 additions and 48 deletions

View File

@@ -238,6 +238,16 @@ Public Class frmConstructor_Main
End If
End Sub
Private Sub AddRibbonCloseHandler(controls As Control.ControlCollection)
For Each c As Control In controls
AddHandler c.MouseClick, Sub()
MAIN_FORM.CloseRibbon()
End Sub
If c.Controls.Count > 0 Then
AddRibbonCloseHandler(c.Controls)
End If
Next
End Sub
Private Sub frmForm_Constructor_Main_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim sw As New Stopwatch
@@ -252,6 +262,8 @@ Public Class frmConstructor_Main
CONSTRUCTORID = CURRENT_CONSTRUCTOR_ID
Me.Cursor = Cursors.WaitCursor
AddRibbonCloseHandler(Controls)
Init_Grid_Control()
'Catch ex As Exception
' ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)