Link to home
Start Free TrialLog in
Avatar of SingBabys
SingBabys

asked on

how to write a Delphi component which has all functionality of TLabel but the caption part of it can include strings in different fonts at same time.

How to write a Delphi  component that has all the functionality of a Delphi TLabel as well as displaying portions of the caption in different fonts.  And also how to develop a property editor for the caption of the component that allows the user of the component to change the font of the text while typing it and see exactly what the component looks.

ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your just looking for RTF text, then expanding on what Eddie said, TMS also do an RTFLabel
Avatar of SingBabys
SingBabys

ASKER

Is there any way to avoid generating an intermediate RTF file when using TRichEdit to implement it?  
of course. like you would programatically add text and modify it. but if you also want to make a property editor for it, you'll have some work to do ;)
Do you possibly know any sample of making a property editor for it?
I've made a sample for you: http://www.ciuly.com/delphi/ui/custom/richlabel/index.html
you should be able to extend it to your needs