private void NullDisplayBoxCustomization(ILabel label)
{
if (Application.RenderWithVisualStyles)
{
label.Top = 3;
Size maxTextSize = GetMaxTextSize();
label.Height = maxTextSize.Height;
if (this.Width >= maxTextSize.Width + 30)
{
// There is a drop down with the calendar shown
label.Width = Width - label.Left - 35;
}
else
{
// There is a normal drop down shown
label.Width = Width - 20;
}
}
}