Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus() in grid column
Message
De
29/06/2001 00:16:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00525000
Message ID:
00525029
Vues:
14
>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() ?

Hi Nick,

Thanks for the reply, actually, all of the columns are visible, it's just that if I'm on the 5th to 8th column and I click the add button, the pointer is always go to the first column. This does not happend if I'm on the 1st to 4th column.
Here is my add button code :

thisform.grid1.Column3.readonly=.f.
thisform.grid1.Column4.readonly=.f.
thisform.grid1.Column5.readonly=.f.
thisform.grid1.Column6.readonly=.f.
thisform.grid1.Column7.readonly=.f.
thisform.grid1.Column8.readonly=.f.
sele MyTempGridFile
appe blank
thisform.grid1.refresh()
thisform.grid1.column3.setfocus()

For your information the 1st and 2nd column is enabled=.f. because I don't want the user to edit this column, so it should jump to the 3rd column.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform