Exemplo n.º 1
0
        void SetupChildrenControls()
        {
            // Associate arrow bitmap with button
            Bitmap bm = (Bitmap)rm.GetObject("Arrow");

            bm.MakeTransparent(Color.White);
            arrowButton.Image = bm;

            // Initialize color panel to default color
            currentColor = Color;

            // Create color picker dropdown portion
            colorDropDown = new ColorPickerDropDown();
            colorDropDown.ColorChanged += new  ColorChangeEventHandler(ColorChanged);

            // Get LostFocus events from text box
            colorTextBox.LostFocus  += new EventHandler(ColorTextBox_LostFocus);
            colorTextBox.GotFocus   += new EventHandler(ColorTextBox_GotFocus);
            colorTextBox.MouseLeave += new EventHandler(ColorTextBox_MouseLeave);
            colorTextBox.MouseEnter += new EventHandler(ColorTextBox_MouseEnter);

            // Change colorTextBox font to bold
            colorTextBox.Font = new Font(colorTextBox.Font, colorTextBox.Font.Style | FontStyle.Bold);
            // See if we have a known color, or just format the rgb values
            InitializeColorTextBoxString(Color, null);
        }
Exemplo n.º 2
0
        void SetupChildrenControls()
        {
            // Associate arrow bitmap with button
              Bitmap bm = (Bitmap)rm.GetObject("Arrow");
              bm.MakeTransparent(Color.White);
              arrowButton.Image = bm;

              // Initialize color panel to default color
              currentColor = Color;

              // Create color picker dropdown portion
              colorDropDown = new ColorPickerDropDown();
              colorDropDown.ColorChanged += new  ColorChangeEventHandler(ColorChanged);

              // Get LostFocus events from text box
              colorTextBox.LostFocus += new EventHandler(ColorTextBox_LostFocus);
              colorTextBox.GotFocus += new EventHandler(ColorTextBox_GotFocus);
              colorTextBox.MouseLeave += new EventHandler(ColorTextBox_MouseLeave);
              colorTextBox.MouseEnter += new EventHandler(ColorTextBox_MouseEnter);

              // Change colorTextBox font to bold
              colorTextBox.Font = new Font(colorTextBox.Font, colorTextBox.Font.Style | FontStyle.Bold);
              // See if we have a known color, or just format the rgb values
              InitializeColorTextBoxString(Color, null);
        }