Open
Description
Related:
Requires
- Auto-join of
Border
is not always working #2995 - Finish implementing
Line
and removeLineView
#3014 - ContextMenu: If there's no MenuBar, F9 should open/close the context menu #2114
- Enable Close/Quit/Collapse/Expand buttons on
Border
#2814
Will enable
Design
Subviews
public Label TitleLabel { get; set; };
public Button CloseButton { get ; set; }
public Line Top { get; set; }
public Line Left { get; set; }
public Line Right{ get; set; }
public Line Bottom{ get; set; }
Layout
This also indicates the order the views should be added; The label & button must be added after the lines so that they occlude them.
Top.X = Pos.Function (Thickness.Left/ 2);
Top.Y = Pos.Function (Thickness.Top / 2);
Top.Width = Dim.Fill () - Dim.Function (Thickness.Right / 2);
Left.X = Pos.Left (Top);
Left.Y = Pos.Top (Top);
Left.Height = Dim.Fill () - Dim.Function (Thickness.Bottom / 2);
Right.X = Pos.Right (Top);
Right.Y = Pos.Top (Top);
Right.Height = Dim.Fill () - Dim.Function (Thickness.Bottom / 2);
Bottom.X = Pos.Left (Top);
Bottom.Y= Pos.Bottom (Left);
Bottom.Width = Dim.Fill () - Dim.Function (Thickness.Right / 2);
TitleLabel.X = Pos.Right (Left) + 1;
TitleLabelY = Pos.Top (Top);
CloseButton .X = Pos.Left (Right) - 1;
CloseButton .Y = Pos.Top (Top);
Example usage:
view.Border.TitleLabel.X = Pos.Center (); // centers title (default is X = 1)
view.Border.TitleLabel.Visible = false; // Turn off the Title.
Metadata
Metadata
Assignees
Type
Projects
Status
🏗 Approved - In progress