I want to save the values of painted Control-locations in DESIGN-mode to a Array and show
a new Dialog-Preview with the Results.
I noticed that the saved values are different to the defined Screen-locations.
It is not much, but a difference. Maybe because of Title and Frame ?
To get the identically Dialog-Values I had to do it that way :
aMO[1][1] := "DIALOG "
aMO[1][2] := oDlg:nTop
aMO[1][3] := oDlg:nLeft
aMO[1][4] := oDlg:nWidth + 42
aMO[1][5] := oDlg:nHeight + 22
aMO[1][6] := " "
I changed DIALOG to WINDOW for a Test, with the same Result.
Is it possible, to save the identically Values after placing Controls to a new Location ?
Defined Control-Location :
@ 30, 600 Checkbox oChk1 Var lChk1 PIXEL DESIGN Of oDlg ;
PROMPT "Gradient Horizontal / Vertical" Size 220,22 FONT oFont
oChk1:bRclicked:={|| IIF( lChk1 = .T., lChk1 := .F., lChk1 := .T. ), oChk1:Refresh() }
@ 70,750 GET oGet1 Var nGet1 Of oDlg PIXEL DESIGN Size 70,25 FONT oFont
@ 110,750 GET oGet2 Var nGet2 Of oDlg PIXEL DESIGN Size 70,25 FONT oFont
@ 150,750 GET oGet3 Var nGet3 Of oDlg PIXEL DESIGN Size 70,25 FONT oFont
oGet3:bRclicked:={|| nGet3 := GET_INP(nGet3), oGet3:Refresh() }
The painted Locations ( Return-values ) saved to a Array with wrong Values :
aMO[3][1] := "DIRECTION "
aMO[3][2] := oChk1:nTop ( 24 )
aMO[3][3] := oChk1:nLeft ( 600 )
aMO[3][4] := oChk1:nWidth ( 216 )
aMO[3][5] := oChk1:nHeight ( 16 )
aMO[3][6] := IIF( lChk1 = .T., "HORIZONTAL", "VERTICAL" )
aMO[4][1] := "1. COLOR "
aMO[4][2] := oGet1:nTop ( 64 )
aMO[4][3] := oGet1:nLeft ( 744 )
aMO[4][4] := oGet1:nWidth ( 64 )
aMO[4][5] := oGet1:nHeight ( 24 )
aMO[4][6] := ALLTRIM(STR(nGet1))
aMO[5][1] := "2. COLOR "
aMO[5][2] := oGet2:nTop ( 104 )
aMO[5][3] := oGet2:nLeft ( 744 )
aMO[5][4] := oGet2:nWidth ( 64 )
aMO[5][5] := oGet2:nHeight ( 24 )
aMO[5][6] := ALLTRIM(STR(nGet2))
aMO[6][1] := "POSITION "
aMO[6][2] := oGet3:nTop ( 144 )
aMO[6][3] := oGet3:nLeft ( 744 )
aMO[6][4] := oGet3:nWidth ( 64 )
aMO[6][5] := oGet3:nHeight ( 24 )
aMO[6][6] := ALLTRIM(STR(nGet3))
Best Regards
Uwe