List headers in terminal services whitewashed

Have a client using terminal services with server 2019 where the list header sort of fade into the list.
e.g.:
Screenshot_listColour

How can I fix this to make it ‘Normal’ ?

Have you tried setting ?List{PROPLIST:DefHdrBackColor} = SomeColor

Mark,

You’re dipping into the undocumented here (as far as I see).
Any chance you might explain details?

The following was added to Libsrc\Win\Property.clw in Clarion 10
And as far as know they are not documented
I have been using several of them, and they do work.

PROPLIST:DefHdrTextColor  EQUATE (7C2AH) ! integer: Text color in header
PROPLIST:DefHdrBackColor  EQUATE (7C2BH) ! integer: Background color in header
PROPLIST:HdrSortTextColor EQUATE (7C2CH) ! integer: Text color in header of sort column
PROPLIST:HdrSortBackColor EQUATE (7C2DH) ! integer: Background color in header of sort column
PROPLIST:SortTextColor    EQUATE (7C2EH) ! integer: Text color of sort column
PROPLIST:SortBackColor    EQUATE (7C2FH) ! integer: Background color of sort column
PROPLIST:HasSortColumn    EQUATE (7C30H) ! boolean: TRUE if sort column is supported
PROPLIST:SortColumn       EQUATE (7C31H) ! integer: Current sort column

PROPLIST:DefHdr [ Text | Back ] Color - are used to set the colors of the header, for all columns, except possibly the SortColumn (see below)

There is now support for a Sort Column,
the sort of UI where the user clicks on a header,
and the list is sorted (or descending sorted ) by that column

   SELF.ListFEQ{PROPLIST:HasSortColumn} = TRUE  
   SELF.ListFEQ{PROPLIST:SortColumn}    = SELF.CurrentSortColumn 

When there is an active sort column (the 2 lines of code above) then:
PROPLIST:HdrSort [ Text | Back ] Color - are used to set the colors of the header of lone sort col
PROPLIST:Sort [ Text | Back ] Color - are used to set the colors of the cells in the of lone sort col

I’m trying to recall the details of which wins
PROPLIST:SortText*Color attributes vs. Cell Styling and Cell Coloring
I’d hope that the Styling and Color would win.

2 Likes

Yeah, I knew about PROPLIST: (HdrSort, HasSort, Sort etc) and had seen them in the docs, but PROPLIST:DefHdr was completely new to me.

No I haven’t. But this happens on all lists/browse etc. On normal windows there is a bit more contrast. So I’m thinking there a theme setting or something in windows that I can’t find.

From what I have seen testing the new colored Sort columns under Windows 10 (server 2019) the LIST Header control background is always white with Visual Styles. Maybe SV missed something in not doing some kind of owner draw header to make their background color work. That stuff was release in C9 before Win10.

What you could try is ?List{PROP:NoTheme}=1 to turn off visual styles for the LIST so you see Gray headers and could color them with the PROPs. You might also try ?List{PROP:FLAT}.

I REALLY want to avoid changing 100s of lists over all the apps if I can. :slight_smile:

That’s what a template or class is for :slight_smile:

1 Like

To expand on Rick … If you have a major project it’s good to have a Project Specific Global Extension in every APP. That allows quickly making or trying mass changes. I also would have a Project specific Window extension.

Did you try Prop:NoTheme on one Browse?

Prop:notheme does indeed make it way easier to view.
I like the idea of a project specific global template. I might just enact that, thanks.

For such cases I wrote ScriptPlayer template. It is added into an app, no other changes are needed. To set for example PROP:NoTheme=1 to all lists in the program I just place following config file:

<?xml version="1.0" encoding="utf-8"?>
<script>
  <!-- Applied to all procedures -->
  <global>
    <event name="OpenWindow">
      <!-- Property changes for all lists in the app -->
      <action name="SetProp" type="list">
        <!-- Set NoTheme to 1 -->
        <property name="NoTheme" value="1"></property>
      </action>
    </event>
  </global>
</script>

If no config file in the folder, the program is running without any changes.

The quickest would be to change the Browse template or ABBrowse.

You could make it specific to this situation by checking if its Server 2019. I don’t know if WTS tells the clients they are on Server.

IF SYSTEM{PROP:WindowsVersion,8}=1  |  ! Server ?
AND SYSTEM{PROP:WindowsVersion,9} >= 11 THEN   ! 11=WINVERSION:SRV2016 
   {PROP:NoTheme}=1

I don’t know if the RTL returns a value for Server 2019 only 2016 is sort of documented but in Equates.CLW it is commented. Maybe use #3 the Major=10 … and also Build.

I use a class on each window, that enumerates the controls and alters them as desired.

CASE xWin$CurrFEQ{PROP:TYPE}
    OF CREATE:List
       xWin$CurrFEQ{PROP:LineHeight}      = SELF.LineHeight
       xWin$CurrFEQ{PROP:DefHdrBackColor} = SELF.ListHeaderBackColor

   OF CREATE:Sheet
       xWin$CurrFEQ{PROP:NoTheme}         = TRUE

   OF CREATE:Spin
       IF INSTRING('N',UPPER(xWin$CurrFEQ{PROP:Text}),1,1)
            xWin$CurrFEQ{PROP:Ins} = TRUE       
       END 


       ! etc

Yep, been using similar for years and it’s included in my Icetips utilities. I use a single procedure in the base DLL and a global template that adds a call to that procedure to all Windows procedures in the app.