[Lazarus] Caret is not blinking in Unix

Martin lazarus at mfriebe.de
Fri Apr 5 13:32:43 CEST 2013


On 05/04/2013 12:20, Mehmet Erol Sanliturk wrote:
> On each key press , the pressed character appears on the form area , 
> but caret is not blinking even one time .
>

Well the below is all I know. You may have to debug it yourself.

Only other think that comes to mind (but IIRC that is mainly required 
for windows)) is that you need to hide the caret at the start of your 
paint handler, and show it again at the end of the pain handler. Also do 
not Create a new caret in the paint handler (again Windows).

Does it blink in the IDE? Then you can try and look at SynEdit to find 
out how it is done there. (Search FScreenCaret).


>
> On Fri, Apr 5, 2013 at 4:14 AM, Martin <lazarus at mfriebe.de 
> <mailto:lazarus at mfriebe.de>> wrote:
>
>     On 05/04/2013 12:04, Mehmet Erol Sanliturk wrote:
>
>
>         What can be done to make the caret blinking in Unix ?
>
>
>     On WIndows the caret is drawn by the OS. This includes hiding it.
>     On windows (afaik) this is done by inverting pixel colors. Neither
>     drawing, nor hiding does require the Control to paint.
>
>     AFAIK on linux, the caret is drawn by the Widgetsetcode provided
>     by Lazarus. And hiding the caret, is done by invalidating the
>     area, and therefore only effective, if the control repaints itself.
>
>     I do not know what goes wrong in your case, but here are some
>     pointers:
>     - Check that your control receives regular paint messages, and
>     that it does actually paint the area. (It will get a paint
>     messages for a small clip rect only, and must paint into that clip
>     rect.
>     - If no paint messages are received I have no idea, but maybe it
>     is timer related (I haven't looked that deep, but I guess the
>     caret is triggered by a timer.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130405/ea8aca0c/attachment-0003.html>


More information about the Lazarus mailing list