1. Tobias Roth
  2. PowerBuilder
  3. Monday, 3 February 2020 17:18 PM UTC

Hi,

we generate grid-dw-syntax dynamicly.
The width of the columns is 200 with width.autosize=1.

All works fine so far the autosize changes the width of the column.

But now we want activate the powerfilter on that datawindow. (Powerfilter is a great component of Jim Reese: https://powertothebuilder.com/powerfilter.html

After activation of the powerfilter it looks like this.
The Buttons are positioned at width 200.

It seems that the width-property of the columns is not refreshed by using width.autosize.

 

Is it possible to refresh all width-properties of the dw? Any tricks or workarounds?

 

The only way i found is to manuelly resize the width. 

Thanks and Regards 

Tobi

René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 4 February 2020 07:16 AM UTC
  2. PowerBuilder
  3. # 1

Hi Tobias,

I don't know a way to get the current width of the column if you use autowidth.

You could ask for an enhancement. But Appeon was not able to fix the current autosize width problem (https://community.appeon.com/index.php/qna/q-a/autosize-width-for-datawindow-columns) by now, so I would not wait for it.

As a workaround you may implement you own autosize width feature using GetTextExtentPoint32W.

Here you can find how it works:

https://answers.sap.com/questions/12263850/powerbuilder-125-how-to-get-the-text-size.html

https://www.topwizprogramming.com/freecode_dwgridxp.html

HTH,

René

 

Comment
  1. Tobias Roth
  2. Thursday, 6 February 2020 05:52 AM UTC
Hi René,



Thanks for the tip.

I used the some code of the dwgridxp-example and it works quite well. (additional thanks to Roland Smith of topwiz)



Regards,

Tobi
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 3 February 2020 19:39 PM UTC
  2. PowerBuilder
  3. # 2

Hi Tobias;

  I would contact the PowerFilter author for this issue. Just my $0.02.

Regards ... Chris

Comment
  1. Tobias Roth
  2. Monday, 3 February 2020 19:58 PM UTC
Hi Chris,



I think its a general problem of the grid-dw with width.autosize property.



We have the sourcecode to change it. But i need to find a way to get that actual length of the autosized column. Maybe there is a known workaround.



Regards Tobi
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 3 February 2020 20:30 PM UTC
The only "trick" that I can think of, is to try a GroupCalc() command *before* accessing the width property.
  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.