Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

‘Anchoring’: Modifier le ‘anchor’ d’un bouton

'Anchoring':,Modifier,le,'anchor',d'un,bouton
{filelink=14630}

  using System;
  using System.Drawing;
  using System.Collections;
  using System.ComponentModel;
  using System.Windows.Forms;
  using System.Data;
 
  public class ExempleAnchor : System.Windows.Forms.Form
  {
    private System.Windows.Forms.Button bouton;
 
    public ExempleAnchor()
    {
      InitializeComponent();
      CenterToScreen();
    }
    private void InitializeComponent()
    {
      bouton = new System.Windows.Forms.Button();
      this.Controls.AddRange(new System.Windows.Forms.Control[] {bouton});
      this.Text = "Anchoring des Controles: Style 'Dock' droite";
 
            //'Anchor Dock' Droite
 
      bouton.Anchor = AnchorStyles.Right;
      bouton.Text = "Anchor: " + bouton.Anchor.ToString() +
          "Dock: " + bouton.Dock.ToString();
      this.bouton.Click += new System.EventHandler(this.bouton_Click);
 
    }
      private void bouton_Click(object sender, System.EventArgs e)
      {
        MessageBox.Show("Exemple de 'Anchoring' des composants");
      }
   static void Main()
    {
      Application.Run(new ExempleAnchor());
    }
 
  }

No comments yet.

Leave a Comment