Hello All,
I am using Infragistics.Win.UltraWinToolbars.UltraToolbarsManager in my application.
I have one Infragistics.Win.UltraWinToolbars.ButtonTool button under the toolbar manager.
My toolbar button tool does not look like a button... It looks like a label.
I want it to appear like a button.
How shall I achieve this?
I've set following properties for ButtonTool
buttonTool5.SharedProps.DisplayStyle is set to TextOnlyAlways
Thanks,
Rahul Jain
Hello Rahul,
Maybe if you set DisplayStyle property to the DefaultForToolType you would be able to see the button as expected:
ultraToolbarsManager1.Tools["buttonTool5"].SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.DefaultForToolType;
Please let me know if you have any other questions or if I am missing something from your scenario.Regards
How about, if i want to set mulitiple button properties. Let say I have 10 buttons and need to set common properties to all. do I need to set individually?
Dont we have something generic? Like toolBarManager.toolbars[0].Buttons.appearnace or something... Need it urgently. Please help on this
Each owner (toolbars, menus, ribbon groups) has settings and appearance that will apply to all tools in that owner. But not everything can be set at the owner level. What properties do you need to set?
You also might want to look into using multiple style libraries:
http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=Win_Loading_Multiple_Style_Libraries.html
Or multiple style sets:
http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=AppStyling_Creating_a_StyleSet.html
http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=Win_Changing_StyleSets_at_Run_Time.html
This will allow you to use the same style for most of your application but a specialized style for specific Control(s).
Hello Pramod,
About your questions
pramod3681 said:Toolbar appearance setting is getting aplied for all those controls avialble inside toolbars. But, I am not able to set properties for diffrent controls. Let say, I wanted to show all buttons in gray color and all textbox background should be in light gray color.
pramod3681 said: is there anything built-in attributes for toolbars or tools which will apply the common appearances for each control. Do we have something like ultraToolbarManager.ButtonAppearance.BackColor ultraToolbarManager.Toolbars[0].Settings.ButtonAppearance.BackColor
there are not such kind of property which could change the appearance depending of control`s type. One possible approach is to iterate each control, but other solution is to create your own AppStyle (isl file) and apply the new style only for this form If you decide to iterate through each control, please note that, when you have AppStyle (isl file) in your application it might override your own settings. It means that all these changes will be overridden from your AppStyle. In this case maybe you need to set property UseAppStyling = false for selected control and then you could modify their appearance.Please let me know if you have any questions.Regards
Well, let me tell you my scenario. In the isl file, there are nodes which are setting the properties for Toolbars' Textbox, Buttons, combobox, labels etc commonly. I need to set these properties programatically. Diffrent set of properties are setting for diffrent controls. Let say all buttons appearance will be diffrent that all textbox appearance. For this, i've diffrent node for textbox and buttons.
This isl file is applied throughout the application. Now, for some reason i dont want to use syling from the isl file for one of the winform. Hence, I need to set all those properties programatically.
I can set toolbar manager common appearance using
ultraToolbarManager.Appearance.BackColor
I can set all the toolbars common appearances using
ultraToolbarManager.Toolbars[0].Settings.Appearance.BackColor
Toolbar appearance setting is getting aplied for all those controls avialble inside toolbars. But, I am not able to set properties for diffrent controls. Let say, I wanted to show all buttons in gray color and all textbox background should be in light gray color.
To do this, Do I need to itereate each control and check which type of it is and then apply the settings. Like
ultraToolbarManager.Toolbars[0].Tools["Button1"].SharedProps.AppearancesSmall.Appearance.BackColor
Or is there anything built-in attributes for toolbars or tools which will apply the common appearances for each control.
Do we have something like
ultraToolbarManager.ButtonAppearance.BackColor
ultraToolbarManager.Toolbars[0].Settings.ButtonAppearance.BackColor
Please suggest, how to achieve this.