- Toan Nguyen
- PowerBuilder
- Thursday, 8 August 2024 01:24 AM UTC
Hello All,
I have a question on how to programmatically set property value for the datawindow's columns.
In my application's window, I have a dropdown of colors and based on user's selection, I want to set the text color for all the columns in the datawindow to the picked color.
Is there an easy way to loop through all the columns in the datawindow and set the color property to a value?
I want to avoid doing this if possible:
dw_1.object.column_1.color = RGB(0,0,128); dw_1.object.column_2.color = RGB(0,0,128); ... dw_1.object.column_n.color = RGB(0,0,128);
I want to be able to write the scripts like below:
integer li_column_ct, i
li_column_ct = integer(dw_1.Object.DataWindow.Column.Count)
For i = 1 to li_column_ct
dw_1.object.[i].color = RGB(0,0,128) // Referencing the columns by number???
Next
Thanks for your help in advance!
Regards,
Toan
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.