Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3316


Ignore:
Timestamp:
04/12/10 23:54:19 (14 years ago)
Author:
mkommend
Message:

added possibility to change visibility of columns in StringConvertibleMatrixView (ticket #968)

Location:
trunk/sources/HeuristicLab.Data.Views/3.3
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/HeuristicLab.Data.Views-3.3.csproj

    r3047 r3316  
    9292      <DependentUpon>BoolValueView.cs</DependentUpon>
    9393    </Compile>
     94    <Compile Include="ColumnsVisibilityDialog.cs">
     95      <SubType>Form</SubType>
     96    </Compile>
     97    <Compile Include="ColumnsVisibilityDialog.Designer.cs">
     98      <DependentUpon>ColumnsVisibilityDialog.cs</DependentUpon>
     99    </Compile>
    94100    <Compile Include="ComparisonView.cs">
    95101      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.Designer.cs

    r3314 r3316  
    5252      this.columnsTextBox = new System.Windows.Forms.TextBox();
    5353      this.columnsLabel = new System.Windows.Forms.Label();
     54      this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
     55      this.ShowHideColumns = new System.Windows.Forms.ToolStripMenuItem();
    5456      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
    5557      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     58      this.contextMenu.SuspendLayout();
    5659      this.SuspendLayout();
    5760      //
     
    127130      this.columnsLabel.Text = "&Columns:";
    128131      //
     132      // contextMenu
     133      //
     134      this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     135            this.ShowHideColumns});
     136      this.contextMenu.Name = "contextMenu";
     137      this.contextMenu.Size = new System.Drawing.Size(191, 26);
     138      //
     139      // ShowHideColumns
     140      //
     141      this.ShowHideColumns.Name = "ShowHideColumns";
     142      this.ShowHideColumns.Size = new System.Drawing.Size(190, 22);
     143      this.ShowHideColumns.Text = "Show / Hide Columns";
     144      this.ShowHideColumns.Click += new System.EventHandler(this.ShowHideColumns_Click);
     145      //
    129146      // StringConvertibleMatrixView
    130147      //
     
    140157      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
    141158      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     159      this.contextMenu.ResumeLayout(false);
    142160      this.ResumeLayout(false);
    143161      this.PerformLayout();
     
    153171    private System.Windows.Forms.TextBox columnsTextBox;
    154172    private System.Windows.Forms.Label columnsLabel;
     173    private System.Windows.Forms.ContextMenuStrip contextMenu;
     174    private System.Windows.Forms.ToolStripMenuItem ShowHideColumns;
    155175
    156176  }
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r3314 r3316  
    240240            sortedColumnIndizes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
    241241        Sort();
    242       }
     242      } else if (e.Button == MouseButtons.Right) {
     243        if (Content.ColumnNames.Count() != 0)
     244          contextMenu.Show(MousePosition);
     245      }
     246
    243247      //}
    244248    }
     
    293297      }
    294298    }
     299
     300    private void ShowHideColumns_Click(object sender, EventArgs e) {
     301      new ColumnsVisibilityDialog(this.dataGridView.Columns.Cast<DataGridViewColumn>()).ShowDialog();
     302    }
    295303  }
    296304}
Note: See TracChangeset for help on using the changeset viewer.