public override void DrawItemOn(Gdi g, Rectangle rItem) { int y = (rItem.Height - _imageSize.Height) / 2; g.Font = Font; if (_selectButton != null) g.DrawImageAlphaChannel(_selectButton, rItem.Right - _imageSize.Width - UISettings.CalcPix(15), rItem.Top + y); g.TextColor = Color.FromArgb(51, 153, 255); var textSize = g.GetTextExtent((string)DataSource.OptionValue); y = (rItem.Height - textSize.Height) / 2; int x = rItem.Width - UISettings.CalcPix(20) - _imageSize.Width; if (textSize.Width < x) x = textSize.Width; g.DrawText((string)DataSource.OptionValue, new Win32.RECT(rItem.Right - UISettings.CalcPix(20) - _imageSize.Width - x, rItem.Top + y, x, textSize.Height), Win32.DT.LEFT | Win32.DT.TOP | Win32.DT.WORDBREAK | Win32.DT.SINGLELINE); }