Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setfocus() in grid column
Message
 
To
28/06/2001 21:39:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00525000
Message ID:
00525018
Views:
16
>Hi all,
>
>I have 8 column in a grid and I have a command button to add a new record into the grid and the first column to be added is the 3rd column so I have to setfocus to it but I have examined that if the pointer is on the 5th to 8th column the setfocus didn't want to the 3rd column after I click the command button, this is because on the screen can only display 4 column so the next column I have to scroll.
>
>Could somebody help me how to setfocus to the 3rd column eventhough the pointer before is on the 5th to 8th, I've tried using thisform.grid1.mycolumn.setfocus()
>but it didn't work.
>
>TIA
>
>
>Budianto M.

Hi Budianto,

I not sure what you mean. If you have a grid with only 4 columns visible, and you are on 5th (first 4 are not in sight) the code in the button

this.parent.grid1.column3.setfocus()

just automatically scrolls the grid back and sets the focus to the third column. Could you post the code in your button.Click() ?
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform