Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Utilisation de JLabel: Exemple d’info bulle et Bordure

Utilisation,de,JLabel:,Exemple,d'info,bulle,et,Bordure
{filelink=14637}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
public class ExempleJLabel : Form
{
   private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private IContainer components;
   private System.Windows.Forms.ToolTip labelsToolTip;
 
  [STAThread]
  static void Main()
  {
    Application.EnableVisualStyles();
    Application.Run(new ExempleJLabel());
  }
 
   public ExempleJLabel() {
       InitializeComponent();
   }
 
   private void InitializeComponent()
   {
       this.components = new System.ComponentModel.Container();
       this.label1 = new System.Windows.Forms.Label();
       this.label2 = new System.Windows.Forms.Label();
       this.labelsToolTip = new System.Windows.Forms.ToolTip(this.components);
       this.SuspendLayout();
       //
       // label1
       //
       this.label1.AutoSize = true;
       this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
       this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
       this.label1.Location = new System.Drawing.Point(12, 20);
       this.label1.Name = "label1";
       this.label1.Size = new System.Drawing.Size(110, 19);
       this.label1.TabIndex = 0;
       this.label1.Text = "Exemple Label1";
       this.labelsToolTip.SetToolTip(this.label1, "Bulle d'info sur le label1");
       //
       // label2
       //
       this.label2.AutoSize = true;
       this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
       this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
       this.label2.Location = new System.Drawing.Point(168, 20);
       this.label2.Name = "label2";
       this.label2.Size = new System.Drawing.Size(110, 19);
       this.label2.TabIndex = 1;
       this.label2.Tag = "";
       this.label2.Text = "Exemple Label2";
       this.labelsToolTip.SetToolTip(this.label2, "Bulle d'info sur le label2");
       //
       // ExempleJLabel
       //
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.ClientSize = new System.Drawing.Size(327, 124);
       this.Controls.Add(this.label2);
       this.Controls.Add(this.label1);
       this.Name = "ExempleJLabel";
       this.Text = "Exemple JLabel";
       this.ResumeLayout(false);
       this.PerformLayout();
 
   }
 
}

No comments yet.

Leave a Comment