Most controls in a DataWindow object - column, compute, text, etc. - have .Moveable and .Resizeable properties (misspelled in the DW painter BTW). When these are enabled, then the user, as expected, can move and resize the controls at runtime. Is there an event, custom or otherwise, where I can trap whenever this moving or resizing occurs?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- Controls in a DataWindow - trap when moved or resized?
- Ronnie Po
- PowerBuilder
- Tuesday, 2 August 2022 17:37 PM UTC
- Tuesday, 2 August 2022 19:27 PM UTC
- PowerBuilder
- # 1
HI, Ronnie -
I think the best you can do is check the DataWindow.Syntax.Modified property in the LButtonUp event. If "yes" is returned, something in the DW's internal structure/layout has changed. Of course, this property can also become "yes" if sorting or filtering has changed, so it's not a slam dunk.
Regards, John
- John Fauss
- Tuesday, 2 August 2022 21:07 PM UTC
-
Helpful Loading... Helpful 0
- Ronnie Po
- Tuesday, 2 August 2022 21:28 PM UTC
-
Helpful Loading... Helpful 0
- John Fauss
- Tuesday, 2 August 2022 22:28 PM UTC
-
Helpful Loading... Helpful 0
- Tuesday, 2 August 2022 22:56 PM UTC
- PowerBuilder
- # 2
Won't the RESIZE event in the DW capture the change in size when a user resizes the dw?
When the user moves an object, they always use the MOUSE. Therefore I'd put code in the LBUTTONUP event of the datawindow and check for the X and Y positions.
1. Capture the X and Y positions when you open the DW, and set those values in ll_Current_x and ll_current_y;
then set ll_prev_x = 0 and ll_prev_y = 0
In the LBUTTONUP event check the current X and Y against the ll_current_X and ll_current_Y values, and if they are different, then reset your variables and you know the control has been moved.
- Roland Smith
- Wednesday, 3 August 2022 01:59 AM UTC
-
Helpful Loading... Helpful 1
- Page :
- 1
However, you are not allowed to reply to this question.