How to get a ComboBox to map like a ListBox?

Creating and using forms
Post Reply
billopenoffice2454
Posts: 1
Joined: Mon Oct 19, 2015 5:38 am

How to get a ComboBox to map like a ListBox?

Post by billopenoffice2454 »

I'm having a problem creating a form with LibreOffice's Database. I want my ComboBox to have the same capibility as a ListBox.

Specifically, I want to create a selection list from a name field from another table and upon selection of this name field, return the corresponding primary key and place it into an ID-pointer of a record field that i'm currently populating in a different table.

I realize i can do this with a ListBox. But, I want to do this with a ComboBox because the ComboBox works better. it lets me type part of the String and have the list jump to the nearest record without needings to scroll through a huge list of elements as with the ListBox.

So I'm wondering. Is it possible to emulate the Translation capiblity of the ListBox in a Combobox by writing a macro? Another angle, is it possible to make the ListBox act like a textbox/combobox by setting a control property. (Note, I already know about dropdown property. What I want is it to behave llike a TextBox and allow me to look up the name field by typing the string and then translate it into the id field.)
/
OpenOffice 4.1.1 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to get a ComboBox to map like a ListBox?

Post by Villeroy »

billopenoffice2454 wrote:I realize i can do this with a ListBox. But, I want to do this with a ComboBox because the ComboBox works better. it lets me type part of the String and have the list jump to the nearest record without needings to scroll through a huge list of elements as with the ListBox.
You can do the same with a list box. Sort the visible entries in ascending order, focus the list box and type the lookup text. Alt+Down drops down the list. Alternatively you can implement a multi-line listbox.
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
Post Reply