How I Change the Size of a DCGET after Created

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

How I Change the Size of a DCGET after Created

#1 Post by digitsoft »

Hi Roger How I Change the Size of a DCGET after Created
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#2 Post by rdonnay »

@ .. DCGET .. EVAL {|o|o:setSize({nCols, nRows})}
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#3 Post 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})}
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#4 Post by rdonnay »

Maybe you should just change the width:

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

1 text column = 7 pixels
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#5 Post 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
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#6 Post by rdonnay »

Try this:

o:setEditBuffer(Space(10))
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#7 Post 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))
Attachments
Captura.JPG
Captura.JPG (51.17 KiB) Viewed 11728 times
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#8 Post 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.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#9 Post 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.
Nolberto Paulino
Regards

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#10 Post 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.
Nolberto Paulino
Regards

Post Reply