This is a migrated thread and some comments may be shown as answers.

Is there another wa to add a option button

5 Answers 132 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
lprada
Top achievements
Rank 2
lprada asked on 30 Apr 2007, 03:16 PM
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];

5 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 02 May 2007, 03:42 PM
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
0
lprada
Top achievements
Rank 2
answered on 02 May 2007, 04:13 PM
Thank you, I am looking foward to the SP1
0
lprada
Top achievements
Rank 2
answered on 03 May 2007, 03:35 PM
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.

0
Mike
Telerik team
answered on 04 May 2007, 02:48 PM
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
0
lprada
Top achievements
Rank 2
answered on 04 May 2007, 03:56 PM
I will try it and let you know.
Tags
RibbonBar
Asked by
lprada
Top achievements
Rank 2
Answers by
Mike
Telerik team
lprada
Top achievements
Rank 2
Share this question
or