summaryrefslogtreecommitdiff
path: root/pages/develop/tutorials
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-08-24 02:31:54 -0700
committerapache <apache@e5-web1.enlightenment.org>2018-08-24 02:31:54 -0700
commit066a740d60073593e2e3600056876f1ab46f1deb (patch)
treee2fab62be0ca5867bfd0f1a309e5141a7e9c3a66 /pages/develop/tutorials
parent2e417b6f96b24315390414cf552f140e5963cb5f (diff)
Wiki page hello-world-cs.md changed with summary [Set window parent] by Xavi Artigas
Diffstat (limited to 'pages/develop/tutorials')
-rw-r--r--pages/develop/tutorials/csharp/hello-world-cs.md.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/pages/develop/tutorials/csharp/hello-world-cs.md.txt b/pages/develop/tutorials/csharp/hello-world-cs.md.txt
index 4eba59d28..b99f1fe02 100644
--- a/pages/develop/tutorials/csharp/hello-world-cs.md.txt
+++ b/pages/develop/tutorials/csharp/hello-world-cs.md.txt
@@ -33,7 +33,7 @@ public class Example
33 efl.All.Init(efl.Components.Ui); 33 efl.All.Init(efl.Components.Ui);
34 34
35 // Create a window and initialize it 35 // Create a window and initialize it
36 efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { 36 efl.ui.IWin win = new efl.ui.Win(efl.App.GetLoopMain(), (efl.ui.IWin ewin) => {
37 // Set the window's title 37 // Set the window's title
38 ewin.SetText("Hello World"); 38 ewin.SetText("Hello World");
39 // Request that the window is automatically hidden when the "close" 39 // Request that the window is automatically hidden when the "close"
@@ -113,7 +113,7 @@ In the tutorial code:
113 113
114```csharp 114```csharp
115 // Create a window and initialize it 115 // Create a window and initialize it
116 efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { 116 efl.ui.IWin win = new efl.ui.Win(efl.App.GetLoopMain(), (efl.ui.IWin ewin) => {
117 // Set the window's title 117 // Set the window's title
118 ewin.SetText("Hello World"); 118 ewin.SetText("Hello World");
119 // Request that the window is automatically hidden when the "close" 119 // Request that the window is automatically hidden when the "close"
@@ -122,7 +122,9 @@ In the tutorial code:
122 }); 122 });
123``` 123```
124 124
125Observe how the window is created with a `null` parent and the initialization method is a lambda function which: 125Observe how the window is created as a child of `efl.App.GetLoopMain()`, the application's main loop. This ensures that the window will receive all messages coming from the application.
126
127Also, note the initialization method, a lambda function which:
126 128
127* Sets the window title to `Hello World`. 129* Sets the window title to `Hello World`.
128* Sets the `autohide` flag to true. This means that the window will automatically be hidden when the user closes it. The default behavior for an app when all its windows are hidden is to quit. 130* Sets the `autohide` flag to true. This means that the window will automatically be hidden when the user closes it. The default behavior for an app when all its windows are hidden is to quit.
@@ -182,4 +184,4 @@ The following tutorial adds some text and a button to the UI, and shows how to r
182: Instructions for having EFL ready to work from C#. 184: Instructions for having EFL ready to work from C#.
183 185
184[Tutorial Code Examples](https://git.enlightenment.org/tools/examples.git/tree/tutorial/csharp) 186[Tutorial Code Examples](https://git.enlightenment.org/tools/examples.git/tree/tutorial/csharp)
185: C# Source code for the tutorials. \ No newline at end of file 187: C# Source code for the tutorials.