mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Merge branch 'master' of https://github.com/migueldeicaza/gui.cs into feature/TextFieldAutoComplete
This commit is contained in:
@@ -92,8 +92,8 @@ static class Demo {
|
||||
Width = Dim.Fill (),
|
||||
Height = Dim.Fill ()
|
||||
};
|
||||
container.OnKeyUp += (KeyEvent ke) => {
|
||||
if (ke.Key == Key.Esc)
|
||||
container.KeyUp += (sender, e) => {
|
||||
if (e.KeyEvent.Key == Key.Esc)
|
||||
container.Running = false;
|
||||
};
|
||||
|
||||
@@ -436,11 +436,11 @@ static class Demo {
|
||||
#endregion
|
||||
|
||||
|
||||
#region OnKeyDown / OnKeyPress / OnKeyUp Demo
|
||||
#region KeyDown / KeyPress / KeyUp Demo
|
||||
private static void OnKeyDownPressUpDemo ()
|
||||
{
|
||||
var container = new Dialog (
|
||||
"OnKeyDown & OnKeyPress & OnKeyUp demo", 80, 20,
|
||||
"KeyDown & KeyPress & KeyUp demo", 80, 20,
|
||||
new Button ("Close") { Clicked = () => { Application.RequestStop (); } }) {
|
||||
Width = Dim.Fill (),
|
||||
Height = Dim.Fill (),
|
||||
@@ -492,9 +492,9 @@ static class Demo {
|
||||
}
|
||||
|
||||
|
||||
container.OnKeyDown += (KeyEvent keyEvent) => KeyDownPressUp (keyEvent, "Down");
|
||||
container.OnKeyPress += (KeyEvent keyEvent) => KeyDownPressUp (keyEvent, "Press");
|
||||
container.OnKeyUp += (KeyEvent keyEvent) => KeyDownPressUp (keyEvent, "Up");
|
||||
container.KeyDown += (o, e) => KeyDownPressUp (e.KeyEvent, "Down");
|
||||
container.KeyPress += (o, e) => KeyDownPressUp (e.KeyEvent, "Press");
|
||||
container.KeyUp += (o, e) => KeyDownPressUp (e.KeyEvent, "Up");
|
||||
Application.Run (container);
|
||||
}
|
||||
#endregion
|
||||
@@ -628,7 +628,7 @@ static class Demo {
|
||||
var bottom2 = new Label ("This should go on the bottom of another top-level!");
|
||||
top.Add (bottom2);
|
||||
|
||||
Application.OnLoad = () => {
|
||||
Application.Loaded += (sender, e) => {
|
||||
bottom.X = win.X;
|
||||
bottom.Y = Pos.Bottom (win) - Pos.Top (win) - margin;
|
||||
bottom2.X = Pos.Left (win);
|
||||
|
||||
Reference in New Issue
Block a user