Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3798

Raise event of a control from a class derived from the control

$
0
0

Hi all, long term user, but first time poster!
My goal is simple. I am creating a very simple script editor for my desktop app(on Mac).
I wish to pass on the MouseWheel event from the TextArea1 to TextArea2.
For this I have create a class Called xTextArea that derives from DesktopTextArea. in this class I have a method called Scroll.

Public Function Scroll(x As integer, y As integer, deltaX As integer, deltaY As integer) As Boolean
Return RaiseEvent MouseWheel(x,y,deltaX,deltaY)
End Function

So when I scroll the editor DesktopextArea, on the MouseWheel, I can call the method scroll on the other one which is a xTextArea, and thus, it receiving the the deltaX and deltaY values.

Unfortunately it does not compile and says MouseWheel does not exists! . if it derives from DesktopTextArea, surely I should be able to call its events. Am I missing something?

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3798

Trending Articles