Page 1 of 1

mousewheel on get

Posted: Fri Jul 14, 2006 3:11 pm
by Detlef Hoefner
Hi all,

is there a way to detect a mousewheel movement on a get?

Similar to a spinner i would like to enhance numeric gets with a method for incr. and decr. by srolling the mousewheel up or down.
Photoshop i.e. does this and i find it very comfortable.

But i have no idea how to recognize the wheel over a get.

Could anybody give me a hint for this?

Thanks,
Detlef

Re: mousewheel on get

Posted: Fri Jul 14, 2006 4:16 pm
by Enrico Maria Giordano
You have to inherit your own TMyGet and add MouseWheel() or HandleEvent() methods to it (or modify the standard TGet class).

Have a look at TWBrowse and TRichEdit for a sample.

EMG

Posted: Fri Jul 14, 2006 4:28 pm
by Detlef Hoefner
Hi Enrico,

i feared you were in holiday :wink:

Until now i didn't yet work with inherited classes.

Do you mean something like :
TMyGet from TGet and then overide the method MouseWheel() from the window class with my own code?

I will try this. I think i remember a description from James Bott how to do such things.

Thanks and regards,
Detlef

Posted: Fri Jul 14, 2006 4:34 pm
by Enrico Maria Giordano
Detlef Hoefner wrote:Hi Enrico,

i feared you were in holiday :wink:
:-)
Detlef Hoefner wrote:Until now i didn't yet work with inherited classes.

Do you mean something like :
TMyGet from TGet and then overide the method MouseWheel() from the window class with my own code?
Yes, exactly.

EMG