1. Robert Sawyer
  2. PowerBuilder
  3. Wednesday, 31 January 2024 23:06 PM UTC

Is there a way through script to put some code behind the resizing of a grid datawindow column? I don't believe the resize event of the dw fires when widening or narrowing a column on a grid. Trying to find the event that gets triggered.

PB 17

John Fauss Accepted Answer Pending Moderation
  1. Thursday, 1 February 2024 02:35 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Robert - 

As far as I know, there is no single event to signal that a column resize has occurred. However, it is not too difficult to recognize this has happened by using the LButtonDown, LButtonUp, and MouseMove events (mapped custom events mapped to the pbm_lbuttondown, pbm_lbuttonup, and pbm_mousemove events), a couple of instance booleans, and a few lines of code.

I have implemented this very feature in an example app that is available in CodeXchange:

   https://community.appeon.com/index.php/codeexchange/powerbuilder/345-column-spanning-grid-datawindow-headings#499

In particular, examine the ue_LButtonDown, ue_LButtonUp, and the ue_MouseMove events in the dw_grid DataWindow control in the w_grid_heading window.

Good luck!

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.