コード例 #1
0
        public void ColourPicker_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
        {
            ComboBox cbColour = sender as ComboBox;

            if (e == null || e.Index < 0 || e.Index >= cbColour.Items.Count)
            {
                return;
            }

            // Get the colour
            GoogleOgcs.EventColour.Palette colour = (GoogleOgcs.EventColour.Palette)Items[e.Index];
            ColourCombobox.DrawComboboxItemColour(cbColour, new SolidBrush(colour.RgbValue), colour.Name, e);
        }
コード例 #2
0
        public void ColourPicker_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
        {
            ComboBox cbColour = sender as ComboBox;

            if (e == null || e.Index < 0 || e.Index >= cbColour.Items.Count)
            {
                return;
            }

            // Get the colour
            OutlookOgcs.Categories.ColourInfo colour = (OutlookOgcs.Categories.ColourInfo)Items[e.Index];
            ColourCombobox.DrawComboboxItemColour(cbColour, new SolidBrush(colour.Colour), colour.Text, e);
        }