Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Dec 14, 2017 10:22 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Listbox Background Colors
PostPosted: Wed Feb 20, 2013 11:44 am 
Offline
User avatar

Joined: Wed Feb 01, 2012 3:06 pm
Posts: 68
This is a real Newbie question - I just can not seem to find how to do this...

I have a multi-column Listbox. In some cases I want to highlight a row to the user. I currently set all the cells to Bold format, but some users have asked to put a red or reddish background in the cells of the row.

How can I set the background color in a listbox cell or row ?

Ron Bower
Ellicott City, MD

_________________
Ron Bower
Ellicott City, MD


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox Background Colors
PostPosted: Wed Feb 20, 2013 12:00 pm 
Offline

Joined: Wed Jan 19, 2011 2:52 am
Posts: 11
Ron,
maybe this link could be useful:

http://forums.realsoftware.com/viewtopic.php?f=10&t=42274

bye

Sergio


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox Background Colors
PostPosted: Wed Feb 20, 2013 12:02 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
In the listbox .cellbackgroundpaint event do something like this:

if row = 5 then
g.ForeColor = rgb(225,100,125)
else
g.ForeColor = RGB(255,255,255)
end if
g.FillRect 0,0,g.Width,g.Height

return true


That will make the 5th row redish I hope... can't remember the rgb values. Play with that.

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox Background Colors
PostPosted: Thu Feb 21, 2013 10:45 pm 
Offline
User avatar

Joined: Wed Feb 01, 2012 3:06 pm
Posts: 68
Thanks for the replies - With your help I now have it working well.

Sorry the delayed response - work got in the way.

Ron Bower

_________________
Ron Bower
Ellicott City, MD


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox Background Colors
PostPosted: Thu Feb 21, 2013 11:12 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
Good deal!

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group