Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/28/10 17:38:37 (14 years ago)
Author:
mkommend
Message:

Added statistical information to the RunCollectionBoxPlotView and corrected minor bugs in the 'RunCollectionBubbleChartView' and the 'RunCollectionBoxPlotView' (ticket #1135).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r4600 r4652  
    2323using System.Collections.Generic;
    2424using System.ComponentModel;
     25using System.Drawing;
    2526using System.Linq;
    2627using System.Text;
     
    5152    }
    5253
     54    private bool showRowsAndColumnsTextBox;
     55    public bool ShowRowsAndColumnsTextBox {
     56      get { return showRowsAndColumnsTextBox; }
     57      set {
     58        if (value != showRowsAndColumnsTextBox) {
     59          showRowsAndColumnsTextBox = value;
     60          UpdateVisibilityOfTextBoxes();
     61        }
     62      }
     63    }
     64
    5365    public StringConvertibleMatrixView() {
    5466      InitializeComponent();
     67      showRowsAndColumnsTextBox = true;
    5568      errorProvider.SetIconAlignment(rowsTextBox, ErrorIconAlignment.MiddleLeft);
    5669      errorProvider.SetIconPadding(rowsTextBox, 2);
     
    99112
    100113    private void UpdateData() {
    101 
    102114      rowsTextBox.Text = Content.Rows.ToString();
    103115      rowsTextBox.Enabled = true;
     
    472484      new ColumnsVisibilityDialog(this.dataGridView.Columns.Cast<DataGridViewColumn>()).ShowDialog();
    473485    }
     486
     487    private void UpdateVisibilityOfTextBoxes() {
     488      rowsTextBox.Visible = columnsTextBox.Visible = showRowsAndColumnsTextBox;
     489      rowsLabel.Visible = columnsLabel.Visible = showRowsAndColumnsTextBox;
     490
     491      int headerSize = columnsTextBox.Location.Y + columnsTextBox.Size.Height +
     492        columnsTextBox.Margin.Bottom + dataGridView.Margin.Top;
     493
     494      int offset = showRowsAndColumnsTextBox ? headerSize : 0;
     495      dataGridView.Location = new Point(0, offset);
     496      dataGridView.Size = new Size(Size.Width, Size.Height - offset);
     497    }
    474498  }
    475499}
Note: See TracChangeset for help on using the changeset viewer.