RadRibbonBar maximize problem

9 posts, 0 answers
  1. Reijer Koopsen
    Reijer Koopsen avatar
    2 posts
    Member since:
    Oct 2005

    Posted 29 Dec 2006 Link to this post

    When I put a Ribbonbar on a form, it has minimize, maximize en close buttons. (Is there a way to get rid of them ??). If I change the form style to ControlBox = False, MinimizeButton = False, MaximizeButton=False to prevent duplicate close buttons, The maximize button of the RadRibbonbar maximizes the form over the XP taskbar !!

    Is there a way around this ??

    Any help would be appriciated..

    Reijer Koopsen


  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 29 Dec 2006 Link to this post

    Hello Reijer,

    Here are a couple suggestions that might come handy for you.
    1. You can actually use the ribbon bar tittle area, as a title for you entire form if you use it in combination with our ShapedForm class. To achieve this you should change the form definition:
    public partial class Form1 : ShapedForm

    And optionally change the shape of your form

    public Form1()
    {
     InitializeComponent();
     this.Shape = new RoundRectShape(5);
    }

    2. If you are desparate about hiding ribbonbar titlebar buttons, you can use the following code:

    private void Form1_Load(object sender, EventArgs e)
    {
     ClassSelector buttonSelector = new ClassSelector();

     buttonSelector.ElementClass = "MaximizeButton";
     buttonSelector.GetSelectedElements(this.radRibbonBar1.RibbonBarElement)[0].Visibility = ElementVisibility.Collapsed;

     buttonSelector.ElementClass = "MinimizeButton";
     buttonSelector.GetSelectedElements(this.radRibbonBar1.RibbonBarElement)[0].Visibility = ElementVisibility.Collapsed;

     buttonSelector.ElementClass = "CloseButton";
     buttonSelector.GetSelectedElements(this.radRibbonBar1.RibbonBarElement)[0].Visibility = ElementVisibility.Collapsed;
    }

    Best wishes,
    Mike
    the telerik team
  3. UI for WinForms is Visual Studio 2017 Ready
  4. waltersenekal
    waltersenekal avatar
    4 posts
    Member since:
    Feb 2007

    Posted 19 Feb 2007 Link to this post

    Hi Mike
    Can you also please show me to do this in vb.net 2005
    Thanks for a great product.
    I only want to do step 1 in your reply.
    vb does not understand ": ShapedForm"
    or 
    RoundRectShape(5)
    It works very well and looks very nice.
    The only problem for me is that it hides my taskbar.
    Best regards
    Walter
  5. Mike
    Admin
    Mike avatar
    640 posts

    Posted 20 Feb 2007 Link to this post

    Hello walter,

    In VB you have to import the following namespaces, in order to refer Shape and ShapedForm class in your code:
    Imports Telerik.WinControls 
    Imports Telerik.WinControls.UI 

    You should also use the following syntax in order to inherit your form from the ShapedForm class, that radControls provide:

    Public Partial Class Form1 
        Inherits ShapedForm 

    Let me know if you need any further assistance with that.

    Best wishes,
    Mike
    the telerik team
  6. waltersenekal
    waltersenekal avatar
    4 posts
    Member since:
    Feb 2007

    Posted 25 Feb 2007 Link to this post

    Hi Mike
    Thank you it worked very nice.
    I have one more question.
    How do I remove the maximize button.
    I only want my form maximized or minimized
    I tried to convert your c# code to vb but it does not like [0]visibility
    I tried to use the help file but it does not provide me a solution.
    It only shows me how to read the current value of the visibility of the button.
    Can you please help me again.

    Best regards
    Walter
    PS! Why does the work take so long to startup?
    Are you loading alot of things in the background?
  7. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 26 Feb 2007 Link to this post

    Hi Walter,

    I have attached a sample project in VB that addresses your problem.
    Hope that helps.

    Sincerely yours,
    Jordan
    the telerik team
  8. waltersenekal
    waltersenekal avatar
    4 posts
    Member since:
    Feb 2007

    Posted 26 Feb 2007 Link to this post

    Hi Jordan
    Thank you very much, this is exactly what I was looking for.
    Best regards
    Walter
  9. waltersenekal
    waltersenekal avatar
    4 posts
    Member since:
    Feb 2007

    Posted 03 Mar 2007 Link to this post

    Hi Jordon
    Everything is working nice now.
    But if I double click on the title bar it act as if I click on the maximize button.
    Although I do not have a maximize button.
    Is there a way to stop this aswell?
    Best regards
    Walter
  10. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 05 Mar 2007 Link to this post

    Hello Walter,

    I'm glad to hear that I was able to help. As to the double click behavior there is currently no way to turn it off, but this will be fixed in our next release.

    Regards,
    Jordan
    the telerik team
Back to Top
UI for WinForms is Visual Studio 2017 Ready