[lazarus] Need your thoughts on Caret

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Aug 12 09:06:06 EDT 2003

On Tue, 12 Aug 2003 12:07:11 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> Michael Van Canneyt wrote:
> > 
> > On Tue, 12 Aug 2003, Micha Nelissen wrote:
> > 
> > 
> >>Mattias Gaertner wrote:
> >>
> >>
> >>>On Mon, 11 Aug 2003 20:56:52 +0200
> >>>Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> >>>
> >>>
> >>>
> >>>>If you trace code flow you will see that ShowCaret indeed returns
> >false>>>most of the time if not always.
> >>>>
> >>>>Since this involves more than simply adjusting the win32 interface, I
> >>>>ask for your thoughts on this.
> >>>
> >>>
> >>>You mean, changing the synedit code?
> >>>The caret showing code in synedit has not much changed for the LCL.
> >Does the>>synedit1 example work under win32 intf?
> >>
> >>Exactly what I expected! The caret *seems* to work, ie. it appears (but
> >>does not respond to keypresses).
> > 
> > 
> > The keypress problem is more general: none of the examples respond to
> > keypresses, except where a native windows widget is used. Custom key
> > handling doesn't work anywhere. So that is not related to the caret...
> OK, will place that on the TODO. But right now, I'm interested in that 
> caret functionality...has the synedit caret ever worked correctly then? 
> Also when focus was removed and restored?

I never tried synedit under win32 interface. 

To the keypress:
WM_KEYDOWN messages are sent in the win32 intf as LM_SYSKEYDOWN. I thought,
LM_SYSKEYDOWN is for system keys like Alt+X. I changed that. Maybe you can
check that.

To the caret:
The gtk-interface supports one caret per handle and carets that don't hide
on lost focus.  CreateCaret and DestroyCaret are nearly automatically
called. And so the bug of Create/DestroyCaret calls in the synedit never
appeared under gtk. The calls are not balanced in synedit. I fixed thst for
the focus messages.

I will commit as soon as the server is back.
I can now edit some text in the synedit example under win32 intf. But it is
flickering and the client width/height is not correct.


More information about the Lazarus mailing list