wxListCtrl

BlitzMax Modules Forums/Brucey's Modules/wxListCtrl

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's the methd I use to "recreate" the list :

	Method PopulateIndexes(table:TDBATable)
		indexesList.ClearAll()
		SetIndexHeadings()
		
		If table Then
			Local list:TList = table.ListIndexes()
		
			Local i:Int = 0
			For Local index:TDBAIndex = EachIn list
				index.InsertIntoList(i, indexesList)
				i:+ 1
			Next
		End If
	End Method

Notice that the listctrl itself isn't deleted/removed (unlike in the sample, which is doing other things). Calling ClearAll() will remove *all* the data *and* the column headings. So the first thing we do is re-apply the headings.
Then the code iterates through a list of data, and calls the previously mentioned method to actually add the data to the list.

Remember, this is just one way to do everything.

But basically, the steps involved are :

* Clear your list
* Add headers if you need them
* Insert your row items.

:o)