Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Menu StateButton Checked Changing
posted

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,

 

 

Parents
No Data
Reply
  • 5389
    Suggested Answer
    posted

    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~

Children