Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On Key Label RightMouse (does it block RightClick event?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01023788
Message ID:
01023889
Vues:
15
That is my experience, too. The RightClick() event will fire. However, I've noticed that if I have a "ON KEY LABEL RIGHTMOUSE" active, and then select some text in a textbox that has a rightclick event, and then rightclick in the textbox, the text becomes UNselected. Thus, any desired Cut or Copy operation with the selected text will no longer work. Very strange. Same behavior does NOT happen with an editbox. AND...even stranger... if I do issue an explicit call to rightclick() for the textbox control from within the RightMouse event, everything works correctly, INCLUDING the fact that I don't get a rightclick firing twice as you would expect if the rightclick() was still happening by default anyway.



>Borislav,
>
>Your statement is not true. The RightClick() event will fire. The WAIT WINDOW of your code "eats" the mouse click. Try changing the line
>
>ON KEY LABEL RIGHTMOUSE WAIT WINDOW "Right Mouse ON CLICK"
>
>to
>
>ON KEY LABEL RIGHTMOUSE _SCREEN.PRINT('ON CLICK')
>
>
>You will see a different result.
>
>Ben
>
>
>>>If an "On Key Label RightMouse..." has been established, and I then rightclick on a control that has a rightclick event, will the rightclick event for the control still fire after the command associated with the "On Key Label" is executed? Or do I need to explicitly issue an oControl.RightClick() statement within the code running during the trapped RightMouse if I still want the RightClick event to be executed? Thanks very much.
>>
>>I think ON KEY LABEL ... take a precedence over RightClick() event and RightClick() event never fires. Here a simple test form, just RightClick ON Text1:
>>
>>oForm = CREATEOBJECT("Form1")
>>oForm.Show(1)
>>
>>
>>**************************************************
>>*-- Form:         form1 (d:\all_zapl\test.scx)
>>*-- ParentClass:  form
>>*-- BaseClass:    form
>>*-- Time Stamp:   06/16/05 09:28:09 AM
>>*
>>DEFINE CLASS form1 AS form
>>
>>
>>	DoCreate = .T.
>>	Caption = "Form1"
>>	Name = "Form1"
>>
>>
>>	ADD OBJECT text1 AS textbox WITH ;
>>		Height = 23, ;
>>		Left = 62, ;
>>		Top = 46, ;
>>		Width = 100, ;
>>		Name = "Text1"
>>
>>
>>
>>	PROCEDURE Init
>>		ON KEY LABEL RIGHTMOUSE WAIT WINDOW "Right Mouse ON CLICK"
>>	ENDPROC
>>
>>
>>	PROCEDURE text1.RightClick
>>		WAIT WINDOW "Text1 RichtClick()"
>>	ENDPROC
>>
>>
>>ENDDEFINE
>>*
>>*-- EndDefine: form1
>>**************************************************
>>
>>
>>
>> BTW why you use ON KEY LABEL?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform