Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-06

The drop-down menu not list data table

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

peng

Hello,
I connect to a database, using the DBComboBox component, linked to a field in the Datasource, running, we can see the current record field values. However, the mouse click it, the drop-down box is empty. How can the drop-down box show records that all of the query?

Regards
APeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080626/a4faf704/attachment-0001.html

Reply by email

Joost van der Sluis
to peng

Op donderdag 26-06-2008 om 17:43 uur [tijdzone +0800], schreef peng:

Show quoted text 5 lines
I connect to a database, using the DBComboBox component, linked to a field in the Datasource, running, we can see the current record field values. However, the mouse click it, the drop-down box is empty. How can the drop-down box show records that all of the query?

You have probably only set the datasource+field of the field in which you want to store the data. You also have to provide a datasource and two fields (one with the key, one with the value you want to show) to generate the list from which you want to choose. Look at ListDatasource, KeyField and ListField.

Joost

Reply by email

peng
to Joost van der Sluis

ListDatasource? I can not find it. is it a component?

You have probably only set the datasource+field of the field in which

Show quoted text 7 lines
you want to store the data. You also have to provide a datasource and two fields (one with the key, one with the value you want to show) to generate the list from which you want to choose. Look at ListDatasource, KeyField and ListField. Joost

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080626/e62eba50/attachment.html

Reply by email

peng
to Joost van der Sluis: Op donderdag 26-06-2008 om 17:43 uur [tijdzone +0800], schreef peng: You have probably…

Oh, I found, ListDatasource is delphi components DBLookupComboBox attributes. Moreover, the situation was not encouraging, Lazarus has not yet developed this component. I would like to see:
http://bugs.freepascal.org/print_bug_page.php?bug_id=8257, it said:

Summary: 0008257: Mossing components DBLookupComboBox and DBLookuplistBox
Description: This componets does almost the same as DBComboBox and DBListBox but have some extra fields
KeyField
ListField
ListFieldIndex
ListSource

I would like to, whether there are ways ? For example, PopupMenu + TDBlistBox used to simulate DBLookupComboBox. Who can give suggestions ?

2008/6/26 Joost van der Sluis :

Show quoted text 8 lines
You have probably only set the datasource+field of the field in which you want to store the data. You also have to provide a datasource and two fields (one with the key, one with the value you want to show) to generate the list from which you want to choose. Look at ListDatasource, KeyField and ListField. Joost

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080715/c8568c22/attachment.html

Reply by email