Does anyone know how to MODIFY the text of an item in a listbox? (As opposed to adding a new one)
In VB i would go Listbox1.ListItems(index).Text = "newtext"
For example, the following code displays a listbox with 5 entries... is it possible to have it so that if i click on a list item, a "+" will be added to the front of it's text?
------------------
In VB i would go Listbox1.ListItems(index).Text = "newtext"
For example, the following code displays a listbox with 5 entries... is it possible to have it so that if i click on a list item, a "+" will be added to the front of it's text?
Code:
#Compile Exe #Register None #Dim All #Include "win32api.inc" %ID_LISTBOX = 101 Function PbMain Dim hDlg As Long, i As Long Dialog New 0, "Test", , , 150, 120, %WS_SYSMENU Or %WS_CAPTION Or %WS_MINIMIZEBOX To hDlg Control Add ListBox, hDlg, %ID_ListBox, , 10, 10, 130, 100, _ %WS_TABSTOP Or %WS_HSCROLL Or %WS_VSCROLL, %WS_EX_CLIENTEDGE For i = 1 To 5 ListBox Add hDlg, %ID_LISTBOX, "Item " & STR$(I) Next Control Send hdlg, %ID_ListBox, %LB_SETHORIZONTALEXTENT, 350, 0 Dialog Show Modal hDlg End Function
------------------
Comment