Changeset 5908


Ignore:
Timestamp:
03/31/11 13:07:29 (11 years ago)
Author:
mkommend
Message:

#1460: Corrected StringConvertibleValueView.

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

Legend:

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

    r5891 r5908  
    4646      this.SuspendLayout();
    4747      //
    48       // Item1View
    49       //
    50       this.Item1View.Location = new System.Drawing.Point(41, 3);
    51       this.Item1View.Size = new System.Drawing.Size(264, 22);
    52       //
    53       // Item2View
    54       //
    55       this.Item2View.Location = new System.Drawing.Point(41, 31);
    56       this.Item2View.Size = new System.Drawing.Size(264, 22);
    57       //
    5848      // Item1Label
    5949      //
  • trunk/sources/HeuristicLab.Data.Views/3.3/IntRangeView.Designer.cs

    r5891 r5908  
    4646      this.SuspendLayout();
    4747      //
    48       // Item1View
    49       //
    50       this.Item1View.Location = new System.Drawing.Point(41, 3);
    51       this.Item1View.Size = new System.Drawing.Size(264, 22);
    52       //
    53       // Item2View
    54       //
    55       this.Item2View.Location = new System.Drawing.Point(41, 31);
    56       this.Item2View.Size = new System.Drawing.Size(264, 22);
    57       //
    5848      // Item1Label
    5949      //
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueTupleView.Designer.cs

    r5891 r5908  
    5252      // Item1View
    5353      //
    54       this.Item1View.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     54      this.Item1View.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    5555            | System.Windows.Forms.AnchorStyles.Right)));
    5656      this.Item1View.Caption = "StringConvertibleValue View";
    5757      this.Item1View.Content = null;
    5858      this.Item1View.LabelVisible = false;
    59       this.Item1View.Location = new System.Drawing.Point(45, 3);
     59      this.Item1View.Location = new System.Drawing.Point(45, 0);
    6060      this.Item1View.Name = "Item1View";
    6161      this.Item1View.ReadOnly = false;
    62       this.Item1View.Size = new System.Drawing.Size(260, 22);
     62      this.Item1View.Size = new System.Drawing.Size(260, 20);
    6363      this.Item1View.TabIndex = 0;
    6464      //
    6565      // Item2View
    6666      //
    67       this.Item2View.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     67      this.Item2View.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    6868            | System.Windows.Forms.AnchorStyles.Right)));
    6969      this.Item2View.Caption = "StringConvertibleValue View";
    7070      this.Item2View.Content = null;
    7171      this.Item2View.LabelVisible = false;
    72       this.Item2View.Location = new System.Drawing.Point(45, 31);
     72      this.Item2View.Location = new System.Drawing.Point(45, 26);
    7373      this.Item2View.Name = "Item2View";
    7474      this.Item2View.ReadOnly = false;
    75       this.Item2View.Size = new System.Drawing.Size(260, 22);
     75      this.Item2View.Size = new System.Drawing.Size(260, 20);
    7676      this.Item2View.TabIndex = 1;
    7777      //
     
    7979      //
    8080      this.Item1Label.AutoSize = true;
    81       this.Item1Label.Location = new System.Drawing.Point(3, 6);
     81      this.Item1Label.Location = new System.Drawing.Point(3, 3);
    8282      this.Item1Label.Name = "Item1Label";
    8383      this.Item1Label.Size = new System.Drawing.Size(36, 13);
     
    8888      //
    8989      this.Item2Label.AutoSize = true;
    90       this.Item2Label.Location = new System.Drawing.Point(3, 34);
     90      this.Item2Label.Location = new System.Drawing.Point(3, 29);
    9191      this.Item2Label.Name = "Item2Label";
    9292      this.Item2Label.Size = new System.Drawing.Size(36, 13);
     
    103103      this.Controls.Add(this.Item2View);
    104104      this.Name = "StringConvertibleValueTupleView";
    105       this.Size = new System.Drawing.Size(308, 56);
     105      this.Size = new System.Drawing.Size(308, 47);
    106106      this.ResumeLayout(false);
    107107      this.PerformLayout();
     108
    108109    }
    109110
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.Designer.cs

    r5445 r5908  
    4949      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    5050      this.valueLabel = new System.Windows.Forms.Label();
     51      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5152      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     53      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     54      this.splitContainer.Panel1.SuspendLayout();
     55      this.splitContainer.Panel2.SuspendLayout();
     56      this.splitContainer.SuspendLayout();
    5257      this.SuspendLayout();
    5358      //
    5459      // valueTextBox
    5560      //
    56       this.valueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    57                   | System.Windows.Forms.AnchorStyles.Right)));
    58       this.valueTextBox.Location = new System.Drawing.Point(56, 0);
     61      this.valueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     62            | System.Windows.Forms.AnchorStyles.Right)));
     63      this.valueTextBox.Location = new System.Drawing.Point(17, 0);
    5964      this.valueTextBox.Name = "valueTextBox";
    60       this.valueTextBox.Size = new System.Drawing.Size(194, 20);
     65      this.valueTextBox.Size = new System.Drawing.Size(135, 20);
    6166      this.valueTextBox.TabIndex = 1;
    6267      this.valueTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.valueTextBox_KeyDown);
     
    7782      this.valueLabel.TabIndex = 0;
    7883      this.valueLabel.Text = "&Value:";
    79       this.valueLabel.VisibleChanged += new System.EventHandler(this.valueLabel_VisibleChanged);
     84      //
     85      // splitContainer
     86      //
     87      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     88      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     89      this.splitContainer.IsSplitterFixed = true;
     90      this.splitContainer.Location = new System.Drawing.Point(0, 0);
     91      this.splitContainer.Name = "splitContainer";
     92      //
     93      // splitContainer.Panel1
     94      //
     95      this.splitContainer.Panel1.Controls.Add(this.valueLabel);
     96      //
     97      // splitContainer.Panel2
     98      //
     99      this.splitContainer.Panel2.Controls.Add(this.valueTextBox);
     100      this.splitContainer.Size = new System.Drawing.Size(194, 21);
     101      this.splitContainer.SplitterDistance = 41;
     102      this.splitContainer.SplitterWidth = 1;
     103      this.splitContainer.TabIndex = 2;
    80104      //
    81105      // StringConvertibleValueView
     
    83107      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    84108      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    85       this.Controls.Add(this.valueLabel);
    86       this.Controls.Add(this.valueTextBox);
     109      this.Controls.Add(this.splitContainer);
    87110      this.Name = "StringConvertibleValueView";
    88       this.Size = new System.Drawing.Size(250, 22);
     111      this.Size = new System.Drawing.Size(194, 21);
    89112      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     113      this.splitContainer.Panel1.ResumeLayout(false);
     114      this.splitContainer.Panel1.PerformLayout();
     115      this.splitContainer.Panel2.ResumeLayout(false);
     116      this.splitContainer.Panel2.PerformLayout();
     117      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     118      this.splitContainer.ResumeLayout(false);
    90119      this.ResumeLayout(false);
    91       this.PerformLayout();
    92120
    93121    }
     
    98126    private System.Windows.Forms.ErrorProvider errorProvider;
    99127    private System.Windows.Forms.Label valueLabel;
     128    private System.Windows.Forms.SplitContainer splitContainer;
    100129  }
    101130}
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs

    r5891 r5908  
    2222using System;
    2323using System.ComponentModel;
    24 using System.Drawing;
    2524using System.Windows.Forms;
    2625using HeuristicLab.MainForm;
     
    4544
    4645    public bool LabelVisible {
    47       get { return valueLabel.Visible; }
    48       set { valueLabel.Visible = value; }
     46      get { return !splitContainer.Panel1Collapsed; }
     47      set { splitContainer.Panel1Collapsed = !value; }
    4948    }
    5049
     
    9291      if (e.KeyCode == Keys.Escape) {
    9392        valueTextBox.Text = Content.GetValue();
    94         valueLabel.Select();  // select label to validate data
     93        valueLabel.Focus();  // select label to validate data
    9594      }
    9695    }
     
    108107      valueTextBox.Text = Content.GetValue();
    109108    }
    110 
    111     private void valueLabel_VisibleChanged(object sender, EventArgs e) {
    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       }
    119     }
    120 
    121109  }
    122110}
Note: See TracChangeset for help on using the changeset viewer.