Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Giving focus to textbox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482465
Message ID:
00482478
Views:
13
Jim,

You could try something like this in the InteractiveChange of the outer textbox:
If THIS.Value = "your certain value"
   THISFORM.Container.Visible=.T.
   THISFORM.Container.Textbox.SetFocus()
Endif
Another option might be putting similar code into the LostFocus() of the outer textbox.

Scott

>I have a container with a textbox in it on a form. The container is invisible until the user enters a certain value in a textbox (external to the container). In the Valid() of the external textbox, I make the container visible to accept input in the textbox in the container.
>
>Here's my problem: I want the focus (and the cursor) to be on the textbox in the container as soon as it becomes visible so the user will be there and ready to enter text. VFP will not permit a SetFocus() from within a Valid(). How can I place the user's cursor in the textbox as soon as it is made visible by code in the other textbox's Valid()? I tried adjusting the Tab Order, making the container textbox the next tab number after the first textbox, but that doesn't seem to work.
>
>TIA
>
>Jim
Scott King
The Support Source Corporation
Previous
Reply
Map
View

Click here to load this message in the networking platform