New topic: 

listbox.invalidatecell(row,col) not working as expected

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

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        JimPitchford          Post subject: 
listbox.invalidatecell(row,col) not working as expectedPosted: Wed Oct 26, 2011 
4:42 pm                         
Joined: Mon Apr 11, 2011 2:01 pm
Posts: 26                I'm having problems getting 
listbox.invalidate(row,col) to work.

In my crude example I have a 4 column hierarchical listbox, each column has 
columnTypes of 0,2,3,1 respectively (one of each for demo purposes).  Each row 
uses a rowTag to point to a class Item that contains properties for the data to 
be displayed.

I use the cellTextPaint to identify the respective column being painted and use 
the data from rowTag(row) to populate the respective cell.

I use cellClick and its column parameter to cycle through the 3 checkbox states 
in the second column (columnType 2), followed by updating the data in Item and 
then followed with a me.invalidatecell(row,-1) to update that row each time the 
checkbox changes.

The challenge is that only the first, and sometimes the second columns seem to 
get the right data. In breaking and stepping through the cellTextPaint event it 
shows that only ever updates columns 0 and 1. Columns 2 and 3 don't get 
triggered.  Only when entering and leaving column 2 (type editable) does that 
cell get updated and I see column 2 in the cellTextPaint event. I never manage 
to see column 3 in the event. 

I've tried variations of me.invalidate(-1,-1) and me.refresh but to no avail.

Does anyone know what I'm missing.

Regards

Jim

rb2011r3, OSX 10.6.8   
                             Top                 doofus          Post subject: 
Re: listbox.invalidatecell(row,col) not working as expectedPosted: Wed Oct 26, 
2011 5:07 pm                                 
Joined: Thu Sep 10, 2009 2:50 am
Posts: 169
Location: Santa Cruz, CA, USA                I've seen this behavior when a 
cell is empty. For me only empty cells in the first column get TextPaints, all 
others need some cell text. So if your cells are empty try putting a space or 
whatever in them. (I think the rational is that an empty cell doesn't need a 
TextPaint)   
                             Top                 JimPitchford          Post 
subject: Re: listbox.invalidatecell(row,col) not working as expectedPosted: Wed 
Oct 26, 2011 5:44 pm                         
Joined: Mon Apr 11, 2011 2:01 pm
Posts: 26                No, I don't think that addresses it.

Each of the cells will have a value in them, none are actually empty.

Jim   
                             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