- Code: Select all Expand view RUN
#include "Fwce.ch"
FUNCTION MAIN()
LOCAL oWnd
LOCAL cli := SPACE( 35 )
LOCAL ind := SPACE( 35 )
DEFINE WINDOW oWnd;
TITLE "Test"
@ 1, 0 SAY "Cliente:"
@ 1, 7 COMBOBOX cli;
SIZE 100, 20
@ 1, 28 BUTTON "Test1";
SIZE 45, 20
@ 2, 0 BUTTON "Nuovo";
SIZE 50, 20
@ 2, 9 BUTTON "Cambia";
SIZE 50, 20
@ 2, 18 BUTTON "Chiudi";
SIZE 50, 20
@ 2, 27 BUTTON "Svuota";
SIZE 50, 20
@ 2, 36 BUTTON "C";
SIZE 24, 20
@ 3, 0 LISTBOX FIELDS;
SIZE 240, 125
@ 9, 0 SAY "Indirizzo:"
@ 9, 7 COMBOBOX Ind;
SIZE 100, 20
@ 9, 28 BUTTON "Test2";
SIZE 45, 20
@ 12, 0 SAY "Indirizzo:"
@ 12, 7 COMBOBOX Ind;
SIZE 100, 20
@ 12, 28 BUTTON "Test2";
SIZE 45, 20
ACTIVATE WINDOW oWnd;
ON INIT ADJCTRLS( oWnd )
RETURN NIL
STATIC FUNCTION ADJCTRLS( oWnd )
LOCAL oCtl, nTop, nHeight
LOCAL i
IF EMPTY( oWnd:aControls ); RETURN NIL; ENDIF
FOR i = 1 TO LEN( oWnd:aControls )
oCtl = oWnd:aControls[ i ]
nTop = ( oCtl:nTop - 11 ) * 1.41
nHeight = oCtl:nHeight
DO CASE
CASE oCtl:ClassName = "TBUTTON"
nTop = ( nTop - 4 ) * 0.83
nHeight *= 0.96
CASE oCtl:ClassName = "TCOMBOBOX"
nTop = ( nTop - 1 ) * 1.07
CASE oCtl:ClassName = "TGET"
nTop *= 1.15
CASE oCtl:ClassName = "TSAY"
nTop -= 2
CASE oCtl:ClassName = "TWBROWSE"
nTop *= 1.07
ENDCASE
oCtl:Move( nTop, oCtl:nLeft, oCtl:nWidth, nHeight )
NEXT
RETURN NIL
EMG