C
C#•7mo ago
Hiccup

Flowlayoutpanel glitches out and distorts text when moving srollbar.

My code:
private void SplashScreen_Load(object sender, EventArgs e)
{
foreach (string surah in surahs)
{
Button button = new();
button.Width = 100;
button.Text = surah;
button.BackgroundImage = Properties.Resources._343a40;
button.ForeColor = Color.White;
button.Font = new Font(button.Font.FontFamily, 10, FontStyle.Bold);
button.UseCompatibleTextRendering = true;
surahPicker.Controls.Add(button);
}
}
private void SplashScreen_Load(object sender, EventArgs e)
{
foreach (string surah in surahs)
{
Button button = new();
button.Width = 100;
button.Text = surah;
button.BackgroundImage = Properties.Resources._343a40;
button.ForeColor = Color.White;
button.Font = new Font(button.Font.FontFamily, 10, FontStyle.Bold);
button.UseCompatibleTextRendering = true;
surahPicker.Controls.Add(button);
}
}
I have DoubleBuffer enabled in my form
1 Reply
WEIRD FLEX
WEIRD FLEX•6mo ago
flp can be a graphically taxing component, but i don't think i had that problem 🤔 (and i don't even use DoubleBuffered) this looks more like scroll bar is blocking redrawing