Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete List Box Item in Dialog
#1
ok i know how to delete things in a list box in a dialog
but when i run the code
SendMessage a LB_DELETESTRING 0 b it always deletes the top thing in it
i would like it to delete what i have typed into the edit above it
here is the code i have so far but it still deletes the top thing in the list box

Code:
Copy      Help
int a=id(3 "Dialog");;list box
str b.getwintext(id(4 "Dialog"));;type in edit what you want to delete
SendMessage a LB_DELETESTRING 0 b

could someone please tell me what to change in that code so it will delete what i have typed in the edit
and also how when i select something in the list box, it puts what ever is selected into the edit

list box id = 3
edit id = 4

Thanks
#2
don't know, try setwintext

also try, instead of using two controls (edit and listbox), use single combobox control (combo simple editable).
#3
ok wut i mean is do you know how to make it delete what i have selected in the list box
sorry i wasn't so clear

basically if i select out of TEST 1 TEST 2 TEST 3, i select TEST 2

what can i run to make it delete TEST 2 and leave TEST 1 and TEST 3 still in it

Thanks for fast response
#4
Not tested
Macro
Code:
Copy      Help
_i=LB_SelectedItem(a)
if(_i>=0) SendMessage a LB_DELETESTRING _i 0
#5
Perfect

Thanks Gintaras


Forum Jump:


Users browsing this thread: 1 Guest(s)