Quintiq file version 2.0
#parent: #root
Method ShowMonthlyPattern () id:Method_LibCal_dlgEvent_ShowMonthlyPattern
{
  #keys: '[131094.0.1642507688]'
  Body:
  [*
    // Specific day
    isDay  := ckbMonthlyDay.Checked();
    clrEdt := ifexpr( isDay, Color::WindowText(), Color::LightGray() );
    clrLbl := ifexpr( isDay, Color::WindowText(), Color::Gray()      );
    
    ckbMonthlyDay               .Enabled(   true   );
    edtMonthlyDay               .Enabled(   isDay  );
    edtMonthlyDay               .TextColor( clrEdt );
    lblMonthlyDayOfEvery        .TextColor( clrLbl );
    edtMonthlyDayEveryNrOfMonths.Enabled(   isDay  );
    edtMonthlyDayEveryNrOfMonths.TextColor( clrEdt );
    lblMonthlyDayMonths         .TextColor( clrLbl );
    
    // Pattern
    isPattern := ckbMonthlyPattern.Checked();
    clrEdt    := ifexpr( isPattern, Color::WindowText(), Color::LightGray() );
    clrLbl    := ifexpr( isPattern, Color::WindowText(), Color::Gray()      );
    clrSs     := ifexpr( isPattern, Color::Black(),      Color::Gray()      );
    
    ckbMonthlyPattern               .Enabled(   true    );
    ssMonthlyPatternWeekOfMonth     .Enabled( isPattern );
    ssMonthlyPatternWeekOfMonth     .TextColor( clrSs   );
    ssMonthlyPatternDayOfWeek       .Enabled( isPattern );
    ssMonthlyPatternDayOfWeek       .TextColor( clrSs   );
    lblMonthlyPatternOfEvery        .TextColor( clrLbl  );
    edtMonthlyPatternEveryNrOfMonths.Enabled( isPattern );
    edtMonthlyPatternEveryNrOfMonths.TextColor( clrEdt  );
    lblMonthlyPatternMonths         .TextColor( clrLbl  );
  *]
}
