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
230
Display Calender control in ultratoolbar ribbon.
posted

hi!!!!!!!!!!

I am working on Ultratoolbar.I want to display windows monthcalender control in ultratoolbar ribbon.I m not getting how to do it.

If someone knw then please let me knw.

Thanx in advance.

Parents
  • 69832
    Offline posted

    See code sample below. I recommend not displaying the calendar but rather a dropdown control that displays one when you drop it down, since displaying a MonthCalendar on a toolbar will eat up much more real estate than a dropdown control. 


    private void AddDateTool()
    {
        Infragistics.Win.UltraWinToolbars.ControlContainerTool containerTool = new Infragistics.Win.UltraWinToolbars.ControlContainerTool( "dateTool" );
       
        Infragistics.Win.UltraWinEditors.UltraDateTimeEditor control = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
        //MonthCalendar control = new MonthCalendar();
       
        containerTool.Control = control;
        this.ultraToolbarsManager1.Tools.Add( containerTool );
        this.ultraToolbarsManager1.Toolbars[0].Tools.AddTool( "dateTool" );
    }

Reply Children