Is there another wa to add a option button

6 posts, 0 answers
  1. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 30 Apr 2007 Link to this post

    Is there anywa to add this optionbuttons in design mode? if not it will be a great feature. Actually we are migrating from Infragistics to Telerik and this is a feture the we have in Infragistics.









    RadButtonElement optionsButton = new RadButtonElement();
    optionsButton.Text = "Options";
    optionsButton.Alignment = ContentAlignment.TopRight;
    optionsButton.Padding = new Padding(3);
    optionsButton.Margin = new Padding(3);
    optionsButton.TextImageRelation = TextImageRelation.ImageBeforeText;
    optionsButton.Image = global::Telerik.Examples.WinControls.Properties.Resources.optionsButton;
    RadButtonElement exitButton = new RadButtonElement();
    exitButton.Text = "Exit";
    exitButton.Alignment = ContentAlignment.TopRight;
    exitButton.Padding = new Padding(3);
    exitButton.Margin = new Padding(3);
    exitButton.TextImageRelation = TextImageRelation.ImageBeforeText;
    exitButton.Image = global::Telerik.Examples.WinControls.Properties.Resources.exitButton;
    this.radRibbonBar1.StartMenuBottomStrip.Children.Add(exitButton);
    this.radRibbonBar1.StartMenuBottomStrip.Children.Add(optionsButton);
    this.radComboBox1.TextBoxElement.Margin = new Padding(0, 4, 0, 0);
    this.radRibbonBar1.RibbonBarElement.TabStripElement.SelectedTab =
    this.radRibbonBar1.RibbonBarElement.TabStripElement.Items[0];
  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 02 May 2007 Link to this post

    Hello lprada,

    Unfortunately RadRibbonBar designer does not support creating or managing application's "options " and "exit" buttons. It is only possible to add them, using the approach demonstrated in our examples.  We will address this issue in the next Service Pack, expected in about 3 weeks. Any other feature suggestions are welcome.

    Kind regards,
    Mike
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 02 May 2007 Link to this post

    Thank you, I am looking foward to the SP1
  5. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 03 May 2007 Link to this post

    A Question!!!

    I added the options button on runtime, but I have the problem that the menu is the size of the button and I cant chnge the width? what I have to do change this  this.radRibbonBar1.StartMenuBottomStrip control width? If cannot do this I will no be able to Licence to Office 2007 UI

    see 

    2007 Microsoft Office System User Interface Design Guidelines 
    ....
    The width of the Application Menu SHOULD be fixed. It SHOULD NOT change when the length of the file 77 names displayed in the recent documents changes.

  6. Mike
    Admin
    Mike avatar
    640 posts

    Posted 04 May 2007 Link to this post

    Hi L. Prada,

    Currently the API for managing the drop-down menu width is not quite polished. Nevertheless it is possible to set  constant width of the menu right-side pane, as specified in the Office 2007 guidelines, using the following code:
    public Form1() 
        InitializeComponent(); 
         
        //....  
     
        ClassSelector selector = new ClassSelector("ApplicationButton"); 
        RadDropDownButtonElement button = (RadDropDownButtonElement)selector.GetSelectedElements(this.radRibbonBar1.RibbonBarElement)[0]; 
         
        button.DropDownOpening += new CancelEventHandler(DropDownMenu_DropDownOpening);  
     
    void DropDownMenu_DropDownOpening(object sender, CancelEventArgs e) 
        RadDropDownButtonElement dropDownButton = (RadDropDownButtonElement)sender; 
        dropDownButton.RightColumnItems.Owner.MinSize = new Size(320, 0); 
        dropDownButton.RightColumnItems.Owner.MaxSize = new Size(320, 0); 
    }       
       

    I hope this works in your case for now. We will consider adding a better API for controlling application menu's layout in the upcoming SP1.

    Kind regards,
    Mike
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 04 May 2007 Link to this post

    I will try it and let you know.
Back to Top
UI for WinForms is Visual Studio 2017 Ready