Rad form titlebar

6 posts, 0 answers
  1. Renjith Lal
    Renjith Lal avatar
    3 posts
    Member since:
    Jul 2009

    Posted 03 Aug 2009 Link to this post

    1. Is there any way to remove the titlebar from a radform or increase the height of the titlebar (formelement.titlebar)? i tried 

     

    this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed; in the form load, but it shows an empty area initially until a resize or refersh.

     


    2. How to add leftiamge, rightimage and background image in titlebars? (both radtitlebar and formelement.titlebar )

    I tried both scenarios and could not success.

    thanks
    Ren
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 04 Aug 2009 Link to this post

    Hello Renjith,

    Thanks for contacting us and for your question.

    1. In order to hide the Title Bar of a RadForm, you should set the FormBorderStyle property of the Form to None. The FormBorderStyle property mimics the behavior of the same property of a standard windows form.

    2. Open Edit UI Elements dialog from the smart tag and set images for each ImagePrimitive node from the tree on the left. You can set an image to all buttons on the right (close, minimize, maximize) and to the application icon on the left. Unfortunately you cannot set an image for the whole titlebar.

    I hope that helps. Write back if you have further questions.  

    Sincerely yours,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Renjith Lal
    Renjith Lal avatar
    3 posts
    Member since:
    Jul 2009

    Posted 04 Aug 2009 Link to this post

    Hello Nick,

    Thanks for the reply. My actual requirement is to increase the height of the titlebar to place an image in it. So I guess we can not do it in radform. I know that I can remove the titlebar by setting the formborderstyle to none but, primarily it removes the border which I don't want to. Is there any way to create border (borderprimitive) for a radform with borderstyle is none?
  5. Nick
    Admin
    Nick avatar
    767 posts

    Posted 05 Aug 2009 Link to this post

    Hello Renjith Lal,

    You can increase the height using the following code snippet:

    this.FormElement.TitleBar.MinSize = new Size(10, 70); 

    As to your second question, you can set the BorderTickness to 0 which works to some degree.

    this.FormElement.BorderThickness = new Padding(0, 0, 0, 0); 
     

    Please write us back if you are unhappy with that solution. We are currently not aware of any better work-around but we will think further about your scenario.

    Regards,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Lorenzo
    Lorenzo avatar
    11 posts
    Member since:
    Nov 2011

    Posted 14 Nov 2011 Link to this post

    Hi,

    I need to use RadForm but without the TitleBar.
    I wanna keep the resize funcitionalities and use my custom User Control as TitleBar.

    So the solution to put 
    FormBorderStyle = FormBorderStyle.None;
    is not suitable in my scenario.

    Also I tried to use
    this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;
    but nothing happen.

    I standard windows form i can obtain my goals simply using the following code inside my form:

    this.Text = "";
    this.MaximizeBox = false;
    this.MinimizeBox = false;
    this.ControlBox = false;

    Is there any way to completely remove titleBar from a RadForm and preserving resize functionality?

    Thanks in advance,
    Lorenzo

  7. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 17 Nov 2011 Link to this post

    Hi Lorenzo,

    Thank you for writing.

    In fact, the approach taken to collapse the title bar is the correct one to use on RadForm. However, it seems that we currently experience some issue, and the title bar is not collapsing unless the form is resized. I have added this issue into our PITS system and we will address it in a future release. Here is a link to the item, where you can add your vote for it.

    Your Telerik points have been updated as a token of our gratitude. 

    Meanwhile, you can use the following code snippet with RadForm, in order to hide the title bar:
    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);
        this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;
    }

    Alternatively, you can use ShapedForm, which is a form without a title bar and you will have the required behavior.

    Greetings,
    Stefan
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Back to Top
UI for WinForms is Visual Studio 2017 Ready