Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWNumEdit initial text selection state

Any ideas on what can cause a CWNumEdit to have a blinking cursor instead of a complete text highlight upon receiving focus?

Typically when I press tab to change the focus to a CWNumEdit control, the entire text of the control is selected.

However, some instances of the CWNumEdit have a blinking cursor immediately after receiving focus instead of having all text selected. If I tab off and back on again, it now selects everything.

I haven't keyed in on what I'm am doing differently with these misbehaving instances of the CWNumEdit. I am changing the RangeChecking properties, setting value, and changing the formatstring.
0 Kudos
Message 1 of 2
(3,026 Views)
It shouldn't do this when tabbing through the controls. When a numedit gets the focus from a left-click from the user though, then it will position the cursor in the number if the user clicked somewhere on the actual value to allow editing of the existing number. Are you seeing this in tabbing?

If you are getting this from left-clicking the mouse, you can get past this by putting a CWNumEdit.SetFocus() call in the Click() event handler for the numedit control.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(3,026 Views)