Quintiq file version 2.0
#parent: #root
Method UIShowHideComponent (
  Boolean isInit
) id:Method_DialogCreateEditUnit_UIShowHideComponent
{
  #keys: '[135040.0.219562511]'
  Body:
  [*
    //show / hide LotSizeHorizonInfo label
    lotSizeDataValue   := guard( DataHolderDialogData.Data().LotSize(), 0 );
    lotSizeScreenValue := ApplicationMacroPlanner.FormatStringToReal( EditFieldLotSize.Text() );
    lotSizeValue := ifexpr( isInit,
                            lotSizeDataValue,
                            lotSizeScreenValue );
    
    showLotSizeInfo := lotSizeValue > 0;
    LabelLotSizeHorizonInfo.Visible( showLotSizeInfo );
    
    if( showLotSizeInfo )
    {
      lotSizeInfo := Translations::MP_LotSize_Info_LotSizeHorizon( MacroPlan );
      LabelLotSizeHorizonInfo.Text( lotSizeInfo );
    
      //tooltips  
      tooltip := Translations::MP_Designer_LotSizeHorizonActive_Tooltip()
                 +"<BR>"
                 +Translations::MP_Designer_OptimizerStrategySetting_CanBeChanged_Tooltip()
      LabelLotSizeHorizonInfo.Tooltip( tooltip );
    }
  *]
}
