PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Bob Sosbee on February 10, 2020, 06:33:32 PM

Title: Does Tree View list boxes support colors?
Post by: Bob Sosbee on February 10, 2020, 06:33:32 PM
Customer would like to highlight in an BOM tree view those components they have sufficient stock for as Green and insufficient stock for in Red.  I can set a check box, but I can't seem to get any colors to work.

It Tree View does support colors, can someone show me a sample line on setting the color on the list box write, or does it have to be done as an attribute?

Title: Re: Does Tree View list boxes support colors?
Post by: Mike King on February 11, 2020, 10:51:02 AM
With PxPlus 2020, due to be released May 2020, we have added a 'ItemTextColor$ attribute which will provide you the ability to change the colour of individual items in a tree view.

In the interim what I might suggest is using different ICONS in the tree view to represent status.  Please see the write up on setting the Tree view state at
https://manual.pvxplus.com/page/PxPlus%20User%20Guide/Graphical%20User%20Interfaces/Control%20Objects/List%20Box.htm   

You could alternatively use a Bitmap as opposed to a state indicator.  Perhaps use something like the !Exclamation image.



Title: Re: Does Tree View list boxes support colors?
Post by: Bob Sosbee on February 11, 2020, 12:48:13 PM
So I can only use bitmaps.  So far I'm using the !Tree... bitmaps.  Am I able to put more than one bitmap a record?
Title: Re: Does Tree View list boxes support colors?
Post by: Mike King on February 11, 2020, 04:13:37 PM
You can include both a State image and a Bitmap on tree view items.