zebobo5
Messages postés
273
Date d'inscription
dimanche 5 octobre 2003
Statut
Membre
Dernière intervention
6 février 2009
1
27 mai 2005 à 10:31
protected override void OnPaint(PaintEventArgs pe)
{
Rectangle r =
new Rectangle(pe.ClipRectangle.X, pe.ClipRectangle.Y,
pe.ClipRectangle.Width, pe.ClipRectangle.Height);
//Fond;
g.FillRectangle(new SolidBrush(Color.FromArgb(93, 135, 32)), r);
g.FillRectangle(Brushes.White, r.X + 1, r.Y + 1, r.Width - 2, r.Height
- 2);
g.FillRectangle(new SolidBrush(Color.FromArgb(178, 221, 116)), r.X + 2,
r.Y + 2, r.Width - 3, r.Height - 3);
//Colonnes
g.DrawLine(new Pen(Brushes.Gray), new Point(r.Width/3, 3), new
Point(r.Width/3, r.Height - 4));
g.DrawLine(new Pen(Color.White), new Point(r.Width / 3 + 1, 3), new
Point(r.Width / 3 + 1, r.Height - 4));
g.DrawLine(new Pen(Brushes.Gray), new Point(r.Width * 2 / 3, 3), new
Point(r.Width * 2 / 3, r.Height - 4));
g.DrawLine(new Pen(Color.White), new Point(r.Width * 2 / 3 + 1, 3), new
Point(r.Width * 2 / 3 + 1, r.Height - 4));
//Texte
TextRenderer.DrawText(g, "Information", Font, new Rectangle( 4, r.Y +
4, r.Width / 3 - 4, r.Height - 6), Color.Black, TextFormatFlags.Left |
TextFormatFlags.VerticalCenter);
TextRenderer.DrawText(g, "Local", Font, new Rectangle(r.Width / 3 + 4,
r.Y + 4, r.Width * 2 / 3 - 4, r.Height - 6), Color.Black,
TextFormatFlags.Left | TextFormatFlags.VerticalCenter);
TextRenderer.DrawText(g, "Commun", Font, new Rectangle(r.Width *2/ 3 +
4, r.Y + 4, r.Width - 4, r.Height - 6), Color.Black,
TextFormatFlags.Left | TextFormatFlags.VerticalCenter);
base.OnPaint(pe);
}
J'espere ke ca pourra t'aider un peu