How can I alignment and fit the three labels to be in the center of the panel ?

  • Thread starter Thread starter Rosemerysalvedora
  • Start date Start date
R

Rosemerysalvedora

Guest
Exam[le screenshot of the results I want to get the same as in this screenshot just with my own text content but the same text colors and positions and everything :

The background white color is the panel.

The text in the center in the middle is what I'm trying to draw/add.

You can see the bigger text is above the other smaller text but also in the middle of the smaller text I mean alignment to the center according to the smaller text.

And all the text as a group is in the center on the panel.

What I'm trying to do is the same thing exactly but with a different text content.




1625895.jpg


And this is how it looks like in my designer with the panel :

1625896.jpg

1625897.jpg

My text is not in the middle of the panel the color is not the same and I'm not sure how to add the smaller text.

I want to get the same text results like in the first screenshot example.


And this is how I'm trying to create my text :

private void panel1_Paint(object sender, PaintEventArgs e)
{
using (Font bigFont = new Font(SystemFonts.DefaultFont.FontFamily, 15, FontStyle.Regular))
{
SizeF size = e.Graphics.MeasureString("There are no projects yet.", bigFont, 1);
e.Graphics.DrawString("There are no projects yet.", bigFont, Brushes.Black, new Point(panelWidth, panelHeight));
}
}
but it's not even close to the texts in the first screenshot.

Continue reading...
 
Back
Top