Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

numericedit:how can I highlight the number value incl. the sign on enter / got focus

Hi all,

 

I have a numeric edit (v12.0.0.318 for WinForms) which looks like attached numedit.png.

 

And I would like to select the value characters by clicking into the control so that it looks like numedit_Sel.png.

I don´t want to doubleclick into the control: I want to do this with a single click.

 

Any ideas.

 

Regards

ist1304

Download All
0 Kudos
Message 1 of 2
(5,212 Views)

hi csd,

 

you can define a callback on mouse click for the numeric edit control and use the method select(int start, int length) from this control to highlight the value you wish. The callback looks like that for me and seems to work:

 

private void numericEdit1_MouseClick(object sender, MouseEventArgs e)
    {
        numericEdit1.Select(0, 5);
    }

 

Best regards

______________
Florian Abry
Inside Sales Engineer, NI Germany
0 Kudos
Message 2 of 2
(5,136 Views)