Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/10 17:31:58 (14 years ago)
Author:
mkommend
Message:

added collapsed property for Sidebar class (ticket #972)

File:
1 edited

Legend:

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

    r3571 r3644  
    5353              break;
    5454          }
    55           if (view is Sidebar)
     55          Sidebar sidebar = view as Sidebar;
     56          if (sidebar != null) {
     57            if (sidebar.Collapsed)
     58              this.ShowHint = DockState.DockLeftAutoHide;
     59            else
     60              this.ShowHint = DockState.DockLeft;
    5661            this.DockAreas = DockAreas.DockLeft | DockAreas.DockRight;
     62          }
    5763
    5864          Type viewType = view.GetType();
     
    8490    }
    8591
     92    protected override void OnDockStateChanged(EventArgs e) {
     93      base.OnDockStateChanged(e);
     94      Sidebar sidebar = view as Sidebar;
     95      if (sidebar != null) {
     96        if (this.DockState == DockState.DockLeftAutoHide || this.DockState == DockState.DockRightAutoHide)
     97          sidebar.Collapsed = true;
     98        else
     99          sidebar.Collapsed = false;
     100      }
     101    }
     102
    86103    #region View Events
    87104    private void View_CaptionChanged(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.