Listview virtual mode

Mar 1, 2010 at 11:04 AM
Edited Mar 2, 2010 at 6:36 PM

Hello all

I'm trying to add listview items using the virtual mode. Unlike in the Silvermoon demo, I would like to add these Items already in the "root" of the listview. I'm using the "AttachItem" event like this:



void OnAttachItem(object sender, TreeViewItemEventArgs e)
int index = e.Index;

// stationList is a list containing StationData entries
StationData data = stationList[index];

e.Item = new StationItem(data.stationName);



This is giving me the following error, when scrolling down a certain number of entries (listview has around 500 listitems): "Error 1285 by glTexImage2D" or an "OutOfMemoryException" in Silvermoon's "texture.cs" method "CreateTexture". Anyone know, what this error means? Is there anyone who can help me with a simple example of the virtual mode and >100 listitems?

Any help would be appreciated!

Thanks, Rob

Mar 4, 2010 at 2:47 PM

Never mind. I found the problem... I was creating multiple fonts using "Font" instead of "FontSprite", which caused the error.