Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bindevent and dblclick
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01336230
Message ID:
01336328
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
What is the _DBLCLICK system variable is? May be the double click is not recognized and considered as a single click.

>>Hi,
>>
>>Can anyone give me an idea on why the following bindevent on the dblclick doesnt work?
>>
>>FOR lnCol = 1 TO ThisForm.Grid1.ColumnCount
>> loColumn = ThisForm.Grid1.Columns[ lnCol ]
>> FOR EACH loControl IN loColumn.Controls
>> IF PEMSTATUS( loControl, [dblClick], 5 )
>> BINDEVENT( loControl, 'dblClick', thisform, 'GridClicked') *** this doesnt work
>> ENDIF
>> *IF PEMSTATUS( loControl, [Click], 5 )
>> * BINDEVENT( loControl, 'Click', thisform, 'GridClicked') *** this works just fine
>> *ENDIF
>> ENDFOR
>>ENDFOR
>>
>>Looking for a little inspiration.
>>
>>Thanks
>>
>>Jon
>
>That works for me:
>
>oForm = CREATEOBJECT([form1])
>oForm.Show(1)
>
>**************************************************
>*-- Form:         form1 (d:\all_zapl\test.scx)
>*-- ParentClass:  form
>*-- BaseClass:    form
>*-- Time Stamp:   08/04/08 07:44:00 PM
>*
>DEFINE CLASS form1 AS form
>
>
>    DoCreate = .T.
>    Caption = "Form1"
>    Name = "Form1"
>
>
>    ADD OBJECT grid1 AS grid WITH ;
>        ColumnCount = 2, ;
>        Height = 200, ;
>        Left = 14, ;
>        Top = 11, ;
>        Width = 320, ;
>        Name = "Grid1", ;
>        Column1.Name = "Column1", ;
>        Column2.Name = "Column2"
>
>
>    PROCEDURE gridclicked
>        WAIT WINDOW [We are here]  NOWAIT
>    ENDPROC
>
>
>    PROCEDURE Init
>        =AFONT(laFonts)
>        lcChars = []
>        FOR lnFor = 30 TO 255
>            lcChars = lcChars + CHR(lnFor)
>        NEXT
>        FOR lnFor = 1 TO ALEN(laFonts)
>            INSERT INTO crsTest VALUES (laFonts[lnFor], lcChars)
>        NEXT
>        GO TOP
>        thisform.Grid1.Column2.DynamicFontName = [IIF(.t.,ALLTRIM(FontNames),"")]
>        FOR EACH oCol IN thisform.Grid1.Columns
>            FOR EACH oControl IN oCol.Controls
>                IF PEMSTATUS( oControl, [dblClick], 5 )
>                   BINDEVENT( oControl, 'dblClick', thisform, 'GridClicked')
>                ENDIF
>            NEXT
>        NEXT
>    ENDPROC
>
>
>    PROCEDURE Load
>        CREATE CURSOR crsTest (FontNames C(50), AllChars C(200))
>    ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: form1
>**************************************************
>
>
>BTW what is the value of AllowCellSelection property of your grid?
>If it is .F. then Grid DblClick is fired not column controls one.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform