Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/24/10 10:39:33 (14 years ago)
Author:
mkommend
Message:

Added the LabelVisible property to the StringConvertibleValueView (ticket #1201).

Location:
trunk/sources/HeuristicLab.Data.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.Designer.cs

    r3048 r4485  
    6060      this.valueTextBox.Size = new System.Drawing.Size(194, 20);
    6161      this.valueTextBox.TabIndex = 1;
    62       this.valueTextBox.Validated += new System.EventHandler(this.valueTextBox_Validated);
    6362      this.valueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.valueTextBox_KeyDown);
    6463      this.valueTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.valueTextBox_Validating);
     64      this.valueTextBox.Validated += new System.EventHandler(this.valueTextBox_Validated);
    6565      //
    6666      // errorProvider
     
    7777      this.valueLabel.TabIndex = 0;
    7878      this.valueLabel.Text = "&Value:";
     79      this.valueLabel.VisibleChanged += new System.EventHandler(this.valueLabel_VisibleChanged);
    7980      //
    8081      // StringConvertibleValueView
     
    8586      this.Controls.Add(this.valueTextBox);
    8687      this.Name = "StringConvertibleValueView";
    87       this.Size = new System.Drawing.Size(250, 38);
     88      this.Size = new System.Drawing.Size(250, 22);
    8889      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    8990      this.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs

    r3904 r4485  
    4141      }
    4242      set { base.ReadOnly = value; }
     43    }
     44
     45    public bool LabelVisible {
     46      get { return valueLabel.Visible; }
     47      set { valueLabel.Visible = value; }
    4348    }
    4449
     
    101106      valueTextBox.Text = Content.GetValue();
    102107    }
     108
     109    private void valueLabel_VisibleChanged(object sender, EventArgs e) {
     110      if (valueLabel.Visible)
     111        valueTextBox.Dock = DockStyle.None;
     112      else
     113        valueTextBox.Dock = DockStyle.Fill;
     114    }
     115
    103116  }
    104117}
Note: See TracChangeset for help on using the changeset viewer.