Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/10 03:40:45 (14 years ago)
Author:
swagner
Message:

Adapted views of HeuristicLab.Parameters.Views according the new read-only property (#973).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/LookupParameterView.cs

    r2917 r3365  
    8383        Caption = "LookupParameter";
    8484        actualNameTextBox.Text = "-";
    85         actualNameTextBox.Enabled = false;
    8685      } else {
    8786        Caption = Content.Name + " (" + Content.GetType().Name + ")";
    8887        actualNameTextBox.Text = Content.ActualName;
    89         actualNameTextBox.Enabled = true;
    9088      }
     89      SetEnabledStateOfControls();
     90    }
     91
     92    protected override void OnReadOnlyChanged() {
     93      base.OnReadOnlyChanged();
     94      SetEnabledStateOfControls();
     95    }
     96
     97    private void SetEnabledStateOfControls() {
     98      actualNameTextBox.Enabled = Content != null;
     99      actualNameTextBox.ReadOnly = ReadOnly;
    91100    }
    92101
Note: See TracChangeset for help on using the changeset viewer.