Tag Archives: context menu

Make a TextBox preview extender provider in C#

This example shows how to convert the TextBox preview techniques described in the last few posts into an extender provider. The previous examples showed the basic technique, but they were hard-wired to specific TextBox controls so they weren’t very flexible. … Continue reading

Posted in controls, extensions, user interface | Tagged , , , , , , , , , , , , , , | Leave a comment

Make the user enter a float in C#

The posts Preview TextBox changes in C# and Preview TextBox changes in C#, Part 2 show how you can make a TextBox accept only integers. This example is similar except it makes a TextBox only accept floats. This change is … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , , , , , , | Leave a comment

Remove a TextBox control’s context menu in C#

Normally a TextBox control has a context menu that appears when you right-click it, but what if you don’t want that context menu? I mean, really. Am I required to have “Show Unicode control characters” and “Open IME” on every … Continue reading

Posted in controls | Tagged , , , , , , , , , , | 1 Comment

Make a modal context menu in C#

This example shows how you can make a modal context menu. Normally when a context menu appears, the user can press Esc or can click off of the menu to make it disappear. Some while ago, someone asked me whether … Continue reading

Posted in forms, menus | Tagged , , , , , , , , , , , | Leave a comment