1. Robert Sawyer
  2. PowerBuilder
  3. Monday, 29 January 2024 02:34 AM UTC

Is there a way to change the color of the grid lines on a datawindow?

Also, when you turn grid lines off, column moving and mouse selection, even though checked, do not seem to function. 

Additionally, is there no column resizing capability for the user when the grid lines are turned off?

What I want is, black grid lines (or a specific color), the ability to move columns and resize columns.

Who is viewing this page
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 30 January 2024 02:41 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Robert - 

As you have observed, the ability to move and resize columns and resize rows is available only when the value of the Grid.Lines property is zero (On) or two (Display Only). This is not a bug, as PB has worked this way for a long time (even though this limitation is not documented anywhere that I can find).

You can see these three settings become disabled when the grid lines property is changed to one (Off) or three (Print Only) in the DataWindow Painter.

Best regards, John

Comment
There are no comments made yet.
Robert Sawyer Accepted Answer Pending Moderation
  1. Monday, 29 January 2024 16:26 PM UTC
  2. PowerBuilder
  3. # 2

Andreas - this is great - just what I was looking for - I really appreciate it.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 29 January 2024 07:57 AM UTC
  2. PowerBuilder
  3. # 3

You can put color in grid lines. But only in runtime. Not in design mode. Following screenshot shows a grid datawindow with black grid lines...

For that example I have added in datawindow's constructor event the following command:

dw_sample_grid.Object.DataWindow.Grid.Color = rgb(0, 0, 0)

Another example with red grid lines:

This works in last ebf's of 12.6 and later (don't remember in which this was introduced).

Attention, there is a problem with blue. It doesn't work at all... That's why setting grid lines to rgb(255, 255, 255) won't work (this was the solution I thought for the second part of your question). I will open a support ticket for that...

Andreas.

Comment
  1. John Fauss
  2. Tuesday, 30 January 2024 02:34 AM UTC
Very nice, Andreas!
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 29 January 2024 05:11 AM UTC
  2. PowerBuilder
  3. # 4

Hi.

Please mention what version of Powerbuilder you are using.

Andreas.

Comment
  1. Robert Sawyer
  2. Monday, 29 January 2024 05:36 AM UTC
PB 17
  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.