Hello,
I created a menu with few Menu "statebutton".
File
--> Menu Checked 1
--> Menu Checked 2
I would like : When I click on the menu "Menu Checked 1" that a value is "True" and the "Menu Checked 2" is False...etc...
When I can to do ? Have you a sample code in Vb.Net ?
Regards,
Rom76,
Try handling the UltraToolbarsManager's ToolClick event and use code like the following:
Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick If e.Tool.Key = "StateButtonTool1" Then Dim stateButton1 As StateButtonTool = CType(e.Tool, StateButtonTool) Dim stateButton2 As StateButtonTool = CType(e.Tool.ParentCollection("StateButtonTool2"), StateButtonTool) stateButton2.Checked = Not stateButton1.Checked ElseIf e.Tool.Key = "StateButtonTool2" Then Dim stateButton2 As StateButtonTool = CType(e.Tool, StateButtonTool) Dim stateButton1 As StateButtonTool = CType(e.Tool.ParentCollection("StateButtonTool1"), StateButtonTool) stateButton1.Checked = Not stateButton2.Checked End If End Sub
Hope this helps,
~Kim~
Kim,
Thank you for your response....
I tried your program :
Private
Sub MenuPrincipal_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles MenuPrincipal.ToolClick
Select Case e.Tool.Key
Case "Option1"
Dim stateButton1 As Infragistics.Win.UltraWinToolb***ateButtonTool = CType(e.Tool, Infragistics.Win.UltraWinToolb***ateButtonTool)
Dim stateButton2 As Infragistics.Win.UltraWinToolb***ateButtonTool = CType(e.Tool.ParentCollection("Option2"), Infragistics.Win.UltraWinToolb***ateButtonTool)
stateButton2.Checked =
Not stateButton1.Checked
Case "Option2"
Dim stateButton2 As Infragistics.Win.UltraWinToolb***ateButtonTool = CType(e.Tool.ParentCollection("Option1"), Infragistics.Win.UltraWinToolb***ateButtonTool)
End Select
End Sub
I'm not understand, I'm not see in my menu the "check" on the menu ?
Have you got a sample in VB.Net
Thank you.