Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/15/10 01:34:27 (14 years ago)
Author:
mkommend
Message:

implemented first version of View.ReadOnly and adapted some views to the new mechanism (ticket #973)

File:
1 edited

Legend:

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

    r3317 r3350  
    6161        Caption = "StringConvertibleValue View";
    6262        valueTextBox.Text = string.Empty;
    63         valueTextBox.Enabled = false;
    6463      } else {
    6564        Caption = Content.GetValue() + " (" + Content.GetType().Name + ")";
    6665        valueTextBox.Text = Content.GetValue();
    67         valueTextBox.ReadOnly = Content.ReadOnlyView;
     66      }
     67      SetEnableStateOfControls();
     68    }
     69    protected override void OnReadOnlyChanged() {
     70      base.OnReadOnlyChanged();
     71      SetEnableStateOfControls();
     72    }
     73    private void SetEnableStateOfControls() {
     74      if (Content == null) valueTextBox.Enabled = false;
     75      else {
    6876        valueTextBox.Enabled = true;
     77        valueTextBox.ReadOnly = ReadOnly;
    6978      }
    7079    }
Note: See TracChangeset for help on using the changeset viewer.