How to Change List(Browse) header background color on a manifested program


#1

How to set header and group header properties of a list box at runtimeExample.zip (43.0 KB)


#2

The Point of the example is to set the column header background color when you have a manifest that includes common controls.

The header background colors are lost, unless you use the undocumented PROPLIST:DefHdrBackColor

In the example @Bruce posted above,
The interesting code can be found in BrowseClient behind Button1
Below are some of the lines of code behind that button

 !! This line is required if you want to change background colors at runtime.
 ?Browse:1{PROPLIST:DefHdrBackColor,1} = color:red

 ?Browse:1{PROPLIST:HdrBackColor,3} = color:silver

 ?Browse:1{PROPLIST:HdrBackColor + proplist:group,5} = color:silver

Note the ,1 above is not needed, just use the following
In any case, this line is important the other commands will not work without it.

  ?Browse:1{PROPLIST:DefHdrBackColor} = color:red

#3

Also if you’re declaring header background colors in the format statement of the window
you can get them appear by using

?Browse:1{PROP:NoTheme} = TRUE

However testing shows I couldn’t set it as the result of a button click
But it did work when I set it between opening the window, and before the Accept loop

Curiously PROP:NoTheme is documented as only applying to Sheets and Tabs


#4

only RED color is allowed? :joy:


#5

Mark,

I have a similar issue, however it is a queue list. I can set greenbar colors but have been unsuccessful in setting the header color in the list. I’ve tried your suggested code without results. Here is what I’m adding at the end of my greenbar routine

?ApparatusMenuList{PROPLIST:DefHdrBackColor} = color:gray
?ApparatusMenuList{PROPLIST:HdrBackColor} = color:gray

The queue has 1 column that is grouped with 3 fields. I also tried added this line without any results.

?ApparatusMenuList{PROPLIST:HdrBackColor + proplist:group} = color:gray

Is it even possible to set the header color in a queued list box?

Mark,
Just to follow-up I discovered I had the code in the wrong embed point. Your solution worked fine. Thanks for the solution!