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.

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. Bjarne Eian
  2. Tuesday, 16 July 2024 13:31 PM UTC
Seems that grid.color is int16. Max rgb(255,127,0) or 32767
  1. Helpful
  1. Andreas Mykonios
  2. Tuesday, 16 July 2024 13:42 PM UTC
Yes. Something like that. This is the enhancement request I opened about: https://www.appeon.com/standardsupport/track/view?id=12025.

Andreas.
  1. Helpful 2
  1. Bjarne Eian
  2. Thursday, 8 August 2024 11:13 AM UTC
Rooting for you, Andreas!

For what it's worth. Last visible row in DataWindow(not last row on DataWindow) having detail bacground rgb(240,240,240) or 15790320 or 78682240(Button Face) seems to turn grid dark gray regardless background color on DataWindow.

Detail background color expression if(Mod(GetRow(),2)=1,rgb(240,240,240),rgb(255,255,255)) and grid will alternate drak/light scrolling down. No other color seems to do that.(PB2020 1509)
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.