-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toplevel or Window should allow set IsMdiContainer property. #226
Comments
Generated with the using Terminal.Gui;
using YourNamespace;
public class Program {
public void Main(string[] args)
{
Application.Run<MyView>();
Application.Shutdown();
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by:
// TerminalGuiDesigner v1.0.24.0
// You can make changes to this file and they will not be overwritten when saving.
// </auto-generated>
// -----------------------------------------------------------------------------
namespace YourNamespace {
using Terminal.Gui;
public partial class MyView {
MyChildView _childView1;
MyChildView _childView2;
public MyView ()
{
InitializeComponent ();
Title = "Parent";
_childView1 = new () { Width = 20, Height = 10, Title = "Child1" };
_childView2 = new () { X = Pos.Right (_childView1), Y = Pos.Bottom (_childView1), Width = 20, Height = 10, Title = "Child2" };
Ready += () => Application.Run (_childView1);
_childView1.Ready += () => Application.Run (_childView2);
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by:
// TerminalGuiDesigner v1.0.24.0
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// -----------------------------------------------------------------------------
namespace YourNamespace {
using System;
using Terminal.Gui;
public partial class MyView : Terminal.Gui.Window {
private void InitializeComponent ()
{
this.Width = Dim.Fill (0);
this.Height = Dim.Fill (0);
this.X = 0;
this.Y = 0;
this.Modal = false;
this.IsMdiContainer = true;
this.Border.BorderStyle = Terminal.Gui.BorderStyle.Single;
this.Border.Effect3D = false;
this.Border.Effect3DBrush = null;
this.Border.DrawMarginFrame = true;
this.TextAlignment = Terminal.Gui.TextAlignment.Left;
this.Title = "";
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by:
// TerminalGuiDesigner v1.0.24.0
// You can make changes to this file and they will not be overwritten when saving.
// </auto-generated>
// -----------------------------------------------------------------------------
namespace YourNamespace {
using Terminal.Gui;
public partial class MyChildView {
public MyChildView ()
{
InitializeComponent ();
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by:
// TerminalGuiDesigner v1.0.24.0
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// -----------------------------------------------------------------------------
namespace YourNamespace {
using System;
using Terminal.Gui;
public partial class MyChildView : Terminal.Gui.Window {
private Terminal.Gui.Label label;
private Terminal.Gui.TextField textField;
private void InitializeComponent ()
{
this.textField = new Terminal.Gui.TextField ();
this.label = new Terminal.Gui.Label ();
this.Width = Dim.Fill (0);
this.Height = Dim.Fill (0);
this.X = 0;
this.Y = 0;
this.Modal = false;
this.IsMdiContainer = false;
this.Border.BorderStyle = Terminal.Gui.BorderStyle.Single;
this.Border.Effect3D = false;
this.Border.Effect3DBrush = null;
this.Border.DrawMarginFrame = true;
this.TextAlignment = Terminal.Gui.TextAlignment.Left;
this.Title = "";
this.label.Width = 4;
this.label.Height = 1;
this.label.X = 0;
this.label.Y = 0;
this.label.Data = "label";
this.label.Text = "Name:";
this.label.TextAlignment = Terminal.Gui.TextAlignment.Left;
this.Add (this.label);
this.textField.Width = 10;
this.textField.Height = 1;
this.textField.X = 6;
this.textField.Y = 0;
this.textField.Secret = false;
this.textField.Data = "textField";
this.textField.Text = "";
this.textField.TextAlignment = Terminal.Gui.TextAlignment.Left;
this.Add (this.textField);
}
}
} mdi-container.mp4 |
Can you please create a PR that just contains 91a1a22 I have cherry-picked it but get null references when I set it to true and continue using editor. For example:
|
This crash isn't nessesarily a show stopper. It may be that the property is not designed to be changed during runtime of app. In this case I think we could add the concept of a 'MemoryOnlyProperty` (needs a better name). In this case the |
I have added the concept of a I've added you as a reviewer to get your impressions of the feature. If accepted, I will need to port the PR to v2 branch also. |
I tried before doing a separate PR to this but it only works with the #227. Can you test on that PR and check if the error persist, please? Edit: |
I already fixed in the gui-cs/Terminal.Gui@c8f2d06, but it need wait until is merged and published. |
Done. |
Case
IsMdiContainer
istrue
the user is responsible to create anotherWindow
class and callApplication.Run<myChildClass>
in the code.The text was updated successfully, but these errors were encountered: