1. Robert Sawyer
  2. PowerBuilder
  3. Wednesday, 31 January 2024 04:46 AM UTC

I have a grid datawindow. The datawindow has a few columns. Each column has a text value and images in the header. When I resize the column, the images also resize and get distorted. Is there a way to prevent the distortion?

 

 

Using PB 17

 

 

 

Attachments (1)
Robert Sawyer Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 16:47 PM UTC
  2. PowerBuilder
  3. # 1

Unfortunately, that didn't work for me

Comment
There are no comments made yet.
Robert Sawyer Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 12:20 PM UTC
  2. PowerBuilder
  3. # 2

Yes I tried that too and it didn’t work. 

Let’s say the image width is 100, I thought about setting the image width to 100 after the resize of the column. However I’m not sure how to determine when that occurs or where put put the script. Do you know where the column resize event occcurs?

 

Comment
  1. Andreas Mykonios
  2. Wednesday, 31 January 2024 12:47 PM UTC
No. I guess someone could use other event, but you need to know the wparam and lparam to use... Another thing you could try is to use mousemove event on the datawindow (you should add it with event id pbm_dwnmousemove). This event has many useful arguments like x and y... But you would need to do some calculations...

Andreas.
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 12:07 PM UTC
  2. PowerBuilder
  3. # 3

For runtime, one option is to set an expression value in width property for the bitmap.

But, based on my tests, it works ok but only when making the column larger. When you make it smaller, it doesn't works as expected (actually the problem is related to the text object on the header, not the bitmap - had not time to investigate). You should do some tests, and maybe you can find a solution...

Andreas.

Comment
There are no comments made yet.
Robert Sawyer Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 11:36 AM UTC
  2. PowerBuilder
  3. # 4

Runtime

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 31 January 2024 07:39 AM UTC
  2. PowerBuilder
  3. # 5

Hi.

Are you asking for runtime or for when using the designer?

Andreas.

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.