- Timestamp:
- 03/30/11 15:38:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs
r5445 r5891 22 22 using System; 23 23 using System.ComponentModel; 24 using System.Drawing; 24 25 using System.Windows.Forms; 25 26 using HeuristicLab.MainForm; … … 87 88 private void valueTextBox_KeyDown(object sender, KeyEventArgs e) { 88 89 if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) 89 valueLabel.Focus(); // set focus on label to validate data 90 valueLabel.Select(); // select label to validate data 91 90 92 if (e.KeyCode == Keys.Escape) { 91 93 valueTextBox.Text = Content.GetValue(); 92 valueLabel. Focus(); // set focus onlabel to validate data94 valueLabel.Select(); // select label to validate data 93 95 } 94 96 } … … 108 110 109 111 private void valueLabel_VisibleChanged(object sender, EventArgs e) { 110 if (valueLabel.Visible) 111 valueTextBox.Dock = DockStyle.None; 112 else 113 valueTextBox.Dock = DockStyle.Fill; 112 if (valueLabel.Visible) { 113 valueTextBox.Location = new Point(56, 0); 114 valueTextBox.Size = new Size(valueTextBox.Size.Width - valueLabel.Size.Width, valueTextBox.Size.Height); 115 } else { 116 valueTextBox.Location = new Point(19, 0); 117 valueTextBox.Size = new Size(valueTextBox.Size.Width + valueLabel.Size.Width, valueTextBox.Size.Height); 118 } 114 119 } 115 120
Note: See TracChangeset
for help on using the changeset viewer.