PxPlus User Forum

Main Board => Discussions => Language => Topic started by: steezware on November 15, 2024, 01:54:31 PM

Title: RGB Listbox Colors
Post by: steezware on November 15, 2024, 01:54:31 PM
The documentation only refers to using the base 16 color for highlighting columns (or rows) in a listbox. Is it possible to use RGB colors?

I have tried '_COLOR'("RGB 180 200 220") and it does not work :(
Title: Re: RGB Listbox Colors
Post by: James Zukowski on November 15, 2024, 02:20:42 PM
What type of list_box are you using? I tried with a Report View and it works fine with a variety of colors, using both RGB: and #xxxxxx formats.
Title: Re: RGB Listbox Colors
Post by: steezware on November 15, 2024, 02:35:58 PM
I'm using a formatted listbox, but have tried with report view as well - with no luck.  What code did you use to test the background color setting I included in my original post? Please send a code snippet, James?

The attached image shows my listbox with '_GREEN' and '_BLUE' backgrounds working fine, then I attempt the '_COLOR' and it does not work.

(https://ibb.co/Nyqr1vp)
Title: Re: RGB Listbox Colors
Post by: steezware on November 15, 2024, 02:52:24 PM
I'm using a formatted listbox, but have tried with report view as well - with no luck.  What code did you use to test the background color setting I included in my original post? Please send a code snippet, James?

The attached image shows my listbox with '_GREEN' and '_BLUE' backgrounds working fine, then I attempt the '_COLOR' and it does not work.
Title: Re: RGB Listbox Colors
Post by: James Zukowski on November 15, 2024, 03:10:25 PM
I've attached my process. I also noticed in your sample that there's a "0," at the beginning of your statement. It acts like there's a quote immediately after the list_box ID, putting the rest of the line in as the contents. Also, confirming that your field separator has been reset to $01$ in the definition (from the standard SEP).
Title: Re: RGB Listbox Colors
Post by: steezware on November 15, 2024, 03:14:12 PM
The 0 (zero) means to add a line to the end of the listbox.
Yes, $01$ is the listbox separator value.

...And - I am wanting to change the line background, not the foreground as in your sample.
Title: Re: RGB Listbox Colors
Post by: James Zukowski on November 15, 2024, 03:17:07 PM
Yes, I understand that. But what I'm looking at is the snip you included. Immediately before the RGB, there's the code for the COLOR, and before that, there's a comma. Where's that coming from...?
Title: Re: RGB Listbox Colors
Post by: martinp on November 15, 2024, 05:38:33 PM
Hang on what version of PVX are you using? :)