Reijer Koopsen
Top achievements
Rank 1
Reijer Koopsen
asked on 29 Dec 2006, 01:11 PM
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
Is there a way around this ??
Any help would be appriciated..
Reijer Koopsen
8 Answers, 1 is accepted
0
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:
Mike
the telerik team
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;
}
Mike
the telerik team
0
waltersenekal
Top achievements
Rank 1
answered on 19 Feb 2007, 08:31 PM
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
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
0
Hello walter,
In VB you have to import the following namespaces, in order to refer Shape and ShapedForm class in your code:
You should also use the following syntax in order to inherit your form from the ShapedForm class, that radControls provide:
Let me know if you need any further assistance with that.
Best wishes,
Mike
the telerik team
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
0
waltersenekal
Top achievements
Rank 1
answered on 25 Feb 2007, 09:08 PM
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?
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?
0
Hi Walter,
I have attached a sample project in VB that addresses your problem.
Hope that helps.
Sincerely yours,
Jordan
the telerik team
I have attached a sample project in VB that addresses your problem.
Hope that helps.
Sincerely yours,
Jordan
the telerik team
0
waltersenekal
Top achievements
Rank 1
answered on 26 Feb 2007, 01:02 PM
Hi Jordan
Thank you very much, this is exactly what I was looking for.
Best regards
Walter
Thank you very much, this is exactly what I was looking for.
Best regards
Walter
0
waltersenekal
Top achievements
Rank 1
answered on 03 Mar 2007, 08:57 AM
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
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
0
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
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