Ejemplo n.º 1
0
        public G2DComponent GetListCellRendererComponent(G2DList list, object value, int index, bool isSeleced)
        {
            this.TextFont = list.TextFont;
            this.Transparency = list.Transparency;
            this.TextTransparency = list.TextTransparency;
            this.HorizontalAlignment = list.HorizontalAlignment;

            this.Text = value.ToString();

            this.Bounds = new Rectangle(list.PaintBounds.X + 2, list.PaintBounds.Y + 2 + CellHeight * index, 
                list.Bounds.Width - 4, CellHeight);

            if (isSeleced)
            {
                drawBackground = true;
                this.BackgroundColor = list.SelectionBackgroundColor;
                this.TextColor = list.SelectionForegroundColor;
            }
            else
            {
                drawBackground = false;
                this.TextColor = list.TextColor;
            }

            return this;
        }
Ejemplo n.º 2
0
        public G2DComponent GetListCellRendererComponent(G2DList list, object value, int index, bool isSeleced)
        {
            this.TextFont            = list.TextFont;
            this.Transparency        = list.Transparency;
            this.TextTransparency    = list.TextTransparency;
            this.HorizontalAlignment = list.HorizontalAlignment;

            this.Text = value.ToString();

            this.Bounds = new Rectangle(list.PaintBounds.X + 2, list.PaintBounds.Y + 2 + CellHeight * index,
                                        list.Bounds.Width - 4, CellHeight);

            if (isSeleced)
            {
                drawBackground       = true;
                this.BackgroundColor = list.SelectionBackgroundColor;
                this.TextColor       = list.SelectionForegroundColor;
            }
            else
            {
                drawBackground = false;
                this.TextColor = list.TextColor;
            }

            return(this);
        }
Ejemplo n.º 3
0
        public G2DComboBox(object[] items)
            : base()
        {
            selectedIndex = 0;
            maxRowCount   = 10;
            contentList   = new G2DList(items);

            downArrowPoints = new List <Point>();
            buttonBounds    = Rectangle.Empty;

            name = "G2DComboBox";
        }
Ejemplo n.º 4
0
        public G2DComboBox(object[] items) 
            : base()
        {
            selectedIndex = 0;
            maxRowCount = 10;
            contentList = new G2DList(items);

            downArrowPoints = new List<Point>();
            buttonBounds = Rectangle.Empty;

            name = "G2DComboBox";
        }