ContextMenuStrip for MaskedEdit Not displaying

1 Answer 23 Views
MaskedEditBox
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Gone2TheDogs asked on 05 Feb 2025, 11:45 AM

Since there isn't a built-in context menu for a MaskedEdit, I tried to add one. However, I can't get it to display. 

I added a contextMenuStrip and then added a menuItem.

I added the menuItem click event

I added the contextMenuStrip to the MaskedEdit field

When I test it (right-click on the field), nothing happens.

I also tried other events on the MaskedEdit field like the mouse click event and it never calls it when I click on the field.

What am I missing? (screenshot attached)


		private void miCopy_Click(object sender, EventArgs e)
		{
			try
			{
				TextBoxBase thiscontrol;
				thiscontrol = (TextBoxBase)ActiveControl;
				if (thiscontrol.SelectionLength > 0)
				{
					thiscontrol.Copy();
				}
			}
			catch (Exception)
			{
			}
		}

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 06 Feb 2025, 08:36 AM

Hello, Bob,

RadMaskedEditBox offers a built-in context menu. It is shown when the ContextMenuEnabled property is enabled:

this.radMaskedEditBox1.MaskedEditBoxElement.ContextMenuEnabled = true;

Can you give this a try and let me know how if this is suitable for you?

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
MaskedEditBox
Asked by
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or