<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FLabel</id>
		<title>Csharp/CSharp Tutorial/GUI Windows Forms/Label - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FLabel"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/Label&amp;action=history"/>
		<updated>2026-04-30T02:21:30Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/Label&amp;diff=5409&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/Label&amp;diff=5409&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/Label&amp;diff=5410&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/Label&amp;diff=5410&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:21Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Add Image in an ImageList to a Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
public class ImageLists : Form&lt;br /&gt;
{&lt;br /&gt;
  ImageList imgList;&lt;br /&gt;
  Label lbl;&lt;br /&gt;
  LinkLabel lnk;&lt;br /&gt;
  Button btn;&lt;br /&gt;
  public ImageLists()&lt;br /&gt;
  {&lt;br /&gt;
       Size = new Size(300,300);&lt;br /&gt;
    imgList = new ImageList();&lt;br /&gt;
    Image img;&lt;br /&gt;
    String[] arFiles = {&amp;quot;1.ico&amp;quot;,&amp;quot;2.ico&amp;quot;,&amp;quot;3.ico&amp;quot;};&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; arFiles.Length; i++)&lt;br /&gt;
    {&lt;br /&gt;
      img = Image.FromFile(arFiles[i]);&lt;br /&gt;
      imgList.Images.Add(img);&lt;br /&gt;
    }&lt;br /&gt;
    imgList.ImageSize = new Size(32, 32);&lt;br /&gt;
&lt;br /&gt;
    lbl = new Label();&lt;br /&gt;
       lbl.Parent = this;&lt;br /&gt;
       lbl.Text = &amp;quot;Label&amp;quot;;&lt;br /&gt;
       lbl.Location = new Point(0,0);&lt;br /&gt;
       lbl.Size = new Size(lbl.PreferredWidth + imgList.ImageSize.Width, &lt;br /&gt;
      imgList.ImageSize.Height + 10);&lt;br /&gt;
       lbl.BorderStyle = BorderStyle.Fixed3D;&lt;br /&gt;
    lbl.ImageList = imgList;&lt;br /&gt;
    lbl.ImageIndex = 0;&lt;br /&gt;
    lbl.ImageAlign = ContentAlignment.MiddleRight;&lt;br /&gt;
       int yDelta = lbl.Height + 10;&lt;br /&gt;
     &lt;br /&gt;
       lnk = new LinkLabel();&lt;br /&gt;
       lnk.Parent = this;&lt;br /&gt;
       lnk.Text = &amp;quot;LinkLabel&amp;quot;;&lt;br /&gt;
       lnk.Size = new Size(lnk.PreferredWidth + imgList.ImageSize.Width, &lt;br /&gt;
      imgList.ImageSize.Height + 10);&lt;br /&gt;
       lnk.Location = new Point(0, yDelta);&lt;br /&gt;
    lnk.ImageList = imgList;&lt;br /&gt;
    lnk.ImageIndex = 0;&lt;br /&gt;
    lnk.ImageAlign = ContentAlignment.MiddleRight;&lt;br /&gt;
    btn = new Button();&lt;br /&gt;
    btn.Parent = this;&lt;br /&gt;
    btn.ImageList = imgList;&lt;br /&gt;
    btn.ImageIndex = imgList.Images.Count - 1;&lt;br /&gt;
    btn.Location = new Point(0, 2 * yDelta);&lt;br /&gt;
    btn.Size = new Size(3 * imgList.ImageSize.Width, &lt;br /&gt;
              2 * imgList.ImageSize.Height);&lt;br /&gt;
&lt;br /&gt;
    lbl.ImageIndex = 1;&lt;br /&gt;
    lnk.ImageIndex = 0;&lt;br /&gt;
    btn.ImageIndex = 2;&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
      Application.Run(new ImageLists());&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add image to Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;        &lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class LabelImageAdding : Form&lt;br /&gt;
{&lt;br /&gt;
  Label lblEcho;&lt;br /&gt;
  TextBox txt;&lt;br /&gt;
  public LabelImageAdding()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(300,250);&lt;br /&gt;
    lblEcho = new Label();&lt;br /&gt;
    lblEcho.Parent = this;&lt;br /&gt;
    lblEcho.Text = &amp;quot;test&amp;quot;;&lt;br /&gt;
    lblEcho.Location = new Point(0,0);&lt;br /&gt;
    lblEcho.AutoSize = true;&lt;br /&gt;
    lblEcho.BorderStyle = BorderStyle.Fixed3D;&lt;br /&gt;
    int yDelta = lblEcho.Height + 10;&lt;br /&gt;
    &lt;br /&gt;
    Image img = Image.FromFile(&amp;quot;YourFile.bmp&amp;quot;);&lt;br /&gt;
    Label lblImage = new Label();&lt;br /&gt;
    lblImage.Parent = this;&lt;br /&gt;
    lblImage.Location = new Point(250, 0);&lt;br /&gt;
    lblImage.Image = img;&lt;br /&gt;
    lblImage.Anchor = AnchorStyles.Top | AnchorStyles.Right;&lt;br /&gt;
    lblImage.Size = new Size(img.Width, img.Height);&lt;br /&gt;
    Label lblCaption = new Label();&lt;br /&gt;
    lblCaption.Parent = this;&lt;br /&gt;
    lblCaption.Text = &amp;quot;&amp;amp;Enter Text Here:&amp;quot;;&lt;br /&gt;
    lblCaption.Size = new Size(lblCaption.PreferredWidth, lblCaption.PreferredHeight);&lt;br /&gt;
    lblCaption.Location = new Point(0, yDelta);&lt;br /&gt;
    lblCaption.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    txt = new TextBox();&lt;br /&gt;
    txt.Parent = this;&lt;br /&gt;
    txt.Size = new Size(100,23);&lt;br /&gt;
    txt.Location = new Point(lblCaption.Width + 5, yDelta);&lt;br /&gt;
    txt.TextChanged += new System.EventHandler(txt_TextChanged);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new LabelImageAdding());&lt;br /&gt;
  }&lt;br /&gt;
  private void txt_TextChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    lblEcho.Text = txt.Text;&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Generic event for a Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class LabelWithGenericEvent : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.Windows.Forms.Label lblTitle;&lt;br /&gt;
  public LabelWithGenericEvent()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.lblTitle = new System.Windows.Forms.Label();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // lblTitle&lt;br /&gt;
    // &lt;br /&gt;
    this.lblTitle.Location = new System.Drawing.Point(40, 24);&lt;br /&gt;
    this.lblTitle.Name = &amp;quot;lblTitle&amp;quot;;&lt;br /&gt;
    this.lblTitle.Size = new System.Drawing.Size(150, 25);&lt;br /&gt;
    this.lblTitle.TabIndex = 0;&lt;br /&gt;
    this.lblTitle.Text = &amp;quot;Events Demonstrator&amp;quot;;&lt;br /&gt;
    this.lblTitle.Click += new System.EventHandler(this.GenericEventHandler);&lt;br /&gt;
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(242, 173);&lt;br /&gt;
    this.Controls.AddRange(new System.Windows.Forms.Control[] {  this.lblTitle});&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new LabelWithGenericEvent());&lt;br /&gt;
  }&lt;br /&gt;
  private void GenericEventHandler(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    MessageBox.Show(&amp;quot;Generic event handler&amp;quot;,&amp;quot;Event Demo&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Label Text Change==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class LabelTextChange : Form&lt;br /&gt;
{&lt;br /&gt;
  Label lblEcho;&lt;br /&gt;
  TextBox txt;&lt;br /&gt;
  public LabelTextChange()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(300,250);&lt;br /&gt;
    lblEcho = new Label();&lt;br /&gt;
    lblEcho.Parent = this;&lt;br /&gt;
    lblEcho.Text = &amp;quot;test&amp;quot;;&lt;br /&gt;
    lblEcho.Location = new Point(0,0);&lt;br /&gt;
    lblEcho.AutoSize = true;&lt;br /&gt;
    lblEcho.BorderStyle = BorderStyle.Fixed3D;&lt;br /&gt;
    int yDelta = lblEcho.Height + 10;&lt;br /&gt;
    &lt;br /&gt;
    Image img = Image.FromFile(&amp;quot;YourFile.bmp&amp;quot;);&lt;br /&gt;
    Label lblImage = new Label();&lt;br /&gt;
    lblImage.Parent = this;&lt;br /&gt;
    lblImage.Location = new Point(250, 0);&lt;br /&gt;
    lblImage.Image = img;&lt;br /&gt;
    lblImage.Anchor = AnchorStyles.Top | AnchorStyles.Right;&lt;br /&gt;
    lblImage.Size = new Size(img.Width, img.Height);&lt;br /&gt;
    Label lblCaption = new Label();&lt;br /&gt;
    lblCaption.Parent = this;&lt;br /&gt;
    lblCaption.Text = &amp;quot;&amp;amp;Enter Text Here:&amp;quot;;&lt;br /&gt;
    lblCaption.Size = new Size(lblCaption.PreferredWidth, lblCaption.PreferredHeight);&lt;br /&gt;
    lblCaption.Location = new Point(0, yDelta);&lt;br /&gt;
    lblCaption.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    txt = new TextBox();&lt;br /&gt;
    txt.Parent = this;&lt;br /&gt;
    txt.Size = new Size(100,23);&lt;br /&gt;
    txt.Location = new Point(lblCaption.Width + 5, yDelta);&lt;br /&gt;
    txt.TextChanged += new System.EventHandler(txt_TextChanged);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new LabelTextChange());&lt;br /&gt;
  }&lt;br /&gt;
  private void txt_TextChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    lblEcho.Text = txt.Text;&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>