Page 1 of 1

How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 10:38 am
by digitsoft
Hi Roger How I Change the Size of a DCGET after Created

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 11:14 am
by rdonnay
@ .. DCGET .. EVAL {|o|o:setSize({nCols, nRows})}

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 12:07 pm
by digitsoft
Roger
How to change Pixel Coordinates to Rows and Colunnas
in SetSize ({x, y})

rdonnay wrote:@ .. DCGET .. EVAL {|o|o:setSize({nCols, nRows})}

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 1:22 pm
by rdonnay
Maybe you should just change the width:

DCGET .. EVAL {|o| o:setSize({nColPixels, o:currentSize()[2]})

1 text column = 7 pixels

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 2:07 pm
by digitsoft
Thanks Roger
I have another problem to see if you can help me
If I have a DCGET x: = SPACE (8)
and the DCGET is Created
If I change x: = SPACE (10)
I can't enter the 10 digits


rdonnay wrote:Maybe you should just change the width:

DCGET .. EVAL {|o| o:setSize({nColPixels, o:currentSize()[2]})

1 text column = 7 pixels

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 3:01 pm
by rdonnay
Try this:

o:setEditBuffer(Space(10))

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 3:07 pm
by digitsoft
Roger
It does not work Attachment see the image


@ xRow+=1.1,01.0 DCSAY "NCF:" PARENT oMyGroup1
@ xRow-00.1,13.0 DCCOMBOBOX cSerieNCF LIST aSerieNCF TYPE XBPCOMBO_DROPDOWNLIST SIZE 04.5,06.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
IMMEDIATE ;
ITEMSELECTED {|o| DC_VarToListBox( oTipoNCF, aTipoNCF := TipoNCF(cSerieNCF) ),;
oNCF_Sec :SetSize({LongitudNCF(cSerieNCF)*6.4,20}),;
oTipoNCF :SetData( cTipoNCF := aTipoNCF[01] ),;
oNCF_Sec :SetData( cSecuenciaNCF := SPACE(LongitudNCF( cSerieNCF )-3) ),;
oNCF_Sec:SetEditBuffer( cSecuenciaNCF ),;
} ;
WHEN {|o| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1

rdonnay wrote:Try this:

o:setEditBuffer(Space(10))

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 4:01 pm
by rdonnay
You said you were using a DCGET, not a DCCOMBOBOX.

Have you tried looking at the methods of XbpComboBox()?

They are documented in the Xbase++ help file.

Re: How I Change the Size of a DCGET after Created

Posted: Mon Aug 26, 2019 5:16 pm
by digitsoft
Yes Roger, I said that
I use the combo box because, depending on what you choose in dcget, you must change the data entry of 11 or 13 or 19-digit change of what you choose in the combo box

look my code

@ xRow+=1.1,01.0 DCSAY "NCF:" PARENT oMyGroup1
@ xRow-00.1,13.0 DCCOMBOBOX cSerieNCF LIST aSerieNCF TYPE XBPCOMBO_DROPDOWNLIST SIZE 04.5,06.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
IMMEDIATE ;
ITEMSELECTED {|o| DC_VarToListBox( oTipoNCF, aTipoNCF := TipoNCF(cSerieNCF) ),;
oNCF_Sec :SetSize({LongitudNCF(cSerieNCF)*6.4,20}),;
oTipoNCF :SetData( cTipoNCF := aTipoNCF[01] ),;
oNCF_Sec :SetData( cSecuenciaNCF := SPACE(LongitudNCF( cSerieNCF )-3) ),;
oNCF_Sec:SetEditBuffer( cSecuenciaNCF ),;
msgbox( "*: "+var2char(LEN(cSecuenciaNCF))+" " +cTipoNCF+" "+var2char(aTipoNCF) );
} ;
WHEN {|o| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1

@ xRow-00.1,_Col()+1.9 DCCOMBOBOX cTipoNCF LIST aTipoNCF TYPE XBPCOMBO_DROPDOWNLIST SIZE 05.1,07.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
OBJECT oTipoNCF ;
WHEN {|o| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1
@ xRow-00.1,_Col()+1.9 DCGET cSecuenciaNCF PICT "@!k" MESSAGE "Indique el Numero de Comprovante Fiscal Secuencial." INTO oMsgBox ;
VALID {|c| ValidarCampo(9.1,aApp,GetList) } ;
GETOBJECT oNCF_Sec ;
WHEN {|| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1






rdonnay wrote:You said you were using a DCGET, not a DCCOMBOBOX.

Have you tried looking at the methods of XbpComboBox()?

They are documented in the Xbase++ help file.

Re: How I Change the Size of a DCGET after Created

Posted: Tue Aug 27, 2019 11:02 am
by digitsoft
Thanks Roger
I already solved the problem.
digitsoft wrote:Yes Roger, I said that
I use the combo box because, depending on what you choose in dcget, you must change the data entry of 11 or 13 or 19-digit change of what you choose in the combo box

look my code

@ xRow+=1.1,01.0 DCSAY "NCF:" PARENT oMyGroup1
@ xRow-00.1,13.0 DCCOMBOBOX cSerieNCF LIST aSerieNCF TYPE XBPCOMBO_DROPDOWNLIST SIZE 04.5,06.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
IMMEDIATE ;
ITEMSELECTED {|o| DC_VarToListBox( oTipoNCF, aTipoNCF := TipoNCF(cSerieNCF) ),;
oNCF_Sec :SetSize({LongitudNCF(cSerieNCF)*6.4,20}),;
oTipoNCF :SetData( cTipoNCF := aTipoNCF[01] ),;
oNCF_Sec :SetData( cSecuenciaNCF := SPACE(LongitudNCF( cSerieNCF )-3) ),;
oNCF_Sec:SetEditBuffer( cSecuenciaNCF ),;
msgbox( "*: "+var2char(LEN(cSecuenciaNCF))+" " +cTipoNCF+" "+var2char(aTipoNCF) );
} ;
WHEN {|o| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1

@ xRow-00.1,_Col()+1.9 DCCOMBOBOX cTipoNCF LIST aTipoNCF TYPE XBPCOMBO_DROPDOWNLIST SIZE 05.1,07.0 COLOR GRA_CLR_BLUE,GRA_CLR_WHITE ;
OBJECT oTipoNCF ;
WHEN {|o| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1
@ xRow-00.1,_Col()+1.9 DCGET cSecuenciaNCF PICT "@!k" MESSAGE "Indique el Numero de Comprovante Fiscal Secuencial." INTO oMsgBox ;
VALID {|c| ValidarCampo(9.1,aApp,GetList) } ;
GETOBJECT oNCF_Sec ;
WHEN {|| lEditar .AND. cTipMov = "GF" } ;
PARENT oMyGroup1






rdonnay wrote:You said you were using a DCGET, not a DCCOMBOBOX.

Have you tried looking at the methods of XbpComboBox()?

They are documented in the Xbase++ help file.