alinhamento pelo Centro .. que o GET fique alinhado e o say se mova para esquerda se ajustando
Ari
Code: Select all
/* Retirei PICTURE do SAY causa conflito com GET
RIGHT do SAY mudei para padrao .T. Alinhamento
TRANSPARENT do SAY mudei para .T.
*/
#xcommand @ <nRow>, <nCol> SAY [ <oSay> <label: PROMPT> ] <cText> ; // SAY
GET [ <oGet> VAR ] <uVar> ; // GET
[ <pict: PICT, PICTURE> <cPict> ] ; // get e say
[ <dlg: OF,WINDOW,DIALOG > <oWnd> ] ; // get e say
[ FONT <oFont> ] ; // get e say
[ <lCenter: CENTERED, CENTER > ] ; // get e say
[ <lRight: RIGHT > ] ; // get e say
[ <lBorder: BORDER > ] ; // say
[ <lPixel: PIXEL, PIXELS > ] ; // get e say
[ <color: COLOR,COLORS > <nClrText> [,<nClrBack> ] ] ; // get e say
[ SIZE <nWidth>, <nHeight> ] ; // get e say
[ <design: DESIGN > ] ; // get e say
[ <update: UPDATE > ] ; // get e say
[ <lShaded: SHADED, SHADOW > ] ; // say
[ <lBox: BOX > ] ; // say
[ <lRaised: RAISED > ] ; // say
[ <adj: ADJUST> ] ; // say
[ <lTrans: TRANSPARENT>] ; // say
[ VALID <ValidFunc> ] ; // get
[ CURSOR <oCursor> ] ; // get
[ MESSAGE <cMsg> ] ; // get
[ WHEN <uWhen> ] ; // get
[ ON CHANGE <uChange> ] ; // get
[ <readonly: READONLY, NO MODIFY> ] ; // get
[ <help:HELPID, HELP ID> <nHelpId> ] ; // get
[ <spin: SPINNER> [ON UP <SpnUp>] [ON DOWN <SpnDn>] [MIN <Min>] [MAX <Max>] ] ; // get
[ CUEBANNER <cCueText> ] ; // get
=> ;
[ <oGet> := ] TGet():New( <nRow>, <nCol>, bSETGET(<uVar>),; // GET
[<oWnd>], <nWidth>, <nHeight>, <cPict>, <{ValidFunc}>,;
<nClrText>, <nClrBack>, <oFont>, <.design.>,;
<oCursor>, .T., <cMsg>, <.update.>, <{uWhen}>,;
<.lCenter.>, <.lRight.>,;
[\{|nKey, nFlags, Self| <uChange>\}], <.readonly.>,;
.f., .f., <nHelpId>,;
<.spin.>, <{SpnUp}>, <{SpnDn}>, <{Min}>, <{Max}>,,, <"uVar">, [<cCueText>] ) ;
[ ;<oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,; // SAY
[<oWnd>],, <oFont>, <.lCenter.>, .T., <.lBorder.>,;
.T., <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
<.design.>, <.update.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>, .T. ) ;
function testeGET()
local oDlg, oSay[3], oGet[3], nVal := 0.00
local cNome := space(40)
local cEnd := space(20)
local nRow := 5
local nCol := 3
DEFINE DIALOG oDlg TITLE "Teste comando SAY e GET" FROM 0, 0 TO 480,480 PIXEL
@ nRow, nCol SAY oSay[1] PROMPT "Valor:" GET oGet[1] VAR nVal OF oDlg PICTURE "@E 999,999.99" UPDATE
nRow+=14
@ nRow, nCol SAY oSay[2] PROMPT "Nome:" GET oGet[2] VAR cNome OF oDlg PICTURE "@!" UPDATE
nRow+=14
@ nRow, nCol SAY oSay[3] PROMPT "Endereço:" GET oGet[3] VAR cEnd OF oDlg PICTURE "@!" UPDATE
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL