|
-
Mar 31st, 2001, 03:27 PM
#1
Thread Starter
Lively Member
[Apologies for the double post, but this is a matter of some urgency]
I just created my first DBGrid (yaaah!) but I'm having trouble moving from column to column. I tried TAB, but that just moves to the next control, and <RET> just activates the default button.
So, without using the mouse, how do I get to the next column? And back?
-
Mar 31st, 2001, 07:33 PM
#2
Frenzied Member
Set Focus
This is just a suggestion. Can't you catch the key event for the tab key and then just set the grid to the next column.Keep track of where the column was at last. In a var. That is the only idea i can think of. I will try to find out for you.
-
Apr 1st, 2001, 05:27 AM
#3
Thread Starter
Lively Member
jjortiz, in a fit of perceived brilliance last night, I tried that. I have the following in DBGrid KeyDown event
Code:
If KeyCode = 9 Then
DBGrid1.Col = DBGrid1.Col + 1
End If
It gets there, and increments the .Col property, but it still uses the default event of pressing the Tab Key, which is "go to the next control". Is there any way of telling it not to do this? In VFP, you can use NODEFAULT to override certain system functions.
-
Apr 3rd, 2001, 05:39 PM
#4
Frenzied Member
Code:
If KeyCode = 9 Then
DBGrid1.Col = DBGrid1.Col + 1
End If
Try something like this:
Code:
If KeyCode = 9 Then
KeyCode = 0
DBGrid1.Col = DBGrid1.Col + 1
End If
-
Apr 4th, 2001, 02:00 PM
#5
Thread Starter
Lively Member
Worked like a charm. You da man :cool
Thanks.
-
Apr 4th, 2001, 02:16 PM
#6
Frenzied Member
Yeah when you set the keycode to something else it performs that action like keycode = 0 then it cancels it. There is no keycode 0. You are welcome. And thanks for that you are the man. Makes me feel that i have chosen the right path.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|