admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Quintiq file version 2.0
#parent: #root
Method ShowHideComponentForRadioButtonValue () id:Method_DialogCreateEditInventorySpecification_ShowHideComponentForRadioButtonValue
{
  #keys: '[108486.0.932613536]'
  Body:
  [*
    // Show / hide labels and editor of days and quantity according to current selection of radio buttons.
    
    
    // MinLevelInDays and MinLevelInQuantity
    EditorMinLevelInDays.Visible( [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    LabelMinLevelInDays.Visible( [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    EditorMinLevelInQuantity.Visible( not [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    LabelMinLevelInQuantity.Visible( not [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    
    EditorMinLevelInDays.Enabled( [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    EditorMinLevelInQuantity.Enabled( not [Boolean]RadioButtonGroupMinLevel.BoundValue() );
    
    // MaxLevelInDays and MaxLevelInQuantity
    EditorMaxLevelInDays.Visible( [Boolean]RadioButtonGroupMaxLevel.BoundValue() );
    LabelMaxLevelInDays.Visible( [Boolean]RadioButtonGroupMaxLevel.BoundValue() );
    EditorMaxLevelInQuantity.Visible( not [Boolean]RadioButtonGroupMaxLevel.BoundValue() );
    LabelMaxLevelInQuantity.Visible( not [Boolean]RadioButtonGroupMaxLevel.BoundValue() );
    
    enablemaxlevel := GroupPanelMaxLevel.Enabled() and CheckBoxHasMaxLevel.Checked();
    RadioButtonGroupMaxLevel.Enabled( enablemaxlevel );
    EditorMaxLevelInDays.Enabled( enablemaxlevel and [Boolean] RadioButtonGroupMaxLevel.BoundValue() );
    EditorMaxLevelInQuantity.Enabled( enablemaxlevel and not [Boolean] RadioButtonGroupMaxLevel.BoundValue() );
  *]
}