Option Explicit
Option CONSOLE OFF
Sub OnItemSelected(ByRef ev as wxListEvent)
wxMessageBox( ev.GetText() )
End Sub
Sub Main
dim f as wxFrame ptr
f = new wxFrame( NULL, wxID_ANY, "listctrl" )
dim listctrl as wxListCtrl ptr = new wxListCtrl( f, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT )
listctrl.InsertColumn(0, "spalte1")
listctrl.InsertColumn(1, "spalte2")
listctrl.InsertItem(0,"Eintrag 1")
listctrl.InsertItem(1,"Eintrag 2")
listctrl.SetItem(0,1,"Eintrag 3")
listctrl.SetItem(1,1,"Eintrag 4")
listctrl.Bind ( wxEVT_LIST_ITEM_SELECTED , AddressOf OnItemSelected )
f.Show(true)
End Sub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link: