Cause choices to be colored in grid?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Cause choices to be colored in grid?

Post by numberz »

Hi and thanks ahead of time.
Is it possible to assign background colors of choices from dropdowns... to grid fields? And to have different field background colors depending on choice?
In other words, if I chose Yes from the dropdown, the field on the grid would be green, etc.
Regards and thanks,
Harry Carter
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Cause choices to be colored in grid?

Post by customaware »

Here is a demo for you Harry.

Run this and Add a record from the Add Button at the Lower Left of the Query.

You can see where the colors are defined in the Presentation Rules for the Is Valid Attribute.
HarryDemo.bsv.zip
(38.32 KiB) Downloaded 267 times
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Cause choices to be colored in grid?

Post by ACDC »

This works when the reference widget is set to Grid
However, when set to a Combo Dropdown-box, its not possible to do this anymore, it used to work

Also a Text attribute with choices, background color doesn't work either

any ideas ?
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

eagles9999 wrote: Thu Feb 23, 2023 4:36 pm Here is a demo for you Harry.

Run this and Add a record from the Add Button at the Lower Left of the Query.

You can see where the colors are defined in the Presentation Rules for the Is Valid Attribute.

HarryDemo.bsv.zip
Thank you Mark.
Now, I can make this work as you laid it out but, can this work if I have the choices, say, good, bad and ugly in a BO called Rating? You have the choices in the attribute but I have them as looks in the attached image.
rating.jpg
rating.jpg (15.99 KiB) Viewed 4722 times
I think that maybe allowing more choices would cause problems, namely, I'd have to go into the presentation rules and add a color each time I add a choice in the rating BO.

But can it be done? TIA
Regards and thanks,
Harry Carter
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Cause choices to be colored in grid?

Post by customaware »

If you have a seperate BO of the different choices.... Then add a Color Text Attribute to that BO
Color Text.png
Color Text.png (62.72 KiB) Viewed 4708 times
Then, in the Presentation, set it like this....
Presentation.png
Presentation.png (36.07 KiB) Viewed 4708 times
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

Thanks Mark!
Damn you're good.
Regards and thanks,
Harry Carter
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

eagles9999 wrote: Fri Feb 24, 2023 3:54 pm If you have a seperate BO of the different choices.... Then add a Color Text Attribute to that BO

Color Text.png

Then, in the Presentation, set it like this....

Presentation.png
Hmm... where are you getting the "Color Picker" option from in the attribute? I have text and text area? I must be doing something wrong.
Regards and thanks,
Harry Carter
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Cause choices to be colored in grid?

Post by Jaymer »

Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Cause choices to be colored in grid?

Post by customaware »


Hmm... where are you getting the "Color Picker" option from in the attribute? I have text and text area? I must be doing something wrong.
It is one of the Content options for every Plain Text Attributes Harry....
zcolor.png
zcolor.png (7.27 KiB) Viewed 4687 times
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

Okay!
Mark, I'm okay up to the color pickers and I have the shortcut to GC Rating
Do I need to create shortcuts to the Color BG and Color FG attributes also?
Thank you. I'm new to the color thing, so please bear with me.
color bg fg.jpg
color bg fg.jpg (36.06 KiB) Viewed 4679 times
Regards and thanks,
Harry Carter
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Cause choices to be colored in grid?

Post by customaware »

Am a bit snowed under Harry.

Send me the BSV and I will fix it for you.

That will be much quicker that tic tac back and forwards Mate.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

eagles9999 wrote: Sat Feb 25, 2023 12:24 pm Am a bit snowed under Harry.

Send me the BSV and I will fix it for you.

That will be much quicker that tic tac back and forwards Mate.
I agree... didn't realize that I wouldn't "get it" immediately.
By all means, don't feel obligated. I'm just here asking away, hoping to learn from everyone.
Thank you.
Regards and thanks,
Harry Carter
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

Does anyone know off hand why I'm seeing the hex designations for background and foreground in my choices? TIA
Attachments
hex.jpg
hex.jpg (7.15 KiB) Viewed 4642 times
Regards and thanks,
Harry Carter
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Cause choices to be colored in grid?

Post by customaware »

Because you have not explicitly Defined what attributes you want to display in the Combo
harry.png
harry.png (21.39 KiB) Viewed 4638 times
box.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Cause choices to be colored in grid?

Post by numberz »

eagles9999 wrote: Mon Feb 27, 2023 2:47 pm Because you have not explicitly Defined what attributes you want to display in the Combo

harry.png box.
Ahh! Thanks so much.
Regards and thanks,
Harry Carter
Post Reply