Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Forms, Dialogs, TitleBar, StatusStrip > Hide MDIButton of RadRibbonBar in RadRibbonForm

Answered Hide MDIButton of RadRibbonBar in RadRibbonForm

Feed from this thread
  • Ian avatar

    Posted on Feb 6, 2012 (permalink)

    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
    Attached files

    Reply

  • Posted on Feb 6, 2012 (permalink)

    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
    this.radRibbonBar1.MinimizeButton = false;
    this.radRibbonBar1.MaximizeButton = false;
    this.radRibbonBar1.CloseButton = false;

    Reply

  • Ian avatar

    Posted on Feb 6, 2012 (permalink)

    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
    Attached files

    Reply

  • Posted on Feb 7, 2012 (permalink)

    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

    Reply

  • Ian avatar

    Posted on Feb 7, 2012 (permalink)

    Hi Richard,

    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

    Reply

  • Posted on Feb 8, 2012 (permalink)

    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
    //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;

    Reply

  • Ian avatar

    Posted on Feb 8, 2012 (permalink)

    Thanks Richard :-)

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Forms, Dialogs, TitleBar, StatusStrip > Hide MDIButton of RadRibbonBar in RadRibbonForm
Related resources for "Hide MDIButton of RadRibbonBar in RadRibbonForm"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]