コード例 #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;
        }
コード例 #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);
        }
コード例 #3
0
ファイル: G2DComboBox.cs プロジェクト: ARLM-Attic/goblin-xna
        public G2DComboBox(object[] items)
            : base()
        {
            selectedIndex = 0;
            maxRowCount   = 10;
            contentList   = new G2DList(items);

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

            name = "G2DComboBox";
        }
コード例 #4
0
ファイル: G2DComboBox.cs プロジェクト: NinjaSteph/SureShot
        public G2DComboBox(object[] items) 
            : base()
        {
            selectedIndex = 0;
            maxRowCount = 10;
            contentList = new G2DList(items);

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

            name = "G2DComboBox";
        }