New topic: Listbox Bug?
<http://forums.realsoftware.com/viewtopic.php?t=43963> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message neonash7777 Post subject: Listbox Bug?Posted: Fri May 11, 2012 11:06 am Joined: Mon Nov 29, 2010 7:01 pm Posts: 174 I have a Listbox that loads in various data from an SQL database based on user selections. After loading a number of different views the program crashes. I couldn't figure out why until recently. The problem is that you're only allowed 64 columns - which inherently isn't a problem as I never display that many at one time. The problem exists in that the columns don't get deleted when I load a new report. (Note* lb is a listbox) lb.DeleteAllRows lb.ColumnCount = 0 For i as integer = 1 to rs.FieldCount dim n as string = rs.IdxField(i).Name lb.addColumn(n,n,"") Next Because I can't do lb.DeleteAllColumns i just set the ColumnCount to 0 to get rid of them, the problem is that eventually the addColumn method will be called enough times to exceed the 64 column limit as the columns aren't actually deleted. I'm thinking the best way to work around this is to just start the listbox off with 64 columns, all with 0 for a width. Then don't call addColumn, and just change the columns width and other properties when I need it. Comments? Suggestions? 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]
