Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RightClick event in a Grid
Message
De
26/09/2003 07:05:26
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
 
À
26/09/2003 06:56:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00832605
Message ID:
00832606
Vues:
18
You need to use column textboxes RightClick event for this.
Or look at BindEvent() function.

I have an old code that replace a specified method for a control in grid in all columns in form designer.

ChangeGridMethod('Text1','RightClick',_cliptext)

if the method code is copied into clipboard
PROCEDURE ChangeGridMethod
LPARAMETERS tcControlName,tcMethodName,tcMethodCode
LOCAL lnSelObjectCount, loGridRef, lnCnt, loControlRef
LOCAL ARRAY laSelectedObject[1]
lnSelObjectCount = ASELOBJ(laSelectedObject)
IF lnSelObjectCount = 0
	WAIT WINDOW 'Select a grid in Form Designer first' nowait
	RETURN
ENDIF
loGridRef = laSelectedObject[1]
IF loGridRef.BaseClass # 'Grid'
	WAIT WINDOW 'One Grid object must be selected' nowait
	RETURN
ENDIF
FOR lnCnt = 1 TO loGridRef.ColumnCount
	IF type("loGridRef.Columns(lnCnt)."+tcControlName) = 'O'
		loControlRef = EVALUATE("loGridRef.Columns(lnCnt)."+tcControlName)
		loControlRef.WriteMethod(tcMethodName,tcMethodCode) 
	ENDIF
NEXT


>Hi,
>
>I have a grid in a form just to show information (no updates allowed), where I set "ReadOnly to .T." and "AllowCellSelection to .F.". There is, also the option to RightClick over the Grid and have access to a PopUp where some options are presented.
>
>Users asked me to let the Grid cells text to be accessed so they could copy its content and to paste it elsewhere. In order to do that I changed the setting of "AllowCellSelection to .T.", and it worked as users desired. The problem is that the Grid's RightClick event isn't firing anymore.
>
>Is there a way to bring that functionality (RightClick) back while keeping the cells "open" to copy their text?
>
>TIA,
>
>Fernando
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform