Solved

Numeric Up/Down Control - Select all text

Posted on 2006-10-23
2
411 Views
Last Modified: 2008-01-09
Hi experts,

I'm using a Numeric Up/Down control and have managed to get the application to select all text when the focus passes to the control at run time.  With normal text boxes this is easily achieved with a .SelectAll function.  With the Numeric Up/Down control I have achieved it using the following code:

        ' Select all text.
        txtTransitionAltitude.Select(0, Len(txtTransitionAltitude.Value))

I now want to have all text selected when I increase of decrease the value using the up/down buttons but cannot get it to work.  I used the above code in the _ValueChanged sub but only a flash of the selection occured when I tried it out.  

Is there another way I can do this?  

Regards,

Ady
0
Comment
Question by:Ady Foot
2 Comments
 
LVL 9

Accepted Solution

by:
DjDezmond earned 125 total points
ID: 17787328
In the design window, goto the _valueChange sub and copy and code into the:

_MouseUp

or

_KeyUp

Event for that control. Your code accesses the value of that control, but when valuechanged is handeled, the value has changed, so it can't reference it. Using on of the above two should work how you need it to.

Dez
0
 
LVL 16

Author Comment

by:Ady Foot
ID: 17787335
Spot on - thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now