public void ProviderChanged() { if (provider.Items != items){ items = provider.Items; if (top > items){ if (items > 1) top = items-1; else top = 0; } if (selected > items){ if (items > 1) selected = items - 1; else selected = 0; } } Redraw (); }