On Sep 27, 2008, at 12:46 PM, osb@btcl.net.bd wrote:
Running that project in 2008-4, adding one or more rows to the
listbox, I
get an outofbound exception, unless before the dim i as integer I
write:
if row > me.ListCount-1 then
Return true
end if
i = me.cellTag(row,1).IntegerValue
May be I'm overlooking some new behavior. Can somebody explain me the
reason of the exception being raised?
In version 5.5.5 RB only processed the lines of a listbox that
contained contents. If your listbox is built to display 20 lines
and you only have the first five filled then in 5.5.5 RB only invoked
the CellBackGroundPaint event for rows 0-4. This meant that if you
wanted a listbox with alternate row colors the lower portion of the
listbox would not have the alternating colors. Either that or you had
to fill the lower portion of the listbox with blank entries. As Terry
Ford mentioned in 2005 RB started calling the CellBackgroundPaint
event for every visible row in the listbox. So, if your listbox is
tall enough for 20 rows you can alternate the colors of the rows,
even if they have no contents. However, you cannot reference a
celltag for a row that you have not entered into the listbox which is
what is happening in your case.
Here is the text of the release not pertaining to your question:
Listbox cellbackgroundpaint and default grid lines now draw into the
virtual cell space below and to the right of the actual cell data.
This can be used to draw stripes in background even when no list data
is visible. As such you will need to check row and column to make
sure they are in bounds before accessing data in
CellBackgroundPaint. There is currently no user option to turn
virtual row painting on/off. CellClick and CellTextPaint do not work
with virtual cells.
=== A Mac addict in Tennessee ===
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|