Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/18/15 16:33:27 (8 years ago)
Author:
jkarder
Message:

#2116: merged r13014, r13244 and r13245 into stable

Location:
stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs

    r12009 r13258  
    129129    #endregion
    130130
    131     private System.Windows.Forms.Label viewsLabel;
     131    protected System.Windows.Forms.Label viewsLabel;
    132132    private System.Windows.Forms.Label messageLabel;
    133133    private System.Windows.Forms.ToolTip toolTip;
  • stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs

    r12009 r13258  
    2929namespace HeuristicLab.MainForm.WindowsForms {
    3030  [Content(typeof(IContent))]
    31   public sealed partial class ViewHost : AsynchronousContentView {
     31  public partial class ViewHost : AsynchronousContentView {
    3232    public ViewHost() {
    3333      InitializeComponent();
     
    9393            if (view != null) {
    9494              view.Visible = true;
    95               if (ViewsLabelVisible) {
    96                 view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
    97                 view.Size = new Size(Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
    98               } else view.Dock = DockStyle.Fill;
     95              ConfigureViewLayout(view);
    9996              if (!Controls.Contains((view))) Controls.Add(view);
    10097              view.OnShown(new ViewShownEventArgs(view, false));
     
    108105        }
    109106      }
     107    }
     108
     109    protected virtual void ConfigureViewLayout(View view) {
     110      if (ViewsLabelVisible) {
     111        view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     112        view.Size = new Size(Width - viewsLabel.Width - viewsLabel.Margin.Left - viewsLabel.Margin.Right, Height);
     113      } else view.Dock = DockStyle.Fill;
    110114    }
    111115
Note: See TracChangeset for help on using the changeset viewer.