1. Joe Hess
  2. PowerBuilder
  3. Friday, 28 June 2019 12:29 PM UTC

Is there a way to control the background color of a protected datawindow column using themes, similar to the disabled-state of an SLE object?

 

Thanks

Joe

Joe Hess Accepted Answer Pending Moderation
  1. Tuesday, 9 July 2019 16:05 PM UTC
  2. PowerBuilder
  3. # 1

I don't think this is currently possible. I submitted a feature request.

Comment
There are no comments made yet.
Amandys Riera Accepted Answer Pending Moderation
  1. Monday, 29 July 2019 00:42 AM UTC
  2. PowerBuilder
  3. # 2

Buen día

 

Puedes crear una función que te permita darle todos los formatos al datawindow y la llamas en el constructor. Eso es lo que yo hago.

 

la función recibe de parámetro un datawindow al que le vas a dar formato as_dwo

Leo todos los objetos visuales y los guardo en un array

string ls_objnm[]

ls_obj = as_dwo.describe("datawindow.visualobjects")
f_tabstringtoarray(ls_obj,ls_objnm[])

 

Luego lo recorro y le voy dando el formato que quiero.

Puedes preguntar por el describe de cada columna 

string ls_dtlbg     //este es el color que le quieres poner cuando sea el tab order 0

ls_dtlbg      = string( RGB(108,107,107))

for i = 1 to upperbound(ls_objnm[])
  ls_col = ls_objnm[i]

choose case as_dwo.describe(ls_col+".band") 

case 'detail' 
  ls_tab = upper(as_dwo.describe(+ls_col+".TabSequence"))

  if ls_tab  = '0' then

     as_dwo.modify(ls_col+".background.color="+ls_dtlbg)

  end if

 

case 'header'

/*lo que quieras hacer en esta banda*/

end choose

next

Espero te sirva

 

 

 

 

 

 

 

Comment
There are no comments made yet.
Joe Hess Accepted Answer Pending Moderation
  1. Friday, 9 August 2019 16:49 PM UTC
  2. PowerBuilder
  3. # 3

Thanks. I would rather specify the condition in the theme JSON. Many columns are conditionally protected with a non-zero tab sequence. Right now I have to conditionally set the background color on a column-by-column basis.

Joe

 

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.