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; }
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); }
public G2DComboBox(object[] items) : base() { selectedIndex = 0; maxRowCount = 10; contentList = new G2DList(items); downArrowPoints = new List <Point>(); buttonBounds = Rectangle.Empty; name = "G2DComboBox"; }
public G2DComboBox(object[] items) : base() { selectedIndex = 0; maxRowCount = 10; contentList = new G2DList(items); downArrowPoints = new List<Point>(); buttonBounds = Rectangle.Empty; name = "G2DComboBox"; }