Mouse Down

Posted by Joe Kent on 09-Feb-2017 13:18

What am I doing wrong here?

METHOD PRIVATE VOID radGridView1_MouseDown( INPUT sender AS System.Object, INPUT e AS System.Windows.Forms.MouseEventArgs ):
        IF e:Button == MouseButtons:Right THEN
        //GridViewRowInfo currentRow = this.radGridView1.MasterGridViewInfo.CurrentRow;
    radContextMenu1:Show(MousePosition)
END
END METHOD.

Severity and Description Path Resource Location Creation time Id
** Cannot process comparison in expression. (250) ProgressClient/Encompix/ShopFloor/Preform PreformData.cls line 300 1486667796834 774

Severity and Description Path Resource Location Creation time Id
** Unable to understand after -- "e:Button =". (247) ProgressClient/Encompix/ShopFloor/Preform PreformData.cls line 300 1486667796833 773

Posted by Matt Gilarde on 09-Feb-2017 13:31

You've got == for the equality operator. It should be a single =. You're also missing a period at the end of the line with the Show method.

All Replies

Posted by Matt Gilarde on 09-Feb-2017 13:31

You've got == for the equality operator. It should be a single =. You're also missing a period at the end of the line with the Show method.

Posted by Matt Gilarde on 09-Feb-2017 13:35

It also looks like there's an extra END. You may need to specify the namespace for the MouseButtons enumeration - System.Windows.Forms.MouseButtons.

Posted by Laura Stern on 09-Feb-2017 13:44

Just a general comment.  It is generally not a very good idea to intercept MouseDown events in the ABL.  Are you doing something that the grid itself does not support?

Posted by Joe Kent on 09-Feb-2017 13:59

I'm wanting to create a right click that will open a PDF file.

Posted by Matt Gilarde on 09-Feb-2017 14:08

I recommend that you do it on MouseUp instead of MouseDown. If you do it on MouseDown you can run into problems where the MouseDown is seen by the control you clicked on and the MouseUp is seen by a control that gets displayed by your event handler. Some controls get confused if they don't see a MouseUp for every MouseDown.

Posted by scott_auge on 09-Feb-2017 14:13

Trying to write C++, C, or Java in a Progress program (or any other language that uses "==" and ";".)

This thread is closed