ui/wpf/UIcore/TextArea.cs

changeset 135
b9dc9cdfa23a
parent 104
3efe0210e27e
equal deleted inserted replaced
134:69e8e0936858 135:b9dc9cdfa23a
31 } 31 }
32 32
33 container.Add(this, fill); 33 container.Add(this, fill);
34 } 34 }
35 35
36 public static TextArea CreateTextArea(Container container, String text)
37 {
38 return Application.GetInstance().Exec<TextArea>(() => new TextArea(container, text, true));
39 }
40
41 public static TextArea CreateTextField(Container container, String text)
42 {
43 return Application.GetInstance().Exec<TextArea>(() => new TextArea(container, text, false));
44 }
45
46 36
47 // ------------------ UiText methods ------------------ 37 // ------------------ UiText methods ------------------
48 38
49 public void SetText(String str) 39 public void SetText(String str)
50 { 40 {
51 Application.GetInstance().Exec(() => Text = str); 41 Text = str;
52 } 42 }
53 43
54 public String GetText() 44 public String GetText()
55 { 45 {
56 return Application.GetInstance().Exec<String>(() => Text); 46 return Text;
57 } 47 }
58 48
59 public String GetSubString(int begin, int end) 49 public String GetSubString(int begin, int end)
60 { 50 {
61 return null; 51 return null;
66 56
67 } 57 }
68 58
69 public int Position() 59 public int Position()
70 { 60 {
71 return Application.GetInstance().Exec<int>(() => CaretIndex); 61 return CaretIndex;
72 } 62 }
73 63
74 public int Selection() 64 public int Selection()
75 { 65 {
76 return 0; 66 return 0;
77 } 67 }
78 68
79 public int Length() 69 public int Length()
80 { 70 {
81 return Application.GetInstance().Exec<int>(() => Text.Length); 71 return Text.Length;
82 } 72 }
83 73
84 public void Remove(int begin, int end) 74 public void Remove(int begin, int end)
85 { 75 {
86 76

mercurial