Thanks for helping me with this, Jason. I really appreciate it.

I haven't written a handler method before. I have multiple other buttons in
this view, and I'm handling them all like this: 

this.myButton.TouchUpInside += (sender, e) => {

        this.websiteView = new WebsiteView ();

        this.NavigationController.PushViewController (websiteView, true);
};

Which so far has been working just fine. I don't have any need to support
multiple touches or gestures or anything like that, just TouchUpInside on
one button at a time.

I Googled for handler methods and looked at several different examples and
entries on stackoverflow, but I'm mostly confused. I tried imitating and
adapting several different approaches to my project, but they haven't worked
so far.  

If you could show and explain an example, that would be incredibly helpful
(I apologize for taking up more of your time with this). 


--Chris


jawbrey wrote
> 
> a. in your view (which contains the label) define a handler for
> TouchesBegan
> 
> b. set the Tag property on your label so you can identify it
> 
> c. if the TouchesBegan handler, check the tag to see if the touch was in
> your label (ie, ignore other touches)
> 
> if you're still stuck I can probably generate a "real" example of this
> 


--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/How-to-use-a-UILabel-as-a-button-tp4655352p4655360.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to