TAdvMetroTile not recognising HTML

If I set the caption property of a TAdvMetroTile to something like

    <B>Bold Caption</B>

it's correctly recognising the caption as containing HTML and formats it correctly.

However, if I set it to:

    Line 1<BR>Line 2

to try to display the caption on 2 lines it's not recognising the HTML and is displayed as ordinary text.

The problem seems to be this line:

    if pos('</', Caption) > 0 then  in procedure TAdvCustomMetroTile.DrawButtonContent

which is detecting closing HTML tags, but obviously not HTML tags which dont have a closing tag, like <BR>, <HR>, <IND x="indent">, <IMG src="name">

I can get around the problem for now by putting something like </B> on the end of the caption, which is then ignored by the HTML formatter as there is no corresponding <B>, but it would be good if you could fix the check to include these other HTML tags.


This is by design to have a low overhead / fast detection of HTML and use of the HTML engine versus direct text drawing. The solution is indeed to add a dummy tag if you have no other closing tag in the text.