Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/10 03:40:45 (15 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/ParameterView.cs

    r2917 r3365  
    6565        Caption = "Parameter";
    6666        dataTypeTextBox.Text = "-";
    67         dataTypeTextBox.Enabled = false;
    6867      } else {
    6968        Caption = Content.Name + " (" + Content.GetType().Name + ")";
    7069        dataTypeTextBox.Text = Content.DataType.GetPrettyName();
    71         dataTypeTextBox.Enabled = true;
    7270      }
     71      SetEnabledStateOfControls();
     72    }
     73
     74    protected override void OnReadOnlyChanged() {
     75      base.OnReadOnlyChanged();
     76      SetEnabledStateOfControls();
     77    }
     78
     79    private void SetEnabledStateOfControls() {
     80      dataTypeTextBox.Enabled = Content != null;
    7381    }
    7482  }
Note: See TracChangeset for help on using the changeset viewer.