Hi,
I need to hide the MDIButtons (Minimize, Restore/Maximize, Close buttons) of RadRibbonBar in RadRibbonForm. I tried using this code (radRibbonBar1.RibbonBarElement.MDIbutton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;) but it always shows whenever I resize or maximize the form or show another child form. I attached a screen shot.
Many thanks,
Ian
Edit: I'm using version 2011.1.11.315
I need to hide the MDIButtons (Minimize, Restore/Maximize, Close buttons) of RadRibbonBar in RadRibbonForm. I tried using this code (radRibbonBar1.RibbonBarElement.MDIbutton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;) but it always shows whenever I resize or maximize the form or show another child form. I attached a screen shot.
Many thanks,
Ian
Edit: I'm using version 2011.1.11.315
6 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 06 Feb 2012, 04:03 PM
Helo Ian,
In this way, the RadRibbonBar is just like a form. You can hide these buttons in the following way
Hope that helps
Richard
In this way, the RadRibbonBar is just like a form. You can hide these buttons in the following way
Hope that helps
Richard
this
.radRibbonBar1.MinimizeButton =
false
;
this
.radRibbonBar1.MaximizeButton =
false
;
this
.radRibbonBar1.CloseButton =
false
;
0
Ian
Top achievements
Rank 1
answered on 06 Feb 2012, 04:53 PM
Hi Richard,
Thank you for your reply. The code you suggest hides the upper buttons. I want the upper buttons to be shown and the lower, hidden. I attached another screen shot. I hope I'm a bit clearer this time.
Many Thanks,
Ian
Thank you for your reply. The code you suggest hides the upper buttons. I want the upper buttons to be shown and the lower, hidden. I attached another screen shot. I hope I'm a bit clearer this time.
Many Thanks,
Ian
0
Richard Slade
Top achievements
Rank 2
answered on 07 Feb 2012, 04:22 PM
Hello Ian,
By default, when youy create a RadRibbonForm and create a tab on this form, there are only one set of minimize, close and maxmize buttons showing.
Please could you post some sample code (using the code formatting tools) to show how you are creating your form with these two sets of buttons.
Apologies for the confusion
Richard
By default, when youy create a RadRibbonForm and create a tab on this form, there are only one set of minimize, close and maxmize buttons showing.
Please could you post some sample code (using the code formatting tools) to show how you are creating your form with these two sets of buttons.
Apologies for the confusion
Richard
0
Ian
Top achievements
Rank 1
answered on 07 Feb 2012, 06:17 PM
Hi Richard,
Here, is my code:
Many thanks,
Ian
Here, is my code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Telerik.WinControls.UI.RadRibbonForm
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var frm = new Form2();
frm.MdiParent = this;
frm.Dock = DockStyle.Fill;
frm.WindowState = FormWindowState.Maximized;
frm.Show();
}
}
}
Many thanks,
Ian
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 08 Feb 2012, 10:35 AM
Hello Ian,
You can get rid of the buttons in the following way.
Hope that helps. Please remember to mark as answer if this does answer your question
Richard
You can get rid of the buttons in the following way.
Hope that helps. Please remember to mark as answer if this does answer your question
Richard
//min
this
.radRibbonBar1.RibbonBarElement.Children[4].Children[0].Children[0].Visibility = ElementVisibility.Collapsed;
//max
this
.radRibbonBar1.RibbonBarElement.Children[4].Children[0].Children[1].Visibility = ElementVisibility.Collapsed;
//close
this
.radRibbonBar1.RibbonBarElement.Children[4].Children[0].Children[2].Visibility = ElementVisibility.Collapsed;
0
Ian
Top achievements
Rank 1
answered on 08 Feb 2012, 11:21 AM
Thanks Richard :-)