コード例 #1
0
 /// ------------------------------------------------------------------------------------
 protected virtual void HandleFontPickerClosed(FontPicker sender, DialogResult result)
 {
     if (result == DialogResult.OK)
     {
         var field = GetFieldAt(CurrentCellAddress.Y);
         Fonts[field.Name] = (Font)m_fontPicker.Font.Clone();
         UpdateCellValue(CurrentCellAddress.X, CurrentCellAddress.Y);
         IsDirty = true;
     }
 }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        public FieldMappingGridBase()
        {
            VirtualMode       = true;
            Font              = FontHelper.UIFont;
            RowHeadersVisible = false;
            BorderStyle       = BorderStyle.None;
            App.SetGridSelectionColors(this, true);

            Fonts                = new Dictionary <string, Font>();
            m_cellDropDown       = new CellCustomDropDownList();
            m_fontPicker         = new FontPicker();
            m_fontPicker.Closed += HandleFontPickerClosed;

            AddColumns();
        }