Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4213


Ignore:
Timestamp:
08/13/10 13:19:34 (14 years ago)
Author:
mkommend
Message:

Changed the context menu of the StringConvertibleMatrixView to appear after a right click on the DataGridView control (ticket #1134).

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

Legend:

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

    r4178 r4213  
    103103      this.dataGridView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dataGridView_Scroll);
    104104      this.dataGridView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView_KeyDown);
     105      this.dataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler(dataGridView_MouseClick);
    105106      this.dataGridView.Resize += new System.EventHandler(this.dataGridView_Resize);
    106107      //
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r4199 r4213  
    378378              sortedColumnIndizes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
    379379          Sort();
    380         } else if (e.Button == MouseButtons.Right) {
    381           if (Content.ColumnNames.Count() != 0)
    382             contextMenu.Show(MousePosition);
    383380        }
    384381      }
     
    465462    }
    466463
     464    private void dataGridView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
     465      if (Content == null) return;
     466      if (e.Button == MouseButtons.Right && Content.ColumnNames.Count() != 0)
     467        contextMenu.Show(MousePosition);
     468    }
    467469    private void ShowHideColumns_Click(object sender, EventArgs e) {
    468470      new ColumnsVisibilityDialog(this.dataGridView.Columns.Cast<DataGridViewColumn>()).ShowDialog();
Note: See TracChangeset for help on using the changeset viewer.