/// <summary>
        /// Given a spreadsheet, find the current selected cell and
        /// create a popup that contains the information from that cell
        /// </summary>
        /// <param name="ss"></param>
        private void DisplaySelection(SpreadsheetGridWidget 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);
            }
        }
예제 #2
0
        /// <summary>
        /// Given a spreadsheet, find the current selected cell and
        /// create a popup that contains the information from that cell
        /// </summary>
        /// <param name="ss"></param>
        private void DisplaySelection(SpreadsheetGridWidget 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);
            //}

            cellName.Enabled = false;
            cellName.Text    = getCellName(col, row);
        }