Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column
Message
From
09/03/1999 01:44:28
 
 
To
09/03/1999 00:26:20
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Column
Miscellaneous
Thread ID:
00195446
Message ID:
00195447
Views:
19
>HI,
>
>i have a Grid in my form, there have 5 column in it.
>the first column is "A/C no.", and the second is "A/C Desc.".
>the 3rd is "Amount".
>But the "A/C Desc." is no need to input the data.
>
>How can i jump to "Amount" column, after i press ENTER or TAB at "A/C no." column.



I suggest you to re-arange the column order, so that no need to add any coding
to Next Input place. Since user will feel poor if the cursor jump out of his/her expectation!!




To do this, there are serveral methods:
* case 1: Thisform.KeyPress() and set KeyPreview to True
Lparameters nKeyCode, nShiftCtrlAlt
Do case
case nKeyCode = 13 or nKeyCode = 9 && [Enter] & [Tab]
  if thisform.activeControl.name = [Thisform.grid1.name]
     if thisform.grid1.activecolumn = 1 && First Column
        ThisForm.grid1.column3.text1.setfocus()
     endif
  endif
EndCase

* Pons: Sure work, less bugs or unexpected event occur.
* Cons: Program need to can every time when user press a key.

* case 2: Thisform.grid1.column.text1.KeyPress()
Lparameters nKeyCode, nShiftCtrlAlt
if nKeyCode = 13 or nKeyCode = 9 && [Enter] & [Tab]
  thisform.grid1.column3.setfocus() && or .text1.setfocus()
endif

* Pons: only run this event when on that text events.
* Cons: In most cases, you may add coding on textbox.Keypress(), 
*       or you may add validation check and lock back to same control...
*       Thus, there may make unexpected result and situation.



Anyway, who can catch the mice is a good cat! >^.^<
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform