Recent

Author Topic: TMemo  (Read 3892 times)

xealot

  • Newbie
  • Posts: 1
TMemo
« on: March 03, 2009, 11:06:04 pm »
hi, not sure if this is the right place to ask..

I need multi color capability for the TMemo, I've been thinking about it, I started using Lazarus only very recently, for Delphi i would probably implement my code in the OnPaint event and look for special chars in the text to be read to determine colour..

But TMemo does not have an OnPaint event in Laz, so how should I do this, is there any easy way at all?

Otherwise, Im forced to use some rich text component I found for laz, which is horribly slow in rendering.. not quite suitable for a chat :).

 - Xealot

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: TMemo
« Reply #1 on: May 09, 2009, 01:19:25 am »
Either use a rich text component or write your own component. Check in the wiki, in "Developing with Graphics" about how to create a TCustomControl descendent which paints itself. Then you have full control about the looks of your control. You will need to implement a caret and paint the text and everything else but it will be a great solution in the end.

 

TinyPortal © 2005-2018