Hi.
I am new to programming and to the Infragistics.
I have one Dropdownbutton, and in the popupmenu i have two state buttons.But i dont know howe to get this buttons in actions.
I have got this ultratoolbarsmanager_toolclick, but i dont find the state buttons there.
This is only for state buttons, regular buttons and the actions when i click them is no problem.The problem is to tell the Grid to go from "Normal" view to Cardview.
So I hope sombody can help me with this.I have VS2008, Infragistics win 8,3 and using VB.Net for programmingThanks for the help, and Sorry for my BAD English ;-)
I'm not sure I understand the problem. Is the ToolClick event not firing at all when you click the StateButtonTools, or are you trying to make the StateButtonTool mutually exclusive, like radio buttons? If the ToolClick event is not firing, it could be a bug and I would recommend submitting the sample to the support group: http://es.infragistics.com/gethelp. If you want to make only one of the StateButtonTools checked at once, add an item to the OptionSets collection on the UltraToolbarsManager. Then set this as the OptionSet on each of the StateButtonTools. Only one StateButtonTool in each OptionSet can be checked at a time.
Thanks for the answer.What I am trying to do is this.
With "normal" buttons it's easy to give the buttons a commando, but with this state buttons in the PopUpMenuToolDesigner I am totally lost.
Button1:I having a UltraGrid, and I want the end user to switch between Card view and "normal/grid" view.Checked=Card view and unchecked = "normal/grid"
Button2:I also want them to show the Outlook Group ByChecked=Show Outlook Group By and unchecked = Hide Outlook Group By
I think I have been looking in all your help pages and forums, but I can't still find anything to help me about this.
I hope someone can help me with this.
The ToolClick event should be fired when the Checked state is changed. If it is not being fired, it is a bug and should be submitted to the support group.
Thanks, that is what i was looking for.
Thanks for the quick replay and for the help
You can use code like this:
Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick Select Case e.Tool.Key Case "Blå" Dim stateButtonTool As Infragistics.Win.UltraWinToolbars.StateButtonTool = e.Tool
If (stateButtonTool.Checked) Then Me.BackColor = Color.Blue Else Me.BackColor = Color.Red End If Case "Sort" Dim stateButtonTool As Infragistics.Win.UltraWinToolbars.StateButtonTool = e.Tool
If (stateButtonTool.Checked) Then Me.BackColor = Color.Black Else Me.BackColor = Color.White End If End SelectEnd Sub
What my problem is is that I don't know how to make this code (for me it seems like this is the problem). I am new to programming and to Infragistics, so that's why this is tricky for me.
This is what I try to do, this should be simple...
Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick
Select Case e.Tool.Key
Case "Blå"
'her I try to put in a If code.
'If "Blå" checked=true then me.backcolor=color.blue
'If "Blå" checked=false then me.backcolor=color.empty
Me.BackColor = Color.Blue
Case "Sort"
'The same her.....
Me.BackColor = Color.Black
End Select
End Sub
Case "blå" and "Sort" are State Buttons (here I use the Option set)This I only make for an example, this is not what I going to do, but this will explain how the State Button on a PopUpMenu works.
If I only use the Me.BackColor = Color.Blue it works fine, but I want to have If this then that or else her.
Can you please help give me an example on how to do this??
Thanks for the help.