Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking current grid row
Message
De
02/11/1998 13:10:43
 
 
À
30/10/1998 10:20:05
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00152154
Message ID:
00153636
Vues:
26
>>>>>>I can dynamically disable all rows in a grid leaving only the
>>>>>>current row enabled (after an append). However the user can still
>>>>>>move the record pointer to another row by clicking. How can I
>>>>>>prevent this ?
>>>>>>
>>>>>>Regards Ian

Cetin,

Thanks for the code. I've managed to get the current grid row to lock.
However, i've needed to alter the .top/.bottom settings of the grid,
which i don't understand (see code). Any suggestions on what i'm missing ...?

LPARAMETERS nColIndex

LOCAL llChangingRow, lnRowPos, lnColPos

llChangingRow = .F.
STORE 0 TO lnRowPos, lnColPos

IF Thisform.Navigate.EditMode
*< Add/edit mode ... >*
IF MDown()
lnBottom = This.Top+This.HeaderHeight+(This.RelativeRow*This.RowHeight)
lnTop = lnBottom - This.RowHeight

*< ???? Top=7 HeaderHeight=23 RowHeight=23 >*
lnBottom = lnBottom + 28
lnTop = lnTop + 34

lnRowPos = MROW(WONTOP(),3)
lnColPos = MCOL(WONTOP(),3)

llChangingRow = !BETWEEN(lnRowPos,lnTop,lnBottom) AND ;
BETWEEN(lnColPos,This.Left,This.Left+This.Width)

*Messagebox("Row: "+str(lnRowPos)+" Bottom: "+str(lnBottom)+" Top: "+str(lnTop))
ELSE
llChangingRow = INLIST(LASTKEY(),24,5,28,3,145,148)
ENDIF && MDown

IF llChangingRow
NODEFAULT
ELSE
*< Do nothing >*
ENDIF && llChangingRow
ELSE
*< Do nothing >*
ENDIF && Thisform.Navigate.EditMode

Regards Ian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform