<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>You will have to create a new listbox style, that has two TText objects in it, one aligned to top and one client, then assign this to the StyleLookup of the listitems as you add them. Also create an event handler to the OnApplyStyleLookup event of each item and in this event find the resources (Text objects) and assign the values.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>I myself subclass the TListBoxItem object, create my own text objects in the create event, and provide properties for the Name and Address, much cleaner, then use this new subclass when creating the listviewitem objects.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Jason<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> delphi-bounces@listserver.123.net.nz [mailto:delphi-bounces@listserver.123.net.nz] <b>On Behalf Of </b>Vik Vasudev<br><b>Sent:</b> Friday, 15 February 2013 10:31 a.m.<br><b>To:</b> NZ Borland Developers Group - Delphi List; NZ Borland Developers Group - Delphi List<br><b>Subject:</b> [DUG] Changing Font in a multi line list box (Firemonkey)<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hello Everyone <o:p></o:p></p><div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is there anyway i can have multiple font for multiline text on a listbox items.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>For instance<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I have text FirsName Last Name<o:p></o:p></p></div><div><p class=MsoNormal> Address<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I want Address to have different font.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Dummy Code<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>//<o:p></o:p></p></div><div><div><p class=MsoNormal> TClientDetail = Record<o:p></o:p></p></div><div><p class=MsoNormal> FCln_Ref : Int64;<o:p></o:p></p></div><div><p class=MsoNormal> FCln_FirstName : string;<o:p></o:p></p></div><div><p class=MsoNormal> FCln_LastName : string;<o:p></o:p></p></div><div><p class=MsoNormal> FFullName : string;<o:p></o:p></p></div><div><p class=MsoNormal> FCoName : String;<o:p></o:p></p></div><div><p class=MsoNormal> FAddress : string;<o:p></o:p></p></div><div><p class=MsoNormal> end;<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal> TClientList = class (TListBoxItem)<o:p></o:p></p></div><div><p class=MsoNormal> public<o:p></o:p></p></div><div><p class=MsoNormal> FCln_Detail : TClientDetail;<o:p></o:p></p></div><div><p class=MsoNormal> end;<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> lClnobj := TClientList.Create (Listbox)<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.FCln_Detail.FFullName := lClnobj.FCln_Detail.FCln_FirstName<o:p></o:p></p></div><div><div><p class=MsoNormal> +' '+ lClnobj.FCln_Detail.FCln_LastName;<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> lClnobj.FCln_Detail.FAddress := FGlobalRWqry.FieldByName<o:p></o:p></p></div><div><p class=MsoNormal> (Fld_Address).AsString;<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.Text := lName + #13#10 +<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.FCln_Detail.FCoName+<o:p></o:p></p></div><div><p class=MsoNormal> #13#10 +<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.FCln_Detail.FAddress;<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.Height := 40<o:p></o:p></p></div><div><p class=MsoNormal> lClnobj.EndUpdate;<o:p></o:p></p></div><div><p class=MsoNormal> listbox.AddObject (lClnobj);<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I am using #13#10 to make it look like Multiline but i am not sure how to i change the font of text in multiline<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Appreciate your help <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks<o:p></o:p></p></div><p class=MsoNormal><span style='color:#888888'>Vikas</span><o:p></o:p></p></div></div></body></html>