Don't understand, everything is connected and active in my version!!!
I downloaded your zip again and looked at the LFM file again, but now outside the IDE. Yes, you are right: the ODBCConnection has Connected = true, the database file is specified in its Params.Strings, and the Query is Active. But when I load your project into the IDE, the ODBConnection.Connected is false, and the Query.Active is false, as well. What's going on here?
It is the way you specify the location of the database file. You specify it as a relative path. This is wrong, never use relative paths in relation to database components. At designtime this is relative to the Lazarus folder! I wonder how you were able to establish the ODBCConnection in the first place. Therefore, I was missing code in the FormCreate event or similar, to explicitly open the database:
procedure TForm1.FormCreate(Sender: TObject);
begin
ODBCConnection1.Connected := true;
SQLQuery1.Active := true;
end;
With this event handler in place I can see the items in the LookupListbox. And using Laz trunk (-- see below, on what that is) every item can be selected, and the selection does not disappear after each click (I cannot select several items, and I doubt if that is possible because there is nothing like "MultiSelect" or so among the properties of the DBLookupListBox).
When I compile with Laz 2.0.6 I see the behavior that you describe: When I press the mouse button on an item the item is highlighted, but when I release the mouse button, the highlight goes away.
Laz trunk is the development version, i.e. the version into to all new code is added primarily, all new features, all bug fixes.
Laz 2.0.6 is the last release version, i.e. a snapshot of the trunk version taken some time ago when the developers decided: "OK, let's release this now".
When bugs appear after taking this snapshot and releasing the version their fixes are copied from the trunk version to a special branch of the version tree called "Fixes". It always has odd version numbers, i.e. it is version 2.0.7 for the current release. From time to time a new release of the bug-fixed version will be published, now with an odd number again, here: 2.0.8.
"Your" bug is a bit complicated. According to the svn commit notes, it has been fixed in trunk, but there seem to open issues (
https://bugs.freepascal.org/view.php?id=35458). Or it simply has been forgotten - we're only human...). As a consequence, the issue has not been "resolved", and without this step the patch is not back-ported to fixes. I'll contact Jesus Reyes to whom the original issue has been assign.