1. Deva Shanmuga
  2. PowerBuilder
  3. Monday, 30 October 2023 06:16 AM UTC

Dear Experts,

When a row is selected in a data window, it is considered the current row and is highlighted in blue. Is it possible to change the highlighted color to something else?

Regards, and Thanks

Deva S

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 30 October 2023 11:10 AM UTC
  2. PowerBuilder
  3. # 1

Hi Deva;

   Just place an expression on the Detail band's  colour property using an IF () command to set the colour one way if the row is current & another way if not. HTH

Regards ... Chris 

Comment
  1. Miguel Leeuwe
  2. Monday, 30 October 2023 11:16 AM UTC
Could another way be by using a theme? One that only applies the selected row color?
  1. Helpful
There are no comments made yet.
John Raghanti Accepted Answer Pending Moderation
  1. Tuesday, 31 October 2023 11:19 AM UTC
  2. PowerBuilder
  3. # 2

This is what we use at the ancestor level for list datawindows. It highlights rows a certain color and also does an alternating color for the unselected rows.

 

this.Modify('DataWindow.Detail.Color="536870912~tif(getrow() = currentrow(), ' + msw.color_list_highlight + ', if(Mod(getRow(), 2) = 0, ' + msw.color_alternate_1 + ', ' + msw.color_alternate_2 + '))"')
Comment
  1. Deva Shanmuga
  2. Tuesday, 31 October 2023 11:25 AM UTC
HI John Raghanti,

Can you mention in which event I need to write this script.



Thanks, and Regards

Deva S
  1. Helpful
  1. John Raghanti
  2. Tuesday, 31 October 2023 11:37 AM UTC
Hi. We have it in an event, ms_setlistcolors that gets triggered in the datawindow constructor.



If you change dataObject at any point, you would need to trigger it again.
  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.