Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid behave as normal textboxes do (tabbing)
Message
De
06/07/2005 11:04:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01023485
Message ID:
01029489
Vues:
10
> ...
>Assuming I have flagged lLastRowColExit = .T. then the last row's last col is never allowed to be entered into.
>
>Plus I noticed another thing that as the row col is remembered in the grid the next time I tab into the same grid it automatically exits the grid. To counter it as you might have noticed I have put in an extra {TAB} in the keyboard statement but I have not been able to enter the last textbox of the last row :(
>
>Also I have a grid with only one column active and one row (this is a grid with precreated fixed rows, which is 1 row and out of it's 4 columns only the last column is enabled for data-entry). This grid is never allowed to be used and the KEYBOARD fires.
>
>Please advise on how to circumvent these problems.

I don't know. Perhaps the AfterRowColChange() is not the best solution, after all. Perhaps AfterRowColChange() gives you the location of the NEW column, which might explain some of your problems.

An alternative might be the KeyPress() event.

>
>>Oh, you wanted that behaviour only for the last record and field? I thought you wanted to navigate through the Grid with another key.
>>
>>Last field: You might do the check only in the last Column.
>>
>>Last record: If the table or cursor does not have an active index, a filter, nor deleted records, you can check whether recno() = reccount(). Otherwise, you will need to invoke a UDF or method that tries to skip to the next record. Something like this:
>>
>>
>>if LastRow()
>>  keyboard "{Ctrl+TAB}"
>>endif
>>
>>function LastRow() && in separate PRG - might also be ThisForm.LastRow()
>>  local lnSaveRecord, llReturnValue
>>  lnSaveRecord = recno()
>>  skip
>>  llReturnValue = eof()
>>  goto (lnSaveRecord)
>>  return llReturnValue
>>endfunc
>>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform