B4J Question MouseReleased in Pane

stevel05

Expert
Licensed User
Longtime User
Is there more to the question? Have you tried it?

Simple answer, create the callback sub which will be called when the mouse is released over the target.

B4X:
Private Sub MainForm_MouseReleased (EventData As MouseEvent)
    Log("Released")
End Sub
 
Upvote 0

moore_it

Well-Known Member
Licensed User
Longtime User
hi,

I want to build a class like this.
All events respond only mousereleased not
 

Attachments

  • tmButton.zip
    1.1 KB · Views: 255
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
If you only want the Mouse released event, see the above answer.
Most common uses include Moused own,MouseMove,MouseReleased to create a pick-drag-drop sequence, which you can set with a single event MouseClicked in which the parameters contains the type of action
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
There were a few thing wrong with the code, which is why it didn't work. Try this one. I've just commented the incorrect parts and added where necessary so you can compare the two.


You didn't need to add mbase, base is already added just assign Base to mBase. You don't need to remove and add the canvas every time, just resize it, clear it and redraw.
 

Attachments

  • tmButton.bas
    3.7 KB · Views: 270
Upvote 0

Similar Threads

Top