Change datawindow row color on mouse move in powerbuilder.

Placide
Placide used Ask the Experts™
on
I would like the rows to change color or highlighted when the mouse is moved over.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
the rows highlighted on mouse move over
To do this, you would want to create a new "user event" on the datawindow control that would use the Event ID = "pbm_dwnmousemove".  This will let you capture the event when the mouse moves over the data window. That event will provide 3 arguments, xpos, ypos, row, and dwo.  So you could check "row" and if > 0 then set the Background.Color properties of the datawindow column objects on that row.

If you want this behavior to be on all datawindows in your application, then create a user object that inherits from "datawindow" that you will use instead of the basic datawindow on all of your forms. So instead of dropping "datawindow" controls on your forms, you would have a u_dw or some such user object and drop those on your forms and that way you can have an inherited level to control global behavior on all of your datawindow controls. Even better, take a look at the PFC (PowerBuilder Foundation Class) library which has a "u_dw" control with some great functionality already included.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial