XBROWSE - EDITSOURCE()
Posted:
Tue Dec 06, 2016 10:14 pm
by rterraz
Hola
Estoy usando los metodos EditSource() y EditBrowse() del xbrowse y me resultan extremadamente utiles a la hora de editar registros de bases de
datos con muchos campos.
En algunos casos necesitaria hacer algunas pequeñas modificaciones en el dialogo que el método muestra por defecto (ej: cabeceras con dos lineas de texto que sólo muestran una linea por falta de espacio etc.).
He buscado el código fuente de las funciones en cuestión pero no lo puedo encontrar, alguien sabe donde encontrarlo o como modificar el Dlg ?
Desde ya gracias por la ayuda que puedan prestarme
Re: XBROWSE - EDITSOURCE()
Posted:
Wed Dec 07, 2016 5:32 pm
by Biel EA6DD
Estos métodos de xBrowse utilizan la clase DataRow (DataRow.prg).
Re: XBROWSE - EDITSOURCE()
Posted:
Wed Dec 07, 2016 6:23 pm
by Antonio Linares
Raul,
Tendrias que haces estos pequeños cambios en FWH:
En la clase TXBrowse: (xbrowse.prg)
METHOD EditSource( lNew, cFieldList, lNavigate, bInit ) INLINE ::Edit( lNew, cFieldList, .t., lNavigate, bInit )
METHOD Edit( lNew, cFieldList, lSourceData, lNavigate, bInit )
METHOD Edit( lNew, cFieldList, lSourceData, lNavigate, bInit ) CLASS TXBrowse
...
::DataRow( lNew, lSourceData, cFieldList ):Edit( nil, lNavigate,,, bInit )
En la Clase TDataRow: (datarow.prg)
METHOD Edit( lReadOnly, lNavigate, cTitle, cMsg, bInit ) CLASS TDataRow
y finalmente
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oRec:PlaceControls( oPanel, oSayFont, oFixed, lReadOnly, lNavigate, cMsg ), If( bInit != nil, Eval( bInit, oDlg ),) ) ;
VALID ( /* lExit .and. */ oRec:CloseMsg() )
Re: XBROWSE - EDITSOURCE()
Posted:
Thu Dec 08, 2016 1:44 pm
by rterraz
Muchas gracias por las respuestas!
Problema solucionado
Como siempre, el Foro una salvación
Re: XBROWSE - EDITSOURCE()
Posted:
Thu Dec 08, 2016 4:37 pm
by nageswaragunupudi
En algunos casos necesitaria hacer algunas pequeñas modificaciones en el dialogo que el método muestra por defecto (ej: cabeceras con dos lineas de texto que sólo muestran una linea por falta de espacio etc.).
Thanks.
We changed this in FWH16.12.
You can make these modifications in fwh\source\classes\datarow.prg.
In METHOD PlaceControls(...)
Present code:
- Code: Select all Expand view
nMaxSayWidth := Max( nMaxSayWidth, GetTextWidth( hDC, ::aPrompts[ nItem ] + " :", oSayFont:hFont ) )
New code:
- Code: Select all Expand view
nMaxSayWidth := Max( nMaxSayWidth, GetTextWidth( hDC, ;
StrTran( ::aPrompts[ nItem ], CRLF, " " ) + " :", oSayFont:hFont ) )
In METHOD MakeOneGet(...)
Present code:
- Code: Select all Expand view
if lMemo
@ nRow, 20 SAY ::aPrompts[ nAt ] + " :" SIZE nSayWidth,ROWHT PIXEL OF oPanel FONT oSayFont TRANSPARENT
else
@ nRow, 20 SAY ::aPrompts[ nAt ] + " :" SIZE nSayWidth,ROWHT PIXEL OF oPanel FONT oSayFont RIGHT TRANSPARENT
endif
New Code:
- Code: Select all Expand view
if lMemo
@ nRow, 20 SAY StrTran( ::aPrompts[ nAt ], CRLF, " " ) + " :" SIZE nSayWidth,ROWHT PIXEL OF oPanel FONT oSayFont TRANSPARENT
else
@ nRow, 20 SAY StrTran( ::aPrompts[ nAt ], CRLF, " " ) + " :" SIZE nSayWidth,ROWHT PIXEL OF oPanel FONT oSayFont RIGHT TRANSPARENT
endif
If you think any other changes would be useful generall for all, please advise us.
Re: XBROWSE - EDITSOURCE()
Posted:
Thu Dec 08, 2016 7:03 pm
by rterraz
Thank you very much Mr.Rao
Re: XBROWSE - EDITSOURCE()
Posted:
Wed Jan 03, 2018 4:24 pm
by Compuin
rterraz wrote:Hola
Estoy usando los metodos EditSource() y EditBrowse() del xbrowse y me resultan extremadamente utiles a la hora de editar registros de bases de
datos con muchos campos.
En algunos casos necesitaria hacer algunas pequeñas modificaciones en el dialogo que el método muestra por defecto (ej: cabeceras con dos lineas de texto que sólo muestran una linea por falta de espacio etc.).
He buscado el código fuente de las funciones en cuestión pero no lo puedo encontrar, alguien sabe donde encontrarlo o como modificar el Dlg ?
Desde ya gracias por la ayuda que puedan prestarme
Hola,
Tienes un ejemplo de un dialogo que hayas modificado de esta manera?
Gracias de antemano