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
20
Buttons in the right side at runtime
posted

Hi

I want insert a image in a right side of a toolbar. To do this I read that I have to set up the toolbar to FillEntireRow=true and insert a LabelTool with InstanceProps.Spring between the left & rights buttons.

The problem is that I need to do it at run time and when I add the LabelTool to the UltraToolManager whith the line "utoolMngr.Tools.Add(lblTool)"  the lblTool.InstanceProps is set to null automaticatly and the result is not the desired.

How can I do this?

Thanks a lot

  • 5389
    Suggested Answer
    posted

    pachin69_1,

    You can do one ot two things.  When you create your LabelTool, you can set its SharedProps.Spring property to true, which will cause all instances of the LabelTool to have its Spring property set to True.  Or you can set the InstanceProps of the tool after you add the tool to the toolbar:

    LabelTool l = (LabelTool)this.ultraToolbarsManager1.Toolbars[0].Tools.AddTool("LabelTool1");
    l.InstanceProps.Spring = Infragistics.Win.DefaultableBoolean.True;

    Hope this helps,

    ~Kim~