Welcome! Log In Create A New Profile

Advanced

detect mouse click in a table for windev

Posted by PETER ZHOU 
PETER ZHOU
detect mouse click in a table for windev
March 31, 2026 02:39AM
Hi,

2 questions under WINDEV :-

1)how to detect mouse left or right click on a table column and return the value in this column ?

2)Is there way to simulate CTRL+C on a table columm (not using the AAF menu option for table)?

Regards,

PETER ZHOU
Al
Re: detect mouse click in a table for windev
March 31, 2026 03:04AM
Hello Peter,

This is how I do the mouse detection:
Add a left Button double click event to the table. Put the following code into the event. The code uses TableInfoXY () and MouseXPos to capture the column name, column number and column row. The switch processes code base on the column name selected

//called from the left button double click on the data entry table
LColumnName =  TableInfoXY (TABLE, tiColName , MouseXPos(), MouseYPos())
LColNum =  TableInfoXY (TABLE, tiColNumber , MouseXPos(), MouseYPos())
LColRow =  TableInfoXY (TABLE, tiLineNumber , MouseXPos(), MouseYPos())

SWITCH Upper(LColumnName)

I think the sendkey() function may work for the way to simulate CTRL+C. If it doesn't work by using the code in a column event, it might work as code called from the click event of a button hidden on the window and activated as executeprocess(hiddenbutton,trtclick)

Regards
Al
PETER ZHOU
Re: detect mouse click in a table for windev
March 31, 2026 05:21AM
Hi Al,

Thank you, i will give it a try.

Regards,

PETER ZHOU
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: