summaryrefslogtreecommitdiff
path: root/src/examples/elementary/efl_ui_unit_converter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/elementary/efl_ui_unit_converter.cs')
-rw-r--r--src/examples/elementary/efl_ui_unit_converter.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/examples/elementary/efl_ui_unit_converter.cs b/src/examples/elementary/efl_ui_unit_converter.cs
index 93a5f89..6d7f200 100644
--- a/src/examples/elementary/efl_ui_unit_converter.cs
+++ b/src/examples/elementary/efl_ui_unit_converter.cs
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1using System; 16using System;
2 17
3public class Example 18public class Example
@@ -17,7 +32,7 @@ public class Example
17 private static void ShowErrorPopup(Efl.Ui.Win win, string message) 32 private static void ShowErrorPopup(Efl.Ui.Win win, string message)
18 { 33 {
19 Efl.Ui.AlertPopup popup = new Efl.Ui.AlertPopup(win); 34 Efl.Ui.AlertPopup popup = new Efl.Ui.AlertPopup(win);
20 Efl.Ui.Text popup_text = new Efl.Ui.Text(popup); 35 Efl.Ui.Textbox popup_text = new Efl.Ui.Textbox(popup);
21 popup_text.SetText($"Error: {message}"); 36 popup_text.SetText($"Error: {message}");
22 popup.SetContent(popup_text); 37 popup.SetContent(popup_text);
23 popup.SetVisible(true); 38 popup.SetVisible(true);
@@ -53,14 +68,15 @@ public class Example
53 68
54 box.DoPack(miles_box); 69 box.DoPack(miles_box);
55 70
56 Efl.Ui.Text miles_label = new Efl.Ui.Text(miles_box); 71 Efl.Ui.Textbox miles_label = new Efl.Ui.Textbox(miles_box);
57 miles_label.SetText("Miles:"); 72 miles_label.SetText("Miles:");
58 miles_label.SetSize(size); 73 miles_label.SetSize(size);
59 miles_label.SetVisible(true); 74 miles_label.SetVisible(true);
60 75
61 Efl.Ui.TextEditable miles_input = new Efl.Ui.TextEditable(miles_box); 76 Efl.Ui.Textbox miles_input = new Efl.Ui.Textbox(miles_box);
62 miles_input.SetText(""); 77 miles_input.SetText("");
63 miles_input.SetScrollable(true); 78 miles_input.SetScrollable(true);
79 miles_input.SetEditable(true);
64 miles_input.SetSize(size); 80 miles_input.SetSize(size);
65 miles_input.SetVisible(true); 81 miles_input.SetVisible(true);
66 82
@@ -79,12 +95,12 @@ public class Example
79 95
80 box.DoPack(kms_box); 96 box.DoPack(kms_box);
81 97
82 Efl.Ui.Text kms_label = new Efl.Ui.Text(kms_box); 98 Efl.Ui.Textbox kms_label = new Efl.Ui.Textbox(kms_box);
83 kms_label.SetText("Kilometers:"); 99 kms_label.SetText("Kilometers:");
84 kms_label.SetSize(size); 100 kms_label.SetSize(size);
85 kms_label.SetVisible(true); 101 kms_label.SetVisible(true);
86 102
87 Efl.Ui.TextEditable kms_input = new Efl.Ui.TextEditable(kms_box); 103 Efl.Ui.TextboxEditable kms_input = new Efl.Ui.TextboxEditable(kms_box);
88 kms_input.SetText(""); 104 kms_input.SetText("");
89 kms_input.SetScrollable(true); 105 kms_input.SetScrollable(true);
90 kms_input.SetSize(size); 106 kms_input.SetSize(size);