ListIconGadget Changing Color / Colour

Just starting out? Need help? Post your questions and find answers here.
User avatar
C87
Enthusiast
Enthusiast
Posts: 176
Joined: Mon Jul 17, 2017 7:22 am
Location: Cotswolds England

ListIconGadget Changing Color / Colour

Post by C87 »

Is it possible to have a row change colour in a ListIconGadget() depending up the content of a CheckBoxGadget() in the underlying table?

In the program a user will tick the CheckBoxadget() if the line is completed. So there will be a majority of lines complete, with incomplete easy to see due to the colour. When there are maybe one or two in hundreds of records, it is so easy to spot. I know I could run a filter showing the "incompletes" but prefer to use the colour option in the application, as it is quick and easy when editing data. Plus not happy about users thrashing up and down the database, switching filters on and off all the time.

Presumably if it is possible, then different fields on a record can also have different colours. Which would be handy.
If it's falling over......just remember the computer is never wrong!
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: ListIconGadget Changing Color / Colour

Post by jacdelad »

It is, use SetGadgetItemColor(). There is no automatism, so you have to color them yourself.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
AZJIO
Addict
Addict
Posts: 1317
Joined: Sun May 14, 2017 1:48 am

Re: ListIconGadget Changing Color / Colour

Post by AZJIO »

Post Reply