;=================== GUI start ===============================================
$Form1 = GUICreate("Form1", 850, 820, 192, 4, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_VSCROLL))
$Label1 = GUICtrlCreateLabel("Test case Id", 8, 10, 75, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 90, 6, 50, 21)
$Label2 = GUICtrlCreateLabel("Date of creation", 156, 10, 96, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("", 260, 6, 70, 21)
$Label3 = GUICtrlCreateLabel("Priority", 345, 10, 43, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("", 399, 6, 20, 21)
$Label4 = GUICtrlCreateLabel("Test name", 9, 34, 63, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input4 = GUICtrlCreateInput("", 90, 30, 720, 21)
$Label5 = GUICtrlCreateLabel("Test function", 8, 58, 79, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input5 = GUICtrlCreateInput("", 90, 54, 720, 21)
$Label6 = GUICtrlCreateLabel("Num", 8, 90, 79, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Label7 = GUICtrlCreateLabel("Action", 190, 90, 80, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Label8 = GUICtrlCreateLabel("Expected result", 500, 90, 120, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Label8 = GUICtrlCreateLabel("Actual result", 740, 90, 120, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;Preconditions
$Label10 = GUICtrlCreateLabel("Preconditions", 350, 105, 79, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
Dim $preconditions [$PreconditionRows+1][5]
$x = 8
$y = 125
$width = 0
$height = 50
$margin = 3
For $i = 1 to $PreconditionRows
For $j=1 to 4
Switch $j
Case 1
$width = 20
Case 2
$width = 360
Case 3
$width = 360
Case 4
$width = 50
EndSwitch
$preconditions[$i][$j] = GUICtrlCreateEdit("", $x, $y, $width, $height, $WS_VSCROLL)
GUICtrlSetData(-1, "")
$x = $x + $width + $margin
Next
$x=8
$y=$y+$height + $margin
Next
;Test steps
$Label11 = GUICtrlCreateLabel("Test steps", 350, 125 + $width*$PreconditionRows + $margin*$PreconditionRows, 79, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
Dim $TestSteps [$TestStepsRows+1][5]
$x = 8
$y = 125 + 17 + $width*$PreconditionRows + $margin*$PreconditionRows
$width = 0
$height = 50
$margin = 3
For $i = 1 to $TestStepsRows
For $j=1 to 4
Switch $j
Case 1
$width = 20
Case 2
$width = 360
Case 3
$width = 360
Case 4
$width = 50
EndSwitch
$TestSteps[$i][$j] = GUICtrlCreateEdit("", $x, $y, $width, $height, $WS_VSCROLL)
GUICtrlSetData(-1, "")
$x = $x + $width + $margin
Next
$x=8
$y=$y+$height + $margin
Next
;Postconditions
$Label12 = GUICtrlCreateLabel("Postconditions", 350, 125 + 17 + $width*$PreconditionRows + $margin*$TestStepsRows + $width*$TestStepsRows + 7 , 85, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
Dim $postconditions[5]
$x = 8
$y = 125 + 17 + $width*$PreconditionRows + $margin*$PreconditionRows + $width*$TestStepsRows + $margin*$TestStepsRows + 17
$width = 0
$height = 50
$margin = 3
For $j=1 to 4
Switch $j
Case 1
$width = 20
Case 2
$width = 360
Case 3
$width = 360
Case 4
$width = 50
EndSwitch
$postconditions[$j] = GUICtrlCreateEdit("", $x, $y, $width, $height, $WS_VSCROLL)
GUICtrlSetData(-1, "")
$x = $x + $width + $margin
Next
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
_GUIScrollBars_Init($Form1)
;=================== GUI finish ================================================