New topic: 

listbox alternate color question

<http://forums.realsoftware.com/viewtopic.php?t=46253>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        HMARROQUINC          Post subject: listbox alternate color 
questionPosted: Sat Dec 15, 2012 8:46 pm                                 
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 279
Location: Guatemala, Central America                I have a listbox in which I 
alternate the back color of each row. The problem I'm facing is that when the 
row is selected the text color turns white making it impossible to read.

What can I do to keep the color from changing or force a repaint of the text in 
black or perhaps any other color that still reflects the fact that the row is 
selected but allows for the text to be read?

Thanks!      
_________________
Windows 8 Pro 64 bit / 8 GB RAM
Windows 7 Premium / 8 GB RAM
Windows 7 Home Premium 64 bit SP1 / 4 GB RAM
Windows XP Pro SP3 / 2 GB RAM
OSX 4 GB RAM
UBUNTU 2 GB RAM  
                             Top                charonn0          Post subject: 
Re: listbox alternate color questionPosted: Sat Dec 15, 2012 8:54 pm            
                     
Joined: Mon Apr 02, 2007 2:08 am
Posts: 1046
Location: San Francisco, CA, USA                In the CellTextPaint event, 
change the forecolor of the cell's graphics object to a contrasting color.      
_________________
Boredom Software  
                             Top                HMARROQUINC          Post 
subject: Re: listbox alternate color questionPosted: Sat Dec 15, 2012 9:09 pm   
                              
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 279
Location: Guatemala, Central America                charonn0 wrote:In the 
CellTextPaint event, change the forecolor of the cell's graphics object to a 
contrasting color.

Thanks for your answer!

if me.Selected(row) = true then g.ForeColor = rgb(200,200,200)

That's what I had, I was just calling it after a return true      
_________________
Windows 8 Pro 64 bit / 8 GB RAM
Windows 7 Premium / 8 GB RAM
Windows 7 Home Premium 64 bit SP1 / 4 GB RAM
Windows XP Pro SP3 / 2 GB RAM
OSX 4 GB RAM
UBUNTU 2 GB RAM  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to