I want the TDPFButton to have a border when the click event occurs, and the border to disappear when the mouse up event occurs. I can accomplish the border when mouse down event happens, but I can't reset the border to zero width because there is no mouse up event. Is it possible to have mouse up event for button, or in general for all controls?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, they are not proper events. But they must be available somehow (through gestures or whatever) so that one can trap the up and down events. I am sure it is somehow done in the iOS world, no?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it worked. Wonder why it took me so long to get it after your first suggestions. I think I was relying too much on the names of these two handlers. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want the TDPFButton to have a border when the click event occurs, and the border to disappear when the mouse up event occurs. I can accomplish the border when mouse down event happens, but I can't reset the border to zero width because there is no mouse up event. Is it possible to have mouse up event for button, or in general for all controls?
Hi,
You can use TDPFButton.OnClick instead of Mouse up,
I used this event for onclick
regrads
What I want to accomplish is this effect:
button OnMouseDown -> set button border width = 2
button OnMOuseUp -> set button border width = 0
OnClick only gives me mouse down -
MouseDown and MouseUp do not sound like proper iOS events - or do I misunderstand something?
Kind regards
Yes, they are not proper events. But they must be available somehow (through gestures or whatever) so that one can trap the up and down events. I am sure it is somehow done in the iOS world, no?
Hi, Kaarigar
OnMouseUp = OnClick
button OnMouseDown -> set button border width = 2
button OnClick -> set button border width = 0
regards
Ok! Now I get it. Gotta give it a try!
Last edit: Kaarigar 2013-08-20
Yes, it worked. Wonder why it took me so long to get it after your first suggestions. I think I was relying too much on the names of these two handlers. Thanks!
Looking at the Apple developer documentation I could only find a reference to the tap gesture:
http://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizer_basics/GestureRecognizer_basics.html
Not sure whether you can capture the release of the tap gesture