C
C#•12mo 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
Omnissiah
Omnissiah•12mo 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
Want results from more Discord servers?
Add your server