Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2279


Ignore:
Timestamp:
08/12/09 17:59:17 (15 years ago)
Author:
mkommend
Message:

added possibility to specify initial docking state (ticket #716)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/DockForm.cs

    r2250 r2279  
    3838      this.view = view;     
    3939      if (View != null) {
    40         Control control = (Control)View;
    41         control.Dock = DockStyle.Fill;
    42         viewPanel.Controls.Add(control);
    43         View.CaptionChanged += new EventHandler(View_CaptionChanged);
    44         UpdateText();
     40        if (view is UserControl) {
     41          switch (((UserControl)view).Dock) {
     42            case DockStyle.Left:
     43              this.ShowHint = DockState.DockLeft;
     44              break;
     45            case DockStyle.Right:
     46              this.ShowHint = DockState.DockRight;
     47              break;
     48            case DockStyle.Top:
     49              this.ShowHint = DockState.DockTop;
     50              break;
     51            case DockStyle.Bottom:
     52              this.ShowHint = DockState.DockBottom;
     53              break;
     54          }
     55          Control control = (Control)View;
     56          control.Dock = DockStyle.Fill;
     57          viewPanel.Controls.Add(control);
     58          View.CaptionChanged += new EventHandler(View_CaptionChanged);
     59          UpdateText();
     60        }
    4561      } else {
    4662        Label errorLabel = new Label();
Note: See TracChangeset for help on using the changeset viewer.