1. Mihai Apostol
  2. PowerBuilder
  3. Monday, 2 November 2020 21:17 PM UTC

I have some code in rbuttondown for a column that is AutosizeHeight and can have Null values. 

It the value of the column and row is not null or empty string everything is fine. Otherwise the DWO argument of the event gives me something else than the clicked column. The DWO.Type is "datawindow" instead of "column". The behavior is like the column is not there and rbutonndown happens directly on detail band. 

How to get the good DWO reference in this case?

 

Thanks

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 November 2020 19:07 PM UTC
  2. PowerBuilder
  3. # 1

Hi;

   FWIW: Auto Size Height (ASH) columns and bands were designed for "Report" read only DataWindows.

Using ASH this for data entry is not recommended. Instead, link out to a "detail" DWO (no ASH used) - maybe in a response dialogue - to perform user interactions.  HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 3 November 2020 21:57 PM UTC
Have you tried the GetObjectAtPointer() command instead?
  1. Helpful
  1. Mihai Apostol
  2. Wednesday, 4 November 2020 02:12 AM UTC
Yes I did, with no success.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 4 November 2020 16:46 PM UTC
Thanks for trying that Mihai!

We'll probably need a simple small test case App to investigate this issue further & advise.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 2 November 2020 22:15 PM UTC
  2. PowerBuilder
  3. # 2

What is the (default) height of the column object that has autosize height enabled? If zero, can you try setting it the same as the detail band height? This may or may not be feasible, depending on what you are try to accomplish.

You might also try placing a transparent, empty text DWO behind/under the column DWO that has an expression for the Height property that makes the text DWO's height zero when the column DWO is not null, and the band height (80 PBU's, for example) when the column DWO is null. You would also have to slightly alter your RButtonDown event script to look for either the column DWO or the text DWO.

HTH, John

Comment
  1. Mihai Apostol
  2. Tuesday, 3 November 2020 01:00 AM UTC
Thank you John for the workaround.



I'm using this object everywhere in the app and I would still like to find a generic solution without changing the dw.



The column has already the detail band height.

I tried to show in a MessageBox the X, Y, Width, Heigt and Visible of the column and everything is Ok. The column should be there. Also if the column has a border I cannot see the border until I'm entering a non empty string.



The Click event always detect correctly the column in the DWO but RButtondDown does not :-(
  1. Helpful
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.