Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/30/11 15:38:24 (14 years ago)
Author:
mkommend
Message:

#1460: Corrected StringConvertibleValueView and adapted StringConvertibleValueTupleView and derived views.

File:
1 edited

Legend:

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

    r5445 r5891  
    2222using System;
    2323using System.ComponentModel;
     24using System.Drawing;
    2425using System.Windows.Forms;
    2526using HeuristicLab.MainForm;
     
    8788    private void valueTextBox_KeyDown(object sender, KeyEventArgs e) {
    8889      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
    9092      if (e.KeyCode == Keys.Escape) {
    9193        valueTextBox.Text = Content.GetValue();
    92         valueLabel.Focus();  // set focus on label to validate data
     94        valueLabel.Select();  // select label to validate data
    9395      }
    9496    }
     
    108110
    109111    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      }
    114119    }
    115120
Note: See TracChangeset for help on using the changeset viewer.