Search found 8 matches
- 23 Apr 2022, 22:09
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
I didn’t find keeping the first item preselected necessary if that’s what you’re asking… "Der Wurm muß dem Fisch schmecken, nicht dem Angler!" … AKA it's about the user. Maybe less important if ignored using a list box, but doing the same with a DropDownList instead will show an initial empty box, ...
- 23 Apr 2022, 11:06
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
There are two things wrong with this: list = [one, two, blue] Should be: list := ["one", "two", "blue"] Obviously I wasn't really awake at that time :oops: Thx :thumbup: list .= (a_index=1) ? item "|" : item "|" ;takes each element of list and ends with | So, where’s the difference in this case? I ...
- 23 Apr 2022, 10:14
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
Nevermind, I got it working by adding AltSubmit... which "gets the position rather than its text". :) list := ["one", "two", "blue", "red"] new_item = my_list := createList(list) Gui, Font, s10 Gui, Add, Text, x12 y40 w180 h30 , list practice Gui, Add, ListBox, AltSubmit w230 r6 vremove, % createLis...
- 23 Apr 2022, 09:54
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
Thanks everyone for your help. This is what I got. list := ["one", "two", "blue", "red"] new_item = my_list := createList(list) Gui, Font, s10 Gui, Add, Text, x12 y40 w180 h30 , list practice Gui, Add, ListBox, w230 r6 vremove, % createList(list) ;Multi allows multiple items to be selected Gui, Add,...
- 23 Apr 2022, 07:06
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
Ohh... I see. That makes sense. Thank you!
- 23 Apr 2022, 04:52
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
Sorry, but I don't understand why this doesn't work: list = [one, two, blue] Gui, Add, ListBox, w230 r4 Multi vremove , % createList(list) Gui, Show,, Mytest createList(array) { for each, item in array list .= (a_index=1) ? item "||" : item "|" ;takes each element of list and... surrounds it with ||...
- 22 Apr 2022, 22:06
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Re: Remove from ListBox list
Wow, thank you so much. And it even removes multiple items! ListBox only accepts "pipe-delimited list of entries", so using an array doesn't work. list = [one, two, blue] Is there a way to make ListBox accept lists so I could use array commands such as adding items through Array.Push.? Or is it bett...
- 22 Apr 2022, 08:16
- Forum: Ask for Help (v1)
- Topic: Remove from ListBox list
- Replies: 14
- Views: 1144
Remove from ListBox list
Hi, I'm new to AHK and have been trying to remove the selected item from a ListBox (the list) by clicking ok. The ListBox contains items from a list. This is what I hope to achieve: I select an item from the Listbox, click ok, and the item is removed. list = blue|red|one|two Gui, Add, ListBox, Multi...