This is a migrated thread and some comments may be shown as answers.

TextBoxElement on QuickAccessbar on RadRibbonForm

3 Answers 10 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Holger
Top achievements
Rank 1
Holger asked on 03 Apr 2018, 03:08 PM

     I'm wondered why the design-Time Editor of QuickAccessToolbarItems of RadRibbonForm is not offering to add a TextBoxElement,

However, I added it programmaticly.

this.radRibbonBar1.QuickAccessToolBarItems.Add(new Telerik.WinControls.UI.RadTextBoxElement());

it appears, bot I cannot focus and type in it (The CanFocus property is set to true).

 

Maybe some RadItem Types, are not offered by purpose in the Designer ?

I thought, putting a search text element in the QuickAccessToolbar is a quiet common scheme.

Is there a way to get a fully functional TextBoxElement into a QuickAccessToolbar ?

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 04 Apr 2018, 01:16 PM
Hello Holger,

Thank you for writing. 

Your approach adding the text box element is generally correct. With this element, however, you should also set the AllowAero property of the form to false. This way you will use our title bar instead of the default one and have the textbox properly painted. It is also necessary to set its MinSize property: 
public partial class RadRibbonForm1 : Telerik.WinControls.UI.RadRibbonForm
{
    public RadRibbonForm1()
    {
        InitializeComponent();
 
        this.AllowAero = false;
 
        RadTextBoxElement textBoxElement = new RadTextBoxElement();
        textBoxElement.MinSize = new Size(100, 0);
        textBoxElement.Text = "textBoxElement";
        this.radRibbonBar1.QuickAccessToolBarItems.Add(textBoxElement);
    }
}

I am also attaching a screenshot showing the result on my end.

I hope this helps. Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Holger
Top achievements
Rank 1
answered on 04 Apr 2018, 03:54 PM

Yes, thanks, it worked immediatly. And it was painted correctly before, it just couldnt get the Focus.
I would had never found this AllowAero Property myself.


Is there a reason, why the possible choices of RadItems, addable by the VS-Designer is so limited ?
Or is it just a selection of the most common items ?

Or the items, that are compatible with Aero On or Off ?

0
Hristo
Telerik team
answered on 05 Apr 2018, 01:34 PM
Hi Holger,

Thank you for the update. I am glad that the suggested approach is working well in your actual project.

Regarding the QuickAccessToolbar we have decided to add only the items which are most commonly used. The standard title bar is working with native APIs and adding a text box to it will not render well unless the AllowAero property is set false. Setting the property to false will disable the standard title bar and we will paint our own which is built on top of TPF. With our title bar, the text box element will paint correctly. I will also update the documentation article here, to include an example how a text box can be added to it.

I hope this information is useful. Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RibbonBar
Asked by
Holger
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Holger
Top achievements
Rank 1
Share this question
or