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
460
How to insert code in Ulta Controls
posted

Hello Im new to Infragistics technologies and im trying the netadvantage for winforms.

 

I added this UltraToolbarsManager and I added some buttons on the control.

How can I put or insert my desired vb code to a specific button?

I double click different buttons on design time and it will just point me to the same event handler.

How can my appropriate code to the proper button on the control?

 

By the way..Im adding those buttons in the Ribbon(not sure if thats the correct term) so it will look like office 2007

Parents
No Data
Reply
  • 44743
    posted

    Ribbon is the correct term. All tools do fire the same event handler when they are clicked. You can determine which tool was pressed by getting the Tool.Key from the event args. The best way to handle your button click logic would be to add a Select Case statement to your ToolClick event handler. You can either add your logic in each case or you can have each case call off to a different method for handling an individual button. I personally like the latter because I can keep the button click logic for each button in separate methods and that makes them easier to navigate.

    As far as the Select Case goes, you can either code it manually or you can have a code generator in the UltraToolbarsManager create that code. At design-time, you can right-click the UltraToolbarsManager component in the component tray and select "Generate Tool Click Code". The dialog which opens is pretty straightforward.

Children
No Data