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

RadMaskedEditBoxElement in ribbonBar

1 Answer 40 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Iason Demiros
Top achievements
Rank 1
Iason Demiros asked on 11 Jan 2010, 09:24 AM
Hi,
I am trying to add a RadMaskedEditBoxElement in RadRibbonBarButtonGroup on the ribbonBar. I am fine with adding it but when i am trying to set the mask value , the mask does not exists. All the properties of the RadMaskedEditBoxElement are like  radtextbox. On the other hand when i am adding the RadMaskedEditBoxElement on winform it works perfectly.

I tried to add the RadMaskedEditBoxElement from the code with a host element , nothing.

Can you help me ?

1 Answer, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 14 Jan 2010, 07:56 AM
Hi Iason,

Thanks for contacting us and for your question. Please check the following code snippet:
RadMaskedEditBox maskTextBox = new RadMaskedEditBox();
maskTextBox.Mask = "T";
maskTextBox.MaskType = MaskType.DateTime;
maskTextBox.Size = new Size(120, 20);
RadHostItem hostItem = new RadHostItem(maskTextBox);
hostItem.StretchHorizontally = false;
hostItem.StretchVertically = false;
this.radRibbonBarButtonGroup1.Items.Add(hostItem);

I am using the RadHostItem approach to add a RadMaskedEditBox to a RadRibbonBarButtonGroup. As you can see, I explicitly define the size of the masked edit box and I also turn off StretchHorizontally and StretchVertically properties of RadHostItem so that it can be resized according to the control host.

I hope this helps. Do not hesitate to write back anytime you need assistance.

Greetings,

Deyan
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
RibbonBar
Asked by
Iason Demiros
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or