Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Boxes on Toolbar
Message
 
To
14/10/1997 14:26:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00054450
Message ID:
00054544
Views:
36
>Still no go.. I tried binding the textboxes to a memory variable, same result..
>It is very strange. I can move forward through the textboxes and enter values, but once I have moved out of them I cannot get back into them.
>
>> I have a tool bar that has a list box on it, and it operates okay. It's, of course, not quite what you're doing, but maybe because they're not bound to a control? How about trying to bind them to a memory variable?
>>
>>>I just now tried dropping the textboxes directly onto the toolbar, same result..
Steve,

Here's how I just did what you want. With 4 textboxes in a toolbar, in each textbox keypress I handled the tab and back tab keys with this code;

LPARAMETERS nKeyCode, nShiftAltCtrl
* You need to adjust the object names for your textboxes
IF nKeyCode = 9 && Tab
NODEFAULT
THIS.Parent.Text2.SetFocus()
ENDIF
IF nKeyCode = 15 && shift tab
NODEFAULT
THIS.Parent.Text4.SetFocus()
ENDIF


and in each textbox's Click I put this code;

THIS.SetFocus()

This si necessary because toolbars NEVER get focus so the keystrokes as processed by VFP won't put focus into any object that is in the toolbar. By overriding the keypress actions for the tab and backtab jkeys we are forcing the focus to go where we want it to. If you have other keys you need to process you will need to do this for them also.

For me, I would dump this whole approach and make a non-modal form with the textboxes and save alot of coding.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform