Hi!
My users want a ComboBox that shows a list of matching items as the user types in the name of item.
Is there a way to force ComboBox dialog control to display the list of items programatically? I can't seem to find any such method or property with xray when inspecting one.
I can make a Function, that will generate necessary String Item List, but that alone without auto displaying the narrowed down list makes little sense.
[Solved]Dialog ctrl ComboBox show matching autocomplete list
[Solved]Dialog ctrl ComboBox show matching autocomplete list
Last edited by JulianR on Mon Feb 11, 2019 10:48 am, edited 1 time in total.
Apache OpenOffice 4.1.1 / LibreOffice 5.3 / LibreOffice 6.0 / LibreOffice 6.2 on Windows 7
Re: Dialog control ComboBox show matching autocomplete list
I tried myself to look if I could open an OO combobox dropdown from OOBasic but failed to find a way.
It can be opened with the keyboard rather than the mouse by pressing Alt + the down arrow.
You could try a combination of textbox + listbox instead of a combobox.
It can be opened with the keyboard rather than the mouse by pressing Alt + the down arrow.
You could try a combination of textbox + listbox instead of a combobox.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Dialog control ComboBox show matching autocomplete list
Use a multi-line list box (drop down property = No) and tell your users that you can type into a focussed list box.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Dialog control ComboBox show matching autocomplete list
Thanks guys, I'll give those options a try.
Apache OpenOffice 4.1.1 / LibreOffice 5.3 / LibreOffice 6.0 / LibreOffice 6.2 on Windows 7
Re: Dialog control ComboBox show matching autocomplete list
It might be possible to get the combo to open by simulating a mouse click with Windows api calls (like mouse_event) - though I couldn't manage that.
Another option would be to make something combo-like using a second dialog as your dropdown - see attached example. As you're on Windows, for speed, I've used code from VBHelper to change the window style of the 'dropdown' dialog to remove the titlebar.
http://www.vb-helper.com/howto_change_window_style.html
An OO dialog without titlebar can be created by modifying this code:
viewtopic.php?f=21&t=92867
Another option would be to make something combo-like using a second dialog as your dropdown - see attached example. As you're on Windows, for speed, I've used code from VBHelper to change the window style of the 'dropdown' dialog to remove the titlebar.
http://www.vb-helper.com/howto_change_window_style.html
An OO dialog without titlebar can be created by modifying this code:
viewtopic.php?f=21&t=92867
- Attachments
-
- mock windows combo.odt
- (13.8 KiB) Downloaded 206 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Dialog control ComboBox show matching autocomplete list
Solution here:
viewtopic.php?f=39&t=74909
viewtopic.php?f=39&t=74909
Code: Select all
dlg.getcontrol("ComboBox1").AccessibleContext.doAccessibleAction(0)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Dialog control ComboBox show matching autocomplete list
Thank you JeJe, it works flawlessly.
Apache OpenOffice 4.1.1 / LibreOffice 5.3 / LibreOffice 6.0 / LibreOffice 6.2 on Windows 7