By default the items in the C# Combobox are left aligned. Are there any options available to change this justification apart from overriding DrawItem method and setting the
You could just set the control style to RightToLeft = RightToLeft.Yes
if you don't mind the drop widget on the other side as well.
or
set DrawMode = OwnerDrawFixed;
and hook the DrawItem
event,
then something like
private void comboBox1_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index == -1)
return;
ComboBox combo = ((ComboBox) sender);
using (SolidBrush brush = new SolidBrush(e.ForeColor))
{
e.DrawBackground();
e.Graphics.DrawString(combo.Items[e.Index].ToString(), e.Font, brush, e.Bounds, new StringFormat(StringFormatFlags.DirectionRightToLeft));
e.DrawFocusRectangle();
}
}