[Gambas-user] ListView item coloring

Jesus Guardon jguardon at ...2035...
Sat Jan 10 17:21:37 CET 2009


Happy New Year 2009

Quick question: Is there any way to coloring each individual item in a
listview? No such property in this class, but I wonder if it should be
implemented in an inherited control. If so, I have no clues where to begin.
Something like this:

listview.Add(key as String, text as String, [color as Color, Picture as
Picture, after as String])as Object...

defaulting color to Black if not specified.

My listview is adding items from a telnet socket, line by line, and
depending on its contents, they should be colored properly. At the same
time, it needs to limit the number of items to, let say 200, so I check to
delete the first item on every update. Double clicking on an item, returns
its text to perform other routines.

I've managed this with a  gridview, but when there are a lot of rows, it
turns very slow and flickering (because adding and removing rows
dynamically), so would be nice -and pretty fast- to have this feature in a
listview.
In the other hand, I think textedit and editor have not functionalities to
return a whole line text, or accesing an specific line index (at least
textedit) and using editor would be a waste of resources.

Any help is appreciated.

Jesus Guardon

Gambas 2.9 - Ubuntu 8.10 - AMD Athlon 64 3000+ 2Gb RAM

-- 
View this message in context: http://www.nabble.com/ListView-item-coloring-tp21389683p21389683.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list