How I Change the Size of a DCGET after Created
Posted: Mon Aug 26, 2019 10:38 am
Hi Roger How I Change the Size of a DCGET after Created
Donnay Software Web Forums
http://bb.mobile.donnay-software.com/Donnay/
http://bb.mobile.donnay-software.com/Donnay/viewtopic.php?f=2&t=2630
rdonnay wrote:@ .. DCGET .. EVAL {|o|o:setSize({nCols, nRows})}
rdonnay wrote:Maybe you should just change the width:
DCGET .. EVAL {|o| o:setSize({nColPixels, o:currentSize()[2]})
1 text column = 7 pixels
rdonnay wrote:Try this:
o:setEditBuffer(Space(10))
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.
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.