NumericUpDown text selection

P

Pavel Volin

Hi,

I use SelectionStart property for set the starting point of text selected in
the text box. But unfortunately, NumericUpDown control not have this
property.
Would there be any way to set a point of text selection in the NumericUpDown
control?

Best regards
Pavel
 
A

Alex Feinman [MVP]

The only way I can think of is to use PInvoke:

[pseudo code]

NumericUpDown ud1;

ud1.Capture = true;
IntPtr pCtl = GetCapture();
IntPtr pBuddy = SendMessage(pCtl, UDM_GETBUDDY, 0, 0);
SendMessage(EM_SETSEL, pBuddy, ... )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top