Hello!
How can I set the selection cursor in a combobox.
I found that link in PB, but it does not work: http://www.purebasic.fr/english/viewtop ... w=previous
Problem is, that I want to filter the list; after resetting the comboboxgadget items, the selection cursor in the textpart of the box jumps at the beginning.
Any ideas?
Thanks a lot!
__________________________________________________
Link repaired
16.02.2016
RSBasic
PB5.42LTS; ComboboxGadget; set selection cursor;
[SOLVED]; PB5.42LTS; ComboboxGadget; set selection cursor;
O.k.
found that solution:
With GetGadgetText and GetGadgetState should be possible to later add autocomplete to combobox.
found that solution:
Code: Select all
keybd_event_(#VK_END, 0, 0, 0)
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB5.42LTS; ComboboxGadget; set selection cursor;
Do you want to set the cursor to the end?HanPBF wrote:found that solution:Code: Select all
keybd_event_(#VK_END, 0, 0, 0)
Code: Select all
EnableExplicit
Define EventID
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(1, 10, 10, 200, 20, #PB_ComboBox_Editable)
AddGadgetItem(1, -1, "Item 1")
AddGadgetItem(1, -1, "Item 2")
AddGadgetItem(1, -1, "Item 3")
SetGadgetState(1, 1)
SetActiveGadget(1)
SendMessage_(GetWindow_(GadgetID(1), #GW_CHILD), #EM_SETSEL, $fffffff, $fffffff)
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
End
EndIf
ForEver
EndIf