Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>>>>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement