Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added EventHandler to EntryElement to make clearing UI elements easier #106

Merged
merged 1 commit into from

2 participants

@crdeutsch

In the EntryElement class I added an "EntryStarted" EventHandler that is fired when the "Started" event of the UITextField is fired. This is useful for clearing other UI elements like say a UIPicker when they lose focus. See example of how it's used here:
https://github.com/crdeutsch/MonoTouch.Dialog-PickerElement

@crdeutsch crdeutsch In the EntryElement class I added an "EntryStarted" EventHandler that…
… is fired when the "Started" event of the UITextField is fired. This is useful for clearing other UI elements like say a UIPicker when they lose focus. See example of how it's used here: https://github.com/crdeutsch/MonoTouch.Dialog-PickerElement
653aac7
@migueldeicaza migueldeicaza merged commit e15bad1 into migueldeicaza:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 1, 2012
  1. @crdeutsch

    In the EntryElement class I added an "EntryStarted" EventHandler that…

    crdeutsch authored
    … is fired when the "Started" event of the UITextField is fired. This is useful for clearing other UI elements like say a UIPicker when they lose focus. See example of how it's used here: https://github.com/crdeutsch/MonoTouch.Dialog-PickerElement
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 MonoTouch.Dialog/Elements.cs
View
5 MonoTouch.Dialog/Elements.cs
@@ -1376,6 +1376,7 @@ public class EntryElement : Element {
public event EventHandler Changed;
public event Func<bool> ShouldReturn;
+ public EventHandler EntryStarted {get;set;}
/// <summary>
/// Constructs an EntryElement with the given caption, placeholder and initial value.
/// </summary>
@@ -1538,6 +1539,10 @@ public override UITableViewCell GetCell (UITableView tv)
entry.ReturnKeyType = returnKeyType.Value;
tv.ScrollToRow (IndexPath, UITableViewScrollPosition.Middle, true);
+
+ if (EntryStarted != null) {
+ EntryStarted(this, null);
+ }
};
}
if (becomeResponder){
Something went wrong with that request. Please try again.