Hello Ipunis :
Some small changes needed of :
// @ 1,0 say "Row one"
// @ 2,0 say "Row two"
...
...
Local oSay1, oSay2// Optional using Vars :
Local
cVar1 := "Row one"Local
cVar2 := "Row two"@ 1,0 say
oSay1 PROMPT "Row one"
@ 2,0 say
oSay2 PROMPT "Row two"
or using Vars :
@ 1,0 say
oSay1 VAR cVar1 @ 2,0 say
oSay2 VAR cVar2 // Pixel optional
// -----------------
@ 15,10 say
oSay1 PROMPT "Row one" PIXEL // use Pixel optional
@ 30,10 say
oSay2 PROMPT "Row two" PIXEL
// a Button to change the given SAY-Positions
@ 140, 120 BTNBMP oBtn1 OF oDlg 2007 ;
SIZE 70 , 40 PROMPT "Move" ;
FONT oGetFont ;
LEFT ;
NOBORDER ;
FILENAME "Move.bmp" ;
ACTION (
oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ;
oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh() ) // Set to new Position
oBtn1:lTransparent := .T.
oBtn1:cTooltip := " Move "
oBtn1:lBorder := .F.
or change the Position on Dialog-Init
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT (
oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ;
oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh() )
define different Spaces, the way You want to do it from a Start-position
with a defined Font :
- Code: Select all Expand view
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, hDC
// here I am able to change line space for SAY section that follow
// 12 means that 12 PIXELS will be row spacing and I am going to multiply fun_lspac
// with row number for every single row I want to use with SAY/GET system
LOCAL oSayFont := TFont():New("Arial", ,-12,.F.,.T. , , , ,.T. )
// - 11 because the Font-height is defined in POINT
LOCAL nstart1 := 0.1, nspace1 := oSayFont:nHeight - 11
// Pixel and Font-Height ( POINT ) are not the same,
You must find out the Space You need.
LOCAL nstart2 := 100, nspace2 := oSayFont:nHeight + 5
SET _3DLOOK ON
DEFINE DIALOG oDlg FROM 10, 10 TO 50, 50 TRANSPARENT ;
TITLE "Dialog" STYLE nOr( WS_VISIBLE, WS_OVERLAPPEDWINDOW, WS_VSCROLL, WS_HSCROLL )
@ nstart1 + 1*nspace1, 2 SAY "Row one"
@ nstart1 + 2*nspace1, 2 SAY "Row two"
@ nstart1 + 3*nspace1, 2 SAY "Row three"
@ nstart1 + 4*nspace1, 2 SAY "Row four"
@ nstart1 + 5*nspace1, 2 SAY "Row five"
@ nstart2 + 1*nspace2, 10 SAY "USING PIXEL" PIXEL
@ nstart2 + 2*nspace2, 10 SAY "Program ID" PIXEL
@ nstart2 + 3*nspace2, 10 SAY "Program name" PIXEL
@ nstart2 + 4*nspace2, 10 SAY "Licence owner" PIXEL
@ nstart2 + 5*nspace2, 10 SAY "Current year" PIXEL
@ nstart2 + 6*nspace2, 10 SAY "Epoch (SET EPOCH)" PIXEL
@ nstart2 + 7*nspace2, 10 SAY "Lokal hard drive" PIXEL
@ nstart2 + 8*nspace2, 10 SAY "Network/database drive" PIXEL
@ 15, 10 BUTTON "&End" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT D_GRADIENT( hDC, oDlg )
RETURN NIL
// ----- GRADIENT Dialog --------------------------
FUNCTION D_GRADIENT( hDC, oDlg )
LOCAL aColors := { { 0.1, 15778421, 16512957 },;
{ 0.1, 16512957, 15778421 } }
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors, .T. )
RETURN NIL
Best Regards
Uwe