Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » [SOLVED] How to use ColorDisplay?
[SOLVED] How to use ColorDisplay? [message #50373] Thu, 04 October 2018 15:54 Go to next message
Patisab is currently offline  Patisab
Messages: 21
Registered: December 2015
Location: France
Promising Member
Good afternoon,

In an SqlArray i want to change background color for some rows. For instance, in an array with 8 rows, i want rows 2 to 4 with red background then rows 5 and 6 with blue background and the last row with green background. I want to have the possibility to change colors in my program.

I found in the forum that i have to use Display. The documentation talk about ColorDisplay and i have seen something about a Display's function named PaintBackground.

Someone could explain to me how i can use all of these, please?

Thank you very much for your help.

Best regards.

[Updated on: Tue, 09 October 2018 12:08]

Report message to a moderator

Re: How to use CoorDisplay? [message #50376 is a reply to message #50373] Fri, 05 October 2018 11:16 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
Hi,
you can use SetLineColor:
array.SetLineColor(1, LtRed());
array.SetLineColor(2, LtRed());
array.SetLineColor(3, LtRed());

array.SetLineColor(4, LtBlue());
array.SetLineColor(5, LtBlue());



regards
omari.
Re: How to use CoorDisplay? [message #50379 is a reply to message #50376] Mon, 08 October 2018 07:45 Go to previous messageGo to next message
Patisab is currently offline  Patisab
Messages: 21
Registered: December 2015
Location: France
Promising Member
Good morning omari,

Thank you for your answer, but the setLineColor function does not exist for SqlArray. I obtain this error message when i compile :

error: 'class Upp::SqlArray' has no member named 'setLineColor'
Re: How to use CoorDisplay? [message #50380 is a reply to message #50379] Mon, 08 October 2018 08:08 Go to previous messageGo to next message
Patisab is currently offline  Patisab
Messages: 21
Registered: December 2015
Location: France
Promising Member
I had a doubt and i have looked after number of upp's version. I'm sorry for my last response, setLineColor exists but not in the version 9251. Mea culpa, mea maxima culpa.
Re: How to use CoorDisplay? [message #50381 is a reply to message #50380] Mon, 08 October 2018 09:17 Go to previous messageGo to next message
Patisab is currently offline  Patisab
Messages: 21
Registered: December 2015
Location: France
Promising Member
Rhaaa, many problems with UPP 11873. I use TDM-GCC-64 compiler. If now i see setLineColor function in the IDE, i still have the error message when i compile :

error: 'class Upp::SqlArray' has no member named 'setLineColor'


I don't understand the problem Confused
Re: How to use CoorDisplay? [message #50382 is a reply to message #50381] Mon, 08 October 2018 11:17 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
my guess is that, you have more than one upp installation, and your app is still using the old one.
if your app is in MyApps assembly, please, check your file MyApps.var, verify that the uppsrc is in the new upp version.
here is mine
UPP = "C:\\upp/MyApps;C:\\upp/uppsrc";


Note:
instead of TDM-GCC, you can download upp-mingw-11873.7z, that chipped with a preconfigured mingw64 version.
and instead of the stable version, considere using the nightly build, it is also stable, and up to date.


regards
omari.
Re: How to use CoorDisplay? [message #50383 is a reply to message #50381] Mon, 08 October 2018 11:49 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello patisab,

Quote:
Rhaaa, many problems with UPP 11873. I use TDM-GCC-64 compiler. If now i see setLineColor function in the IDE, i still have the error message when i compile


I agree to omari's suggestion that you should better use the MingGW64 version bundled with u++.

Aside from that, did you check the spelling? U++ does not use the so-called "camel case" notation: There is no setLineColor method in SQLArray. It should be SetLineColor.

Please take your time and read documentation (especially on coding style), it will help you a lot. Smile

https://www.ultimatepp.org/www$uppweb$codestyle$en-us.html

Best regards,
Oblivion


[Updated on: Mon, 08 October 2018 12:00]

Report message to a moderator

Re: How to use CoorDisplay? [message #50385 is a reply to message #50383] Tue, 09 October 2018 12:07 Go to previous message
Patisab is currently offline  Patisab
Messages: 21
Registered: December 2015
Location: France
Promising Member
I have s**t in my eyes Sad oblivion is right and now i can compile without error... with TDM-GCC which gives me satisfaction Wink

Thank you very much everybody for your advices and your sharp eye.
Previous Topic: Click problems in embedded controls in GTK mode
Next Topic: GridCtrl - Get() with sorted rows
Goto Forum:
  


Current Time: Thu Mar 28 15:11:08 CET 2024

Total time taken to generate the page: 0.01490 seconds