Am Mittwoch, den 30.01.2008, 17:05 +0200 schrieb A.J. Venter:
> > Well, *I* think it's very cool. In fact, when I get back around to my
> > life-long pet project (a chess engine extraordinaire :) this will be
> > the first library I look at for the board UI.
Me too, I'd like to play around and maybe do something useful (or
funny :) with it. It could at least be put on the CCR if not into
lazarus distribution itself.
> 2) THIS is the tricky one so I would like some advice on how I should do
> it. TDoubleBuffer needs to have OnKeyDown,OnKeyUp and OnKeypressed
> events. Being a TCustomControl descendent, it doesn't have them -
> TControl does - but it doesn't have a paint handler.
> Basically - there is no component that has a paint handler that also
> handles key input.
> In the Delphi world people get around this by using callbacks and hooks.
> That's fine, if you are only on windows. Now sure, I could probably go
> put in a bunch of IFDEF's and try to emulate them on each of the
> widgetsets... but somehow I don't think that's the right way.
> The other way I can think of is to just code the keyboardEvents in, by
> copying and pasting from one of the components that do have it - that
> seems like clutter though - code duplication is never a good idea right.
>
> So is there a third way I haven't thought of ? I am very open to
> suggestions and I'm sure somebody here knows something I don't :)
I haven't looked into the sources deeply, but can't you override some
OnKeyXxx-methods to get the key events?
If not, maybe hooking into the surrounding forms events would suffice.
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives