Ignore:
Timestamp:
04/21/10 06:14:03 (10 years ago)
Author:
swagner
Message:

Adapted views according the new read-only property (#973)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs

    r3442 r3454  
    3535        Caption = "SymbolicExpression View";
    3636        textBox.Text = string.Empty;
    37         textBox.Enabled = false;
    3837      } else {
    3938        textBox.Text = SymbolicExpression(Content.Root, 0);
    40         textBox.Enabled = true;
    4139      }
     40      SetEnabledStateOfControls();
     41    }
     42
     43    protected override void OnReadOnlyChanged() {
     44      base.OnReadOnlyChanged();
     45      SetEnabledStateOfControls();
     46    }
     47
     48    private void SetEnabledStateOfControls() {
     49      textBox.Enabled = Content != null;
     50      textBox.ReadOnly = ReadOnly;
    4251    }
    4352
Note: See TracChangeset for help on using the changeset viewer.