hi,has anybody got an idea

why the touchdown of the button does not react
System.Diagnostics.Debug.WriteLine("halo");
// If you have defined a view, add it here:
 // window.AddSubview (navigationController.View);
var sv = new UIScrollView (window.Frame);
var iv = new UIImageView (UIImage.FromFile ("plan.jpg"));
UIButton x = UIButton.FromType(UIButtonType.Custom);
x.Frame=new System.Drawing.RectangleF(100,100,100,100);
 x.BackgroundColor= UIColor.Red;
x.TouchDown+=delegate{
System.Diagnostics.Debug.WriteLine("asdf");
 };
x.UserInteractionEnabled=true;
x.SetTitle("Search", UIControlState.Normal);

iv.AddSubview(x);
sv.AddSubview (iv);
sv.ContentSize = iv.Frame.Size;
sv.MinimumZoomScale = 0.01f;
sv.MaximumZoomScale = 10.0f;
sv.MultipleTouchEnabled = false;
sv.ViewForZoomingInScrollView = delegate(UIScrollView scrollView) {
    return iv;
};

window.AddSubview (sv);
window.MakeKeyAndVisible ();
 window.MakeKeyAndVisible ();
 return true;
}
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to