New topic: 

Different Colors for Different Rows of ListBox

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

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        barrytraver          Post subject: Different Colors for 
Different Rows of ListBoxPosted: Wed Feb 27, 2013 4:29 am                       
  
Joined: Fri Sep 30, 2005 1:53 pm
Posts: 835
Location: Philadelphia, PA                I have a listbox where each row is 
either a category or a task.

Double-click a category and the category expands to show the tasks in that 
category.  Double-click it again and the category  contracts so that the tasks 
in that category are not shown.

Double-click a task and the task is performed.

Is it possible to set things up so that all category rows have one background 
color and all task tows have another?

The information about the clicking, expanding and contracting, etc. is probably 
unnecessary.  I included it just in case it makes a difference that the listbox 
sometimes  shows the task lines and sometimes doesn't.  (I think I got the code 
for that from a Real Software sample.)  I don't fully understand how it  works, 
but I don't think the contents of the cells actually change, but merely whether 
they are hidden or shown, which should not affect my question.

Right now the only way to distinguish between the category rows and the task 
rows (other than behavior) is that the text in the task rows is indented and 
the text in the category rows isn't.  It would be nice if there could be 
another way to distinguish between the two types of lines, and having different 
colors would be an excellent way.

What I'm asking for may not necessarily be possible.  I know from the Language 
Reference that it's possible to set the background color for the listbox, but 
I'm not really sure whether you can have different colors in different rows.  
(There are over one hundred rows in the listbox, if that makes any difference.)

Thanks in advance for the help.

Incidentally, I expect within a week or so to make available a radically 
updated version of CodeHelper, with lots of new features, including some 
essential documentation.  I know how the listbox menu works, but it wouldn't be 
obvious to someone trying to use CodeHelper with no documentation.

Barry Traver   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
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