Hi
Just a coincidence !
***********************************
I have reported the follwoing to Microsoft few days back.
The Option group also behaves the same way.
If you do the code in the RightClick event of individual buttons, then, the behaviour is fine. Only the Click event behaves correctly when coded in the click of the group container. I am afraid this is a bug. :-(
***************************************************
* From ramani (Subramanian.G )
* email: ramani_g@yahoo.com
* web:
*
* Just copy the code and run it to see possible Bugs
* This is present till VFP8 - SP1.
**************************************************
PUBLIC oform1
oform1=NEWOBJECT("form1"

oform1.Show
RETURN
**************************************************
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT commandgroup1 AS commandgroup WITH ;
ButtonCount = 2, ;
Value = 1, ;
Height = 66, ;
Left = 24, ;
Top = 168, ;
Width = 94, ;
Name = "Commandgroup1", ;
Command1.Top = 5, ;
Command1.Left = 5, ;
Command1.Height = 27, ;
Command1.Width = 84, ;
Command1.Caption = "Command1", ;
Command1.Name = "Command1", ;
Command2.Top = 34, ;
Command2.Left = 5, ;
Command2.Height = 27, ;
Command2.Width = 84, ;
Command2.Caption = "Command2", ;
Command2.Name = "Command2"
ADD OBJECT label1 AS label WITH ;
Caption = "Label1", ;
Height = 156, ;
Left = 24, ;
Top = 12, ;
Width = 324, ;
Name = "Label1"
PROCEDURE commandgroup1.RightClick
DO CASE
CASE This.Value = 1
WAIT WINDOW "Right Click Event of "+This.Buttons(This.Value).Caption NOWAIT NOCLEAR
CASE This.Value = 2
WAIT WINDOW "Right Click Event of "+This.Buttons(This.Value).Caption NOWAIT NOCLEAR
ENDCASE
ENDPROC
PROCEDURE commandgroup1.Click
DO CASE
CASE This.Value = 1
WAIT WINDOW "Click Event of "+This.Buttons(This.Value).Caption NOWAIT NOCLEAR
CASE This.Value = 2
WAIT WINDOW "Click Event of "+This.Buttons(This.Value).Caption NOWAIT NOCLEAR
ENDCASE
ENDPROC
PROCEDURE label1.Init
cMessage = "1. Click on Command1 and Right Click on Command2" ;
+ CHR(13) + "2. Click on Command2, and Right Click on Command1" ;
+ CHR(13) + "Notice that the Right Click only takes the button value of last " ;
+ CHR(13) + "click event and NOT the RIGHT click event. " ;
+ "The same is " + CHR(13) + "true in Option Buttons as well."
This.Caption = cMessage
ENDPROC
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
____________________________________________
ramani - (Subramanian.G) 