List box Header Text Color not working

Hello all,

Trying to set back and text colors for listbox headers.

These are the settings:

And this is the result:

What is my mistake? Why are the columns right from column “ZÜP” messed up?

Is there anything I can do or is this a bug in C11?
Any help is welcome.

Thank you!

Volker

Hi Volker,

Can you please show the whole list format,
Either the generated text,
or you can show the GUI again, but this time grab the splitter and move it to the right so we can everything in the tree list on the left

I’ll bet that the fields in your FROM(Q) don’t match the prop format
so content is a bit off…
That said, you appear to be in an APP so the FROM queue should be generated to match the format
which leads me guess that you used a special character like a ~ in one of the headers, or in a picture

Just brainstorming: you might run a test where you remove letters that aren’t used in English from your headers, if that solves the problem, then you still might be able to set them back in code using ?Browse{PROPLIST:Header, N} = ‘Correct Header’

If you’re in a hurry, also show us the generated FROM(Q) structure so we can compare it to the format

Hi Mark,

The generated format is as folllows:

  LIST,AT(169,0,448,614),USE(?Browse:1),VSCROLL,COLOR(00EAD1B9h,COLOR:White,COLOR:Red), |
    GRID(00CC3300h),FLAT,FORMAT('5L(2)|_FM*@[email protected]|_FM*[email protected]@25L(2)|_FM*~StO' & |
    '[email protected]@25L(2)|_FM*~Aktiv/Inaktiv~L(0)@[email protected](2)|_FM*[email protected]@20L(2)|' & |
    '_FM*[email protected]@100L(2)|_FM*[email protected]@100L(2)|_FM*[email protected]@130L(2)|_FM' & |
    '*[email protected]@[25L(2)|_FM*[email protected]@]|F~S.-Ber.~[100L(2)|_FM*HT(00FFF' & |
    'FFFH)HB(000000FFH)[email protected]@100L(2)|_FM*HT(00FFFFFFH)HB(0000FFFFH)~11.2' & |
    '[email protected]@100L(2)|_FM*~11.2.5~S(2)@[email protected]]|F~Gültigkeiten~[100L(2)|_FM*~' & |
    ' [email protected]@100L(2)|_FM*~ [email protected]@]|F~Sonderschulungen~[40L(2)|_FM*~am~L(0)@d' & |
    '[email protected](2)|_FM*~um~L(0)@[email protected](2)|_FM*~durch~L(0)@[email protected]](200)|F~Letzte Änderung~'), |
    FROM(Queue:Browse:1),HIDE,IMM,#FIELDS(TRM:Unique,TRM:Status,TRM:Standort,TRM:Eintrag_deaktivieren, |
    TRM:SB,TRM:Anrede,TRM:Name,TRM:Vorname,TRM:Abteilung,TRM:Zugang_LuSiBe,TRM:ZUEP_Gueltig, |
    TRM:Kleine_gueltig,TRM:Grosse_gueltig,TRM:Sonderschulung_I_absolviert,TRM:Sonderschulung_II_absolviert, |
    TRM:Letzte_Aenderung_am,TRM:Letzte_Aenderung_um,TRM:Letzte_Aenderung_durch),#ORIG(?List), |
    #SEQ(1),#ORDINAL(1)

After your answer I changed “ZÜP” into “ZUEP” but that didn’t work.

I am quite curious because I never got the coloured headers to work and with each new Clarion release I hope that this ‘bug’ is solved.

Kind regards,

Volker

The Header Text uses Format() Modifier HT(color) which the Template generation does not correctly support.

Generation ignores the “H” and sees it as a Tree T(type) so adds a Level LONG to the Queue. The Format does not really have a TREE so that extra LONG is seen as a Color (you have * colors) and Zero is Black. Plus that extra column throws off all subsequent columns.

The only way to do in an APP it is NOT in the IDE but at runtime with PROPLIST: settings:

?Browse:1{PROPLIST:HdrBackColor,11} = Color:Red
?Browse:1{PROPLIST:HdrTextColor,11} = Color:White
?Browse:1{PROPLIST:HdrBackColor,12} = Color:Red
?Browse:1{PROPLIST:HdrTextColor,12} = Color:White

As you edit the LIST the column numbers change. So best not use use 11 and 12 instead use a Template to generate Equates like this one:

When you paste code (like your LIST) be sure to select it and press </> so it is formatted as CODE; otherwise, all your Quotes CHR(39) get changed to Typesetter quotes so the pasted code cannot be used.

2 Likes

Hi Carl,

I never had the idea to use PROPLIST for this because I expected the same mess as from the IDE.
I will give it a try. Thank you.

Kind regards,

Volker

For complex LIST formats you may find my List Format Parser helpful. It let me take your posted LIST and view it in lines like below. I’ll paste this into Window… where I find it easier to change a lot of properties…sometimes. You have to know your Modifiers.

 FORMAT('5L(2)|_FM*@[email protected]' &|
        '25C|_FM*[email protected]@'                                        &|
        '25L(2)|_FM*[email protected]@'                                    &|
        '25L(2)|_FM*~Aktiv/Inaktiv~L(0)@[email protected]'                       &|
        '25L(2)|_FM*[email protected]@'                              &|
        '20L(2)|_FM*[email protected]@'                                  &|
        '100L(2)|_FM*[email protected]@'                                   &|
        '100L(2)|_FM*[email protected]@'                                &|
        '130L(2)|[email protected]@'                               &|
        '['                                                        &|
          '25L(2)|[email protected]@'                                &|
                                  ']|F~S.-Ber.~'                   &|
        '['                                                        &|
          '100L(2)|_FMHT(00FFFFFFH)HB(000000FFH)[email protected]@'     &|
          '100L(2)|_FMHT(00FFFFFFH)HB(0000FFFFH)[email protected]@' &|
          '100L(2)|_FM*~11.2.5~S(2)@[email protected]'                        &|
                                          ']|F~Gültigkeiten~'      &|
        '['                                                        &|
          '100L(2)|_FM*~ [email protected]@'                                 &|
          '100L(2)|_FM*~ [email protected]@'                                 &|
                                 ']|F~Sonderschulungen~'           &|
        '40L(2)|_FM*~am~L(0)@[email protected]'                                &|
        '40L(2)|_FM*~um~L(0)@[email protected]'                                  &|
        '150L(2)|_FM*~durch~L(0)@[email protected]|F~Letzte Änderung~'          ), |

And view the Format in a List and all the PROPLIST:

EDIT: and of course upon reading what Carl had written, he’s way ahead of me

Like Carl I reformatted the prop:format
but I did it manually

  '5L(2)|_FM*@[email protected]'                                                    |
& '25C|_FM*[email protected]@25L(2)|_FM*[email protected]@'                            |
& '25L(2)|_FM*~Aktiv/Inaktiv~L(0)@[email protected]'                                |
& '25L(2)|_FM*[email protected]@'                                       |
& '20L(2)|_FM*[email protected]@'                                           |
& '100L(2)|_FM*[email protected]@'                                            |
& '100L(2)|_FM*[email protected]@'                                         |
& '130L(2)|_FM*[email protected]@'                                       |
& '[25L(2)|_FM*[email protected]@'                                         |
& ']|F~S.-Ber.~'                                                      |
& '[100L(2)|_FM*HT(00FFFFFFH)HB(000000FFH)[email protected]@'              |
& '100L(2)|_FM*HT(00FFFFFFH)HB(0000FFFFH)[email protected]@'           |
& '100L(2)|_FM*~11.2.5~S(2)@[email protected]'                                   |
& ']|F~Gültigkeiten~'                                                 |
& '[100L(2)|_FM*~ [email protected]@'                                           |
& '100L(2)|_FM*~ [email protected]@'                                            |
& ']|F~Sonderschulungen~'                                             |
& '[40L(2)|_FM*~am~L(0)@[email protected]'                                        |
& '40L(2)|_FM*~um~L(0)@[email protected]'                                           |
& '150L(2)|_FM*~durch~L(0)@[email protected]'                                      |
& '](200)|F~Letzte Änderung~'                                         |

I am seeing some oddities mainly in the pictures
I’ve never seen @s0 before, but it’s probably ok
I have seen @P_PB but not @PPB again, that’s probably ok
I wasn’t familiar with seeing a period in a date picture, but the help shows it supported

Nah, I’m gonna say the problem isn’t in the pictures…

I suspect part the HT(color)HB(color) parts
I wasn’t familiar with them
and what’s more is I don’t see them documented in HELP[ Format (set LIST or COMBO layout)]

I’d try removing them

1 Like

Hi Mark,

@s0 gives a ‘no string’ and @ppB gives a ‘no number’.

Seems senseless but as these columns are boolean I wanted to represent the values with colours (red for 0 or ‘No’ and green for 1 or ‘Yes’)

The period in the date picture is German. We write our dates like dd.mm.yyyy.
The HT(color)HB(color) are the result of setting the header colours in the IDE. Removing them makes the list box readable but removes the header colours.

Kind regards,

Volker

You have many “*” Colored columns which adds 4 LONG Color fields to the Queue for each cell.

You should take a look at “Y” List Styles. That adds 1 LONG Style field to the Queue for each cell. You can have an entire column use a Style Z(#). You can have both where Z(#) is the column default then the Queue Style number overrides.

You can set colors, font and more:

Style Properties --  ?LIST{ PROPSTYLE:xxx, Style# }
-------------------------------------------------------
PropStyle:BackColor     Background Color
PropStyle:BackSelected  Background Color Selected
PropStyle:BarFrame      Bar frame Color
PropStyle:CharSet       Font Character set
PropStyle:FontColor     Font Color 
PropStyle:FontName      Font Name
PropStyle:FontSize      Font Size
PropStyle:FontStyle     Font Style
PropStyle:Picture       Display Picture
PropStyle:TextColor     Text Color
PropStyle:TextSelected  Text Color Selected

Hi Carl,

The tool is great. :slight_smile: Thank you, it saves a lot of time.

But SYSLIST:HdrBackColor and SYSLIST:HdrTextColor are unknown to my Clarion11. It is also not documented.
I can find HdrSortBackColor and HdrSortTextColor but they are only for the sort column. Strange: This works.

Kind regards,

Volker

I use the asterisks mainly for conditional colours. ‘Red’ represents ‘0’ or ‘no’, ‘Green’ represents ‘1’ or ‘yes’.

The equates are not SYSLIST: they are PROPLIST: as below from PROPERTY.CLW:

PROPLIST:HdrTextColor     EQUATE (7E32H) ! integer: Text color in header
PROPLIST:HdrBackColor     EQUATE (7E33H) ! integer: Background color in header
1 Like

Hi Carl,

Sure. I coded Proplist. Only in my reply I wrote syslist. I will continue to try.
Anyway, I get ‘unknown procedure labels’. Maybe the mistake is somewhere else.

Volker

you should never get ‘unknown procedure labels’ when writing property syntax
your code should look like
?Browse{PROPList:HdrTextColor, 5} = Color:RED

where
?Browse is the actual field equate for the list in question
5 is the column number
RED is replaced with something more appropriate

Hi Mark,

I frequently work with routines and I always forget that I have to indent some lines.
It works now and I have my coloured headers. :slight_smile:

Kind regards and thank you!

Volker

1 Like

Hi Carl,

I forgot to indent the PropList-Lines within my formatting routine and that solved the problem.

Thank you so much!

Volker

1 Like