Ejemplo n.º 1
0
        ActiveLabel makeNewLabel(String name, Object item, Image icon)
        {
            ActiveLabel aLabel = new ActiveLabel("     " + name, item);

            //
            // activeLabel1
            //
            //aLabel.BackColor = System.Drawing.SystemColors.Control;

            if (icon != null)
            {
                aLabel.Image = icon;
            }
            aLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;

            aLabel.Location  = new System.Drawing.Point(0, _labelHeight * _nameList.Count + 1000);
            aLabel.Name      = name;
            aLabel.Size      = new System.Drawing.Size(100, _labelHeight);
            aLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;

            aLabel.MouseDown += new MouseEventHandler(aLabel_MouseDown);
            aLabel.Dock       = System.Windows.Forms.DockStyle.Bottom;
            //aLabel.DragLeave +=new EventHandler(aLabel_DragLeave);
            aLabel.Parent = P_Back;
            P_Back.SuspendLayout();
            P_Back.Controls.Add(aLabel);

            P_Back.ResumeLayout();

            return(aLabel);
        }
Ejemplo n.º 2
0
 void resizePanel()
 {
     P_Back.SuspendLayout();
     P_Back.SetBounds(0, 0, 0, _items.Count * (_labelHeight + 1), BoundsSpecified.Height);
     P_Back.ResumeLayout();
 }