If the list item caption starts with <img> tag, the lookup list is not initialized.
It could be an issue with any HTML in the caption, but I did not test that.
Can this be fixed so lookup works with HTML too?
Pieter
(Pieter)
October 23, 2017, 11:55am
2
Hi,
We have tested this here but are not able to reproduce this.
When we executed the following code on a default TAdvSmoothListBox, the lookup bar shows the letter "T" active:
AdvSmoothListBox1.Items.Clear;
AdvSmoothListBox1.Items.Add.Caption := '<img src="MyImage"></img>test';
Please provide a sample / sample code which reproduces this issue
ah ok, I see what I have different. I also use anchor, so try
<img src="MyImage"></img><A href="link">test</A>
so the problem is actually opposite, it ignores the text inside anchor tag
Pieter
(Pieter)
October 23, 2017, 4:38pm
4
Hi,
Even with this code we are not able to reproduce this issue
procedure TForm24.FormCreate(Sender: TObject);
begin
AdvSmoothListBox1.Items.Clear;
AdvSmoothListBox1.Items.Add.Caption := '<img src="MyImage"></img><A href="link">test</A>';
end;
thank you for responses! I was able to narrow it down...
the problem is the space character between the icon and the Caption.
So how this can be solved? If I remove space, the icon is too close to text.
Ignoring white space characters when adding to lookup index would be solution.
Pieter
(Pieter)
October 24, 2017, 8:53am
6
Hi,
Thank you for this information, we've added a trim, when comparing stripped HTML text, which should clear out spaces, and show the T active in the lookup-bar.
Thanks a lot! Your support is excellent.
And sorry for my incorrect assumptions