/// <summary> /// Fires an event when a different cell is selected. /// </summary> /// <param name="sender">The spreadsheet panel of this window</param> private void spreadsheetPanel_SelectionChanged(SSGui.SpreadsheetPanel sender) { int row, col; spreadsheetPanel.GetSelection(out col, out row); if (SelectionChanged != null) { SelectionChanged(col, row); } }
/// <summary> /// Every time the selection changes, this method is called with the /// Spreadsheet as its parameter. We display the current time in the cell. /// </summary> private void displaySelection(SpreadsheetPanel ss) { int row, col; String value; ss.GetSelection(out col, out row); ss.GetValue(col, row, out value); if (value == "") { ss.SetValue(col, row, DateTime.Now.ToLocalTime().ToString("T")); ss.GetValue(col, row, out value); MessageBox.Show("Selection: column " + col + " row " + row + " value " + value); } }
public DrawingPanel(SpreadsheetPanel ss) { DoubleBuffered = true; _values = new Dictionary <Address, String>(); _ssp = ss; }
public DrawingPanel(SpreadsheetPanel ss) { DoubleBuffered = true; _values = new Dictionary<Address, String>(); _ssp = ss; }