topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xBrowse - Dates - FWH 2310 | Antonio,
The problem is no longer on my ARM machine.
However, my client says it is still on his Intel i7 Computer. That makes it even more complicated.
It is not that I missed to copy a file. It must be that some .dll on there wasn't current. However, those are fairly new installs ( within past 60 days ), and using all of the current install files, it also works on the ARM. So this is really tricky to solve.
Of course, we expect that with software .... and Windows
Tim |
xBrowse - Dates - FWH 2310 | Dear Tim,
> However, my client says it is still on his Intel i7 Computer
Is it an apple computer ?
If not, what Windows version is he using ? |
xBrowse - Dates - FWH 2310 | OK ... I HAVE ISOLATED THE PROBLEM.
Many of my clients, and some of my test machines, use Advantage Data Base Server. That is the root of this problem.
If I go to our DBFCDX RDD, absolutely no problem. If I turn on ADS LOCAL or REMOTE, using the ADS drivers ( all versions ), the problem described in the original post will occur.
I think I'll have to use a workaround to avoid this. I have many clients who use ADS Client Server, and paid a lot for the licenses. The product has not been updated since 2015, it is now end of life, and the company will not release it, nor do they provide an alternative. So there is no way to get any adjustment or fixes to that software, and we don't have a DBF supporting alternative.
I don't know if we can address this through a tDatabase update, or if it is more than that.
Tim |
xBrowse - Dates - FWH 2310 | If the problem is with ADS, let us now test dbfs with ADS.
Meanwhile please download the latest build of FWH again.
We will proceed testing dbfs + tdatabase using ADS.
We "have" to make the class working perfectly with ADS also.
I will do some tests tomorrow here. |
xBrowse - Dates - FWH 2310 | The files I have downloaded now are from 11/4 at about 11:30 am. Is there a more recent version ? |
xBrowse - Dates - FWH 2310 | Dear Tim,
Yes, please download FWH again |
xBrowse - Dates - FWH 2310 | I did.
Sent from my iPhone using Tapatalk |
xBrowse - Dates - FWH 2310 | Any progress on this.
Sent from my iPhone using Tapatalk |
xBrowse - Dates - FWH 2310 | Dear Tim,
Does this issue occurs using FWH 23.07 too ?
Could you provide a small PRG to test it ? |
xBrowse - Dates - FWH 2310 | Antonio,
Nages was specific that he wanted to look at tDatabase with ADS ... convinced that was where the problem was located. The posts have specific data.
No, I cannot provide a program to display it. At first it seemed to only happen on AMD, but then it didn't. Then it was consistent if the ADS RDD ( LOCAL and REMOTE ) were specified, and if I sent to the standard DBFCDX it did not occur. However as noted in the thread, there are many ADS installs. On the few cases where I specified ADS Local in the configuration, without ADS actually installed, changing it to the standard DBFCDX eliminated the problem. However, where Client Server ( ADS REMOTE ) was in use, it seems to have appeared.
I finally did the work around to appease my clients, but Nages felt we needed to be sure ADS was sending the info correctly to xBrowse, and that is what he was going to test. That is why I asked if he had made any progress.
At least for now, the pressure is off. And yes, although on distributions I never saw the problem using 2307, when I went back to test it again with that, it was appearing. It is so strange ....
Tim |
xBrowse - Dates - FWH 2310 | ok, thanks for the info
then lets wait for Mr. Rao advise |
xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO | Buen día,
Pues, eso del asunto. ¿Se puede desactivar la búsqueda incremental en el xBrowse?.
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO | Set oBrw:bSeek := nil |
xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO | Gracias por responder. Funciona OK.
Tenía un problema usando DBF con la clase TDataBase. Al hacer un APPEND BLANK, pongo el índice en "0" y envío el xbrowse al final para poder editar el registro agregado.
El problema se presenta luego de agregar el registro porque queda sin índice activo y da error.
Lo que hice fue modificar algo al final del METHOD KeyChar de la CLASS TXBrowse
Ej.
[code=fw:2yhoky7w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> KeyChar<span style="color: #000000;">(</span> nKey, nFlags <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />.....<br /><br /><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">If</span> nKey == VK_BACK .and. !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cSeek</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cSeek</span>, Len<span style="color: #000000;">(</span> ::<span style="color: #000000;">cSeek</span> <span style="color: #000000;">)</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> elseIf nKey > <span style="color: #000000;">31</span><br /><span style="color: #B900B9;">// ::Seek( ::cSeek + cKey )</span><br /> <span style="color: #00C800;">try</span> <span style="color: #B900B9;">//</span><br /> ::<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cSeek</span> + cKey <span style="color: #000000;">)</span> <span style="color: #B900B9;">// reforma by rolo 07092013</span><br /> catch <span style="color: #B900B9;">// si no hay orden (orden 0 en oDbf)</span><br /> end <span style="color: #B900B9;">// no da error al querer buscar</span><br /> <span style="color: #00C800;">Endif</span><br /> <span style="color: #00C800;">Endif</span><br /> <span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span></div>[/code:2yhoky7w]
Con esto evito que de error al no tener índice activo.
Saludos.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO | 1. After APPEND BLANK you do not have to change the index
2. Anyway what is the version of FWH you are using? |
xBrowse - Desactivar Búsqueda incremental - SOLUCIONADO | Hola,
He solucionado el problema corrigiendo mi código.
Mi manera de programar hace que al agregar un campo, el xBrowse lo muestre al final de la lista como puede verse en imagen que sigue.
[url=http://imageshack.us/photo/my-images/203/5vxt.jpg/:2050l8au][img:2050l8au]http://img203.imageshack.us/img203/2958/5vxt.jpg[/img:2050l8au][/url:2050l8au]
A esto sólo puedo implementarlo así:
[code=fw:2050l8au]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">redefine</span> buttonbmp oBtnAgregar ;<br /><span style="color: #0000ff;">id</span> <span style="color: #000000;">4004</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /><span style="color: #0000ff;">action</span> <span style="color: #000000;">(</span>nOrden:=indexord<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #ff0000;">".<span style="color: #000000;">\D</span>B<span style="color: #000000;">\S</span>ERVICE.CDX"</span><span style="color: #000000;">)</span>, oDbf:<span style="color: #000000;">append</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> , ;<br /> oBrw:<span style="color: #000000;">setfocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> , oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,; <br /> oRichService:<span style="color: #000000;">settext</span><span style="color: #000000;">(</span><span style="color: #ff0000;">""</span><span style="color: #000000;">)</span> , oRichService:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oBrw:<span style="color: #000000;">setfocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">GoLeftMost</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, __keyboard<span style="color: #000000;">(</span>chr<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,;<br /> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span>nOrden,<span style="color: #ff0000;">".<span style="color: #000000;">\D</span>B<span style="color: #000000;">\S</span>ERVICE.CDX"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>; <br /> <span style="color: #0000ff;">update</span> ;<br /> bitmap <span style="color: #ff0000;">"AGREGANDO"</span><br />oBtnAgregar:<span style="color: #000000;">cTooltip</span>:=<span style="color: #ff0000;">"Agregar Repuesto"</span><br />oBtnAgregar:<span style="color: #000000;">oCursor</span>:=oCur1</div>[/code:2050l8au]
Como Dije, cambié mi código y ahora funciona como esperaba. Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
[b:2050l8au][color=#0000BF:2050l8au][size=150:2050l8au]Translated by Google[/size:2050l8au][/color:2050l8au]:[/b:2050l8au]
Hello,
I solved the problem by editing my code.
My way of programming makes adding a field, the xBrowse show it to the bottom of the list as shown in image below.
[url=http://imageshack.us/photo/my-images/203/5vxt.jpg/:2050l8au][img:2050l8au]http://img203.imageshack.us/img203/2958/5vxt.jpg[/img:2050l8au][/url:2050l8au]
To this I can only implement it like this:
[code=fw:2050l8au]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">redefine</span> buttonbmp oBtnAgregar ;<br /><span style="color: #0000ff;">id</span> <span style="color: #000000;">4004</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /><span style="color: #0000ff;">action</span> <span style="color: #000000;">(</span>nOrden:=indexord<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #ff0000;">".<span style="color: #000000;">\D</span>B<span style="color: #000000;">\S</span>ERVICE.CDX"</span><span style="color: #000000;">)</span>, oDbf:<span style="color: #000000;">append</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> , ;<br /> oBrw:<span style="color: #000000;">setfocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> , oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,; <br /> oRichService:<span style="color: #000000;">settext</span><span style="color: #000000;">(</span><span style="color: #ff0000;">""</span><span style="color: #000000;">)</span> , oRichService:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oBrw:<span style="color: #000000;">setfocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">GoLeftMost</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, __keyboard<span style="color: #000000;">(</span>chr<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,;<br /> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span>nOrden,<span style="color: #ff0000;">".<span style="color: #000000;">\D</span>B<span style="color: #000000;">\S</span>ERVICE.CDX"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>; <br /> <span style="color: #0000ff;">update</span> ;<br /> bitmap <span style="color: #ff0000;">"AGREGANDO"</span><br />oBtnAgregar:<span style="color: #000000;">cTooltip</span>:=<span style="color: #ff0000;">"Agregar Repuesto"</span><br />oBtnAgregar:<span style="color: #000000;">oCursor</span>:=oCur1</div>[/code:2050l8au]
As I said, I changed my code and now works as expected. Thank you.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - EDIT_BROWSE | Hola Gene;
dos consulta al precio de una <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Se pude poner el boton en el centro de la columna?
Se puede, bajo cierta condición/es, que se muestre deshabilitado?
gracias |
xBrowse - EDIT_BROWSE | Disculpen... va la "fe de erratas"
Gene debia decir Gente
opcion de columna EDIT_BUTTON |
xBrowse - EDIT_BROWSE | Gente;
No se entienden las consultas o no se puede? |
xBrowse - Edit | Buenas noches,
¿Cómo hacer para pasar de una celda a otra celda y la siguiente en xbrowse ya se ha editado. ¿Es eso posible?
Gracias,
Junior |
xBrowse - Edit | Este es un ejemplo con una columna completa
oCol = oBrw:AddCol()
oCol:bStrData = { || Transform((cAlias)->HABER,"9,999,999,999.99") }
oCol:nDataStrAlign := 1
oCol:cHeader = "CREDITOS"
oCol:nEditType = EDIT_GET
oCol:lTotal := .t. //para totalizar cols a report y/o excel
oCol:bFooter = {|| TRANSFORM(nTotal2,"9,999,999,999.99") }
oCol:nFootStrAlign := 1
oCol:bEditWhen := {|| (cAlias)->Debe =0 }
oCol:bOnPostEdit = { | oCol, xVal, nKey | If( RecCount() == 0, ( DbAppend(), oBrw:Refresh() ),),;
If( nKey == VK_RETURN,;
if(lCtaOK(oBrw), ( nTotal2+=(Val(xVal)-(cAlias)->HABER), oCol:RefreshFooter(), (cAlias)->HABER := Val(xVal) ), oBrw:GoLeftMost()) ,) } |
xBrowse - Edit | Hola José Luis,
Gracias por la respuesta.
No funcionó como se esperaba. Lo que busco es la siguiente: Estoy en una celda publicada y presione "enter " para ir hacia abajo y la línea celular ya está publicada, sin tener que pulsar "enter"de nuevo.
gracias |
xBrowse - Edit | While editing,by default xBrowse cursor will jump to the next editable cell in the same row. If you have only one single editable cell in a row, then xBrowse will jump to the next editable cell in the next row.
You can also control the cursor movements by calling the following xbrowse built in methods
[code=fw:3or8mejv]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">SelectCol</span><span style="color: #000000;">(</span> nCol, lOffSet <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoLeft</span><span style="color: #000000;">(</span> lOffset, lRefresh <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoRight</span><span style="color: #000000;">(</span> lOffset, lRefresh <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoLeftMost</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoRightMost</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoUp</span><span style="color: #000000;">(</span> nLines <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoDown</span><span style="color: #000000;">(</span> nLines <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">PageUp</span><span style="color: #000000;">(</span> nLines <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">PageDown</span><span style="color: #000000;">(</span> nLines <span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:3or8mejv]
You may also try the FastEdit feature of xBrowse
[code=fw:3or8mejv]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">lFastEdit</span>:=.T.</div>[/code:3or8mejv]
Regards
[b:3or8mejv]Anser[/b:3or8mejv] |
xBrowse - Edit | thanks for the reply anserkk,
the leap to another cell occurs, but not the next cell gets edited, it is necessary to give another "ENTER" to stay.
After obrw: godown (), have experienced __KeyBoard (Chr (13)) and neither worked. lFastEdit cell changes but do not start editing.
thanks,
junior |
xBrowse - Edit | Amigo Prueba asi;
oBrw:aCols[1]:cHeader := 'Codigo'
oBrw:aCols[1]:cEditPicture := '!!!!!!!!!!!!!'
oBrw:aCols[1]:bClrEdit := oBrw:bClrStd
oBrw:aCols[1]:bOnPostEdit := { | oCol, xVal, nKey | If( nKey == VK_RETURN,"",),oBrw:GoRight(),oBrw:GoRight() }
oBrw:aCols[1]:nEditType := EDIT_GET_BUTTON
oBrw:aCols[1]:bEditValid := { | oGet, oCol | BuscarProd( oGet,oCol,oBrw,aDatos,oDlg1 ) }
oBrw:aCols[1]:bEditBlock := {|| LeerCodigo(oDlg1,oBrw,aDatos),oBrw:GoRight(),oBrw:GoRight() }
oBrw:aCols[1]:nDataStrAlign:= AL_LEFT
oBrw:aCols[1]:nHeadStrAlign:= AL_CENTER
oBrw:aCols[1]:bF2 := {|| LeerCodigo(oDlg1,oBrw,aDatos),oBrw:GoRight(),oBrw:GoRight() }
oBrw:aCols[1]:nWidth := 100
oBrw:aCols[1]:bLClickHeader:= {|r,c,f,o|LeerCodigo(oDlg1,oBrw,aDatos),oBrw:GoRight(),oBrw:GoRight() }
oBrw:aCols[1]:oHeaderFont := oFnt
*oBrw:aCols[1]:bEditWhen := { || IF(Len(aGuias)=0,.T.,.F.) }
oBrw:aCols[2]:cHeader := 'Description'
oBrw:aCols[2]:bClrEdit := oBrw:bClrStd
oBrw:aCols[2]:nWidth := 295
oBrw:aCols[2]:nHeadStrAlign:= AL_CENTER
oBrw:aCols[2]:oHeaderFont := oFnt
oBrw:aCols[3]:cHeader := 'Cantidad'
oBrw:aCols[3]:cEditPicture := '@k 9999.99'
oBrw:aCols[3]:bClrEdit := oBrw:bClrStd
oBrw:aCols[3]:bOnPostEdit := { | oCol, xVal, nKey | If( nKey == VK_RETURN, aDatos[ oBrw:nArrayAt,3] := xVal,),oBrw:GoRight() }
oBrw:aCols[3]:nEditType := EDIT_GET
oBrw:aCols[3]:bEditValid := { | oGet, oCol | Valida( oGet, oCol ) }
oBrw:aCols[3]:nDataStrAlign:= AL_RIGHT
oBrw:aCols[3]:nHeadStrAlign:= AL_CENTER
oBrw:aCols[3]:nWidth := 70
* oBrw:aCols[3]:bEditWhen := { || IF(Len(aGuias)=0,.T.,.F.) }
oBrw:aCols[3]:oHeaderFont := oFnt
Saludos |
xBrowse - Edit | gracias por contestar JBrita,
Creo que el problema se produce cuando ejecuto el comando oBrw:GoDown() porque se corre el CancelEdit () no permite la edición de la celda de abajo sin una nueva "ENTER".
Voy a hacer algunas pruebas. Pero gracias por la información.
Junior |
xBrowse - Editar celda por codigo | Estimados
Tengo un xbrowse con 2 celdas editables. He asignado :nMoveType:= MOVE_RIGHT
Lo que pretendo es que luego de validar lo ingresado en la celda 1, y luego de pasar a la celda 2, inmediatamente a su derecha, la edite sin necesidad de que el operador pusle <Intro/Enter>.
Lo que yo hice es:
[code=fw:12oxyvcg]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_Cantidad<span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>|o, nCant, nK| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nK != VK_ESCAPE, <span style="color: #000000;">(</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_CodArt<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_Cantidad<span style="color: #000000;">]</span>:= nCant, ::<span style="color: #000000;">Totaliza</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, msgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_PrcCom<span style="color: #000000;">]</span>, VK_RETURN <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_PrcCom<span style="color: #000000;">]</span><br /> :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Prc.Unit"</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>|o, nPrcUVta, nK| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nK != VK_ESCAPE, <span style="color: #000000;">(</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_CodArt<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_PrcVta<span style="color: #000000;">]</span>:= nPrcUVta, ::<span style="color: #000000;">Totaliza</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, msgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> </div>[/code:12oxyvcg]
Evidentemente no es lo que corresponde, ya que ejecuta ::Totaliza y este me da error por tener un campo nil en una multiplicación.
Se puede?, como?
gracias |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Estimados
Tengo un xbrowse con 2 celdas editables. He asignado :nMoveType:= MOVE_RIGHT
Lo que pretendo es que luego de validar lo ingresado en la celda 1, y luego de pasar a la celda 2, inmediatamente a su derecha, la edite sin necesidad de que el operador pusle <Intro/Enter>.
Lo que yo hice es:
[code=fw:12j6j0lc]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_Cantidad<span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>|o, nCant, nK| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nK != VK_ESCAPE, <span style="color: #000000;">(</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_CodArt<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_Cantidad<span style="color: #000000;">]</span>:= nCant, ::<span style="color: #000000;">Totaliza</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, msgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_PrcCom<span style="color: #000000;">]</span>, VK_RETURN <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>_PrcCom<span style="color: #000000;">]</span><br /> :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Prc.Unit"</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>|o, nPrcUVta, nK| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nK != VK_ESCAPE, <span style="color: #000000;">(</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_CodArt<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArtCompra</span><span style="color: #000000;">[</span>::<span style="color: #000000;">oBrwCom</span>:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_PrcVta<span style="color: #000000;">]</span>:= nPrcUVta, ::<span style="color: #000000;">Totaliza</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, msgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oBrwCom</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> </div>[/code:12j6j0lc]
Evidentemente no es lo que corresponde, ya que ejecuta ::Totaliza y este me da error por tener un campo nil en una multiplicación.
Se puede?, como?
gracias |
xBrowse - Editar celda por codigo (SOLUCIONADO) | <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> ... |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Mario
En mi opinion no estoy seguro que se pueda hacer que la celda de la derecha entre en edicion sin pulsar enter, calculo que porque lo estas llamando de otra celda y otro bOnPostEdit, intenté hacerlo pero no lo logro, probe agregando un oBrw:KeyChar( VK_RETURN ) al final del bOnPostEdit de la primer celda pero no hace lo que corresponde.
Saludos |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Alejandro;
Muchas gracias por ocuparte. A veces los clientes piden demasiado <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
xBrowse - Editar celda por codigo (SOLUCIONADO) | [quote:2hjoikbr]Lo que pretendo es que luego de validar lo ingresado en la celda 1, y luego de pasar a la celda 2, inmediatamente a su derecha, la edite sin necesidad de que el operador pusle <Intro/Enter>.
[/quote:2hjoikbr]
Hola Mario, mira si utilizando alguna de estas instrucciones se te coloca en modo edicion
oBrw:aCols[ n ]:Edit()
oBrw:SelectedCol():Edit()
Saludos. |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Francisco;
gracias por tu interés. Ninguna de las opciones edita el campo |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Mario
No se si será lo que buscas, pero para entrar en edición un campo sin pulsar enter el xbrowse trae FASTEDIT que hace la edición con solo escribir sobre él como si fuera una celda de excel.
Saludos y espero sea eso lo que buscas |
xBrowse - Editar celda por codigo (SOLUCIONADO) | Mr MarioG
I am not sure if I understood your requirement. But this sample of Invoice might give some hints on calculations in Xbrowse.
Please compile and run the program as it is
[code=fw:3bwe6vby]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Invoice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br /> <span style="color: #00C800;">local</span> aInvoice := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aPriceTable := <span style="color: #000000;">{</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">323</span>, <span style="color: #000000;">456</span>, <span style="color: #000000;">532</span>, <span style="color: #000000;">619</span>, <span style="color: #000000;">758</span>, <span style="color: #000000;">821</span>, <span style="color: #000000;">945</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aBlank := <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"INVOICE"</span> <span style="color: #0000ff;">FONT</span> oFont<br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> DATASOURCE aInvoice ;<br /> COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> ;<br /> HEADERS <span style="color: #ff0000;">"CODE"</span>, <span style="color: #ff0000;">"ITEM"</span>, <span style="color: #ff0000;">"QUANTITY"</span>, <span style="color: #ff0000;">"PRICE"</span> ;<br /> PICTURES <span style="color: #ff0000;">"9"</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"99999.999"</span>, <span style="color: #ff0000;">"999.99"</span> ;<br /> COLSIZES <span style="color: #00C800;">nil</span>, <span style="color: #000000;">120</span> ;<br /> CELL LINES FOOTERS NOBORDER FASTEDIT<br /><br /> oBrw:<span style="color: #000000;">Item</span>:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Code</span>:<span style="color: #000000;">Value</span> > <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Item Num "</span> + StrZero<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Code</span>:<span style="color: #000000;">Value</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oBrw:<span style="color: #000000;">AMOUNT</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">Quantity</span>:<span style="color: #000000;">Value</span> * oBrw:<span style="color: #000000;">Price</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">}</span><br /> oBrw:<span style="color: #000000;">Amount</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999,999,999.99"</span><br /> oBrw:<span style="color: #000000;">nEditTypes</span> := <span style="color: #000000;">{</span> EDIT_GET, EDIT_NONE, EDIT_GET, EDIT_GET, EDIT_NONE <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">Code</span><br /> :<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span> |oGet| oGet:<span style="color: #000000;">VarGet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> |oCol| oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> := aPriceTable<span style="color: #000000;">[</span> oCol:<span style="color: #000000;">Value</span> <span style="color: #000000;">]</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT oBrw:<span style="color: #000000;">Quantity</span><br /> :<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">{</span> || ! Empty<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Code</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Amount"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">RefreshFooters</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span> |oGet| oGet:<span style="color: #000000;">VarGet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> END<br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">Price</span><br /> :<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">{</span> || ! Empty<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Code</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span> .and. ! Empty<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Quantity</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Amount"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">RefreshFooters</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span> |oGet| oGet:<span style="color: #000000;">VarGet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> END<br /><br /> oBrw:<span style="color: #000000;">Amount</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_WIDEST<br /><br /> :<span style="color: #000000;">bPastEof</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Amount</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span>, ;<br /> <span style="color: #000000;">(</span> AAdd<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, AClone<span style="color: #000000;">(</span> aBlank <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">GoDown</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">GoLeftMost</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">nArrayAt</span> < Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span> .and. ;<br /> ATail<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> == <span style="color: #000000;">0</span>, ;<br /> <span style="color: #000000;">(</span> ASize<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .f. <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> <span style="color: #00C800;">if</span> ATail<span style="color: #000000;">(</span> aInvoice <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> == <span style="color: #000000;">0</span><br /> ASize<span style="color: #000000;">(</span> aInvoice, Len<span style="color: #000000;">(</span> aInvoice <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> xbrowser aInvoice <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Edited Invoice"</span> setup <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Code"</span>, <span style="color: #ff0000;">"Qty"</span>, <span style="color: #ff0000;">"Price"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3bwe6vby]
[url=http://img20.imageshack.us/i/h9n0.jpg/:3bwe6vby][img:3bwe6vby]http://img20.imageshack.us/img20/5246/h9n0.jpg[/img:3bwe6vby][/url:3bwe6vby] |
xBrowse - Editar celda por codigo (SOLUCIONADO) | [quote="Hector Pedro Lerda":3mcu1f2x]Mario
No se si será lo que buscas, pero para entrar en edición un campo sin pulsar enter el xbrowse trae FASTEDIT que hace la edición con solo escribir sobre él como si fuera una celda de excel.
Saludos y espero sea eso lo que buscas[/quote:3mcu1f2x]
Pedro;
Es lo que estaba buscando!
muchas gracias |
xBrowse - Editar celda por codigo (SOLUCIONADO) | [quote="nageswaragunupudi":2o974zpg]Mr MarioG
I am not sure if I understood your requirement. But this sample of Invoice might give some hints on calculations in Xbrowse.
[/quote:2o974zpg]
Mr. Rao, I'm very pleased with your sample; but is not my problem.
Mr. Lerda, given me the correct solution. I needed FASTEDIT!.
Mr. Rao, many thanks for your time and the sample
(sorry for my english, I use google trans.) |
xBrowse - Exportar a Excel | Hola, Antonio.
Al usar la función para exporta a excel que han incorporado a xBrowse hecho en falta un par de cosas:
1. Normalmente es necesario escribir un título antes de los datos, sin embargo por el método ToExcel sólo exporta los datos. Por este motivo he agregado al método ToExcel un parámetro ( aTitulos ) que me permite enviar los títulos de tabla que necesito. Aunque por ahora me las he arreglado con esto me parece que sería estupendo que FiveTechSoft lo incoporara para no tener que modificar la clase con cada actualización.
2. En el método ToExcel El bloque de código bProgress es evaluado sólo cuando no hay registros seleccionados en el xBrowse, luego entonces cuando se seleccionan sólo algunos registros el bloque de código bProgress no es evaluado por lo que no es posible mostrar el avance del proceso al usuario.
De ya, gracias.
Saludos,
Rod. |
xBrowse - Exportar a Excel | Gente;
Se puede exportar una lista bajo una condicion dada?. Por ejemplo entre fechas, como?
Saludos |
xBrowse - Exportar a Excel | Mario, yo genero un array o un file temporal
y lo pongo en un browse oculto y lo mando a xls
[code=fw:2hyoxsm2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgHide <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"UTILERIAS_009"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> oBrowHide := TxBrowse<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span>oDlgHide<span style="color: #000000;">)</span><br /> oBrowHide:<span style="color: #000000;">cAlias</span> := cFile<br /> oBrowHide:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgHide <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>oDlgHide:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oBrowHide:<span style="color: #000000;">toexcel</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">NOWAIT</span><br /><br /> </div>[/code:2hyoxsm2] |
xBrowse - Exportar a Excel | buena sugerencia, muchas gracias |
xBrowse - Exportar a Excel | [quote="MarioG":2zfautnn]Gente;
Se puede exportar una lista bajo una condicion dada?. Por ejemplo entre fechas, como?
Saludos[/quote:2zfautnn]
oBrw:Report( nil, nil, nil, { |oRep| oRep:bFor := { || <forcondition> } } ) |
xBrowse - Exportar a Excel | muchas gracias Rao |
xBrowse - Fila Seleccionada | Estimados:
En un browse, luego de agregar un registro el repintado me queda segun se muestra en la figura
[img:16chgz10]http://img502.imageshack.us/img502/9946/screen1yya.jpg[/img:16chgz10]
Como se ve, en la última fila esta el último agregado y el cursor aparece punteado. En color queda el cursor donde estaba el puntero anters de abrir el Dlg Agregar
La preguna es:
Como hago para q el cursor pintado coincida con el punteado, que obviamente, es lo que debería quedar señalizado
muchas gracias |
xBrowse - Fila Seleccionada | Mario,
tente:
oBrw:nMarqueeStyle := 5 |
xBrowse - Fila Seleccionada | SGS, muchas gracias
Es lo que buscaba.
Y cual es la diferencia entre MARQSTYLE_HIGHLROW y MARQSTYLE_HIGHLROWMS, aparte de lo que visualmente se observa; o para que caso se usaría MARQSTYLE_HIGHLROWMS |
xBrowse - Fila Seleccionada | Mario, sugiro testar cada um para ver as diferenças:
#define MARQSTYLE_NOMARQUEE 0
#define MARQSTYLE_DOTEDCELL 1
#define MARQSTYLE_SOLIDCELL 2
#define MARQSTYLE_HIGHLCELL 3
#define MARQSTYLE_HIGHLROWRC 4
#define MARQSTYLE_HIGHLROW 5
#define MARQSTYLE_HIGHLROWMS 6
#define MARQSTYLE_HIGHLWIN7 7 |
xBrowse - Fila Seleccionada | OK, muchas gracias |
xBrowse - Fila Seleccionada | [quote="MarioG":1vtx1bnw]SGS, muchas gracias
Es lo que buscaba.
Y cual es la diferencia entre MARQSTYLE_HIGHLROW y MARQSTYLE_HIGHLROWMS, aparte de lo que visualmente se observa; o para que caso se usaría MARQSTYLE_HIGHLROWMS[/quote:1vtx1bnw]
MARQSTYLE_HIGHLROWMS es para selecciones multiples... |
xBrowse - Fila Seleccionada | José; muchas gracias.
En realidad mi concepto de Checbox estaba mal encaminado. Lo que necesitaba es la multiselección; aunque tampoco encontre en los samples como recupear lo que selecciono (aun me queda mucho por aprender de xBrowse <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. Asi es que encontré y puse en práctica la sugerencia de Manuel Aranda: [url:1wbwi7tp]http://forums.fivetechsupport.com/viewtopic.php?t=11187[/url:1wbwi7tp]
Saludos |
xBrowse - Fila Seleccionada | [quote="MarioG":2yzjdxtz]José; muchas gracias.
En realidad mi concepto de Checbox estaba mal encaminado. Lo que necesitaba es la multiselección; aunque tampoco encontre en los samples como recupear lo que selecciono (aun me queda mucho por aprender de xBrowse <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. Asi es que encontré y puse en práctica la sugerencia de Manuel Aranda: [url:2yzjdxtz]http://forums.fivetechsupport.com/viewtopic.php?t=11187[/url:2yzjdxtz]
Saludos[/quote:2yzjdxtz]
Si lo deseas puede enviarte un ejemplo de como usar xbrow con multi select que me ayuydo Daniel, es muy sencillo, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse - Fila Seleccionada | José Luis,
Te lo voy a agradecer, obviamente que mientras mas aprenda de xBrowse, mas me voy a fortalecer en su uso.
Saludos |
xBrowse - Fila Seleccionada | Enviado a tu correo desde mi hotmail, avisas cualquier cosa, gracias... |
xBrowse - Fila Seleccionada | José Luis;
Muchas gracias. Como bien escribiste es muy sencillo... hay muchas cosas realmente sencillas en xBrowse, sin dudas un gran trabajo,... solo que hay que encontrarlas <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Por ello y ante todo: GRANDE ESTE FORO! |
xBrowse - Fila Seleccionada | Hola
Podrias incluir el ejemplo en el foro
desde ya gracias |
xBrowse - Fila Seleccionada | Patricio;
Lo de selección múltiple no lo implementé, porque como dije mas arriba, use una metodología similar, donde al seleccionar mediante la barra espaciadora, la fila cambia de color y muestra un icono de tipo tilde.
Si te refieres a como usar la multiselección los pasos serían:
Declarar en el xBrowse:
oBrw:nMarqueeStyle:= MARQSTYLE_HIGHLROWMS // MultiSelección
luego de hecha la selección y, por ej., mediante un boton de acceso a otra rutina, procesamos lo seleccionado
[code=fw:3qdamqr1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> LEN<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">)</span><br /> nRecNo:= oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">[</span>N<span style="color: #000000;">]</span><br /> <span style="color: #B900B9;">//... Tu rutina</span><br /><span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #B900B9;">//o tambien, ;</span><br /><span style="color: #00C800;">FOR</span> EACH nRecno IN oBrw:<span style="color: #000000;">aSelected</span><br /> xx-><span style="color: #000000;">(</span> DbGoTo<span style="color: #000000;">(</span> nRecNo <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//... Tu rutina</span><br /><span style="color: #00C800;">NEXT</span><br /> </div>[/code:3qdamqr1] |
xBrowse - Font en Fila Seleccionada | Gente:
Asi como puedo dar color a la Barra de selección (bClrSelFocus), puedo indicarle un Font, como?
gracias |
xBrowse - Font en Fila Seleccionada | Mario
prueba asi:
DEFINE FONT oFontA NAME "TAHOMA" SIZE 0,-12
DEFINE FONT oFontB NAME "TAHOMA" SIZE 0,-12 BOLD
AEval( oBrw:aCols, { |o| o:oDataFont := oFontA, o:oHeaderFont := oFontB } )
saludos
paco |
xBrowse - Font en Fila Seleccionada | Paco, gracias por responder
No es lo que necesito. Me refiero a la barra de señalización o, puntero
Con wBrowse hice lo que muestro en la imagen
[img:48p3axry]http://img42.imageshack.us/img42/9923/wbrw.jpg[/img:48p3axry]
Ahora pretendo hacerlo en xBrowse y, en principio, con el mismo font para toda la barra |
xBrowse - Font en Fila Seleccionada | Mario,
ya habia una solucion en el foro, yo la tengo funcionando es asi:
LOCAL nPosActual
WITH OBJECT oBrw2
<!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->DataFonts := { || If( oBrw2:BookMark == nPosActual, oApp:fBold, oApp:fNormal ) }
:bChange := { || nPosActual := oBrw2:BookMark, oBrw2:Refresh() }
END
nPosActual := oBrw2:BookMark
oBrw2:CreateFromResource(300)
salu2
paco |
xBrowse - Font en Fila Seleccionada | Muchas gracias Paco, lo probaré |
xBrowse - Footer (SOLUCIONADO) | Carlos;
muchisimas gracias por tu tiempo. (ratifica la grandeza de este foro!)
Me diste la solución (ya que estaba mas que mareado con esto), sin necesidad de implementar tu código
[code=fw:17qbu51k]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT ::<span style="color: #000000;">oLstDeuda</span><br /> ...<br /> <br /> :<span style="color: #000000;">lFooter</span> = <span style="color: #00C800;">TRUE</span><br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>:= -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> :<span style="color: #000000;">bGotFocus</span>:= <span style="color: #000000;">{</span>|| h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabVentas"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /><br /> ....<br /><br /> WITH OBJECT ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span><br /> :<span style="color: #000000;">nHeadStrAlign</span>:= :<span style="color: #000000;">nDataStrAlign</span>:= AL_RIGHT<br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">85</span><br /> :<span style="color: #000000;">nFooterType</span> := AGGR_TOTAL<br /> :<span style="color: #000000;">cEditPicture</span>:= PIC_OCHOCIF1<br /> :<span style="color: #000000;">bClrFooter</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span>CLR_HRED, CLR_BLACK<span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oFooterFont</span> := ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Tahoma14B"</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"(999,999.99)"</span> <span style="color: #B900B9;">// tan sencillo como esto</span><br /> END<br /><br /> </div>[/code:17qbu51k] |
xBrowse - Footer (SOLUCIONADO) | Estimados;
Tengo el siguiente footer:
[img:2d7lxu5f]http://imageshack.com/scaled/medium/401/mrbl.jpg[/img:2d7lxu5f]
El problema es el siguiente: La columna Monto (en rojo) tiene valores positivos en la BD.
Lo que necesito es mostrarla en negativo y usando el picture "@( 99,999.99"
Alguna pista?
gracias |
xBrowse - Footer (SOLUCIONADO) | Va algo al vuelo: Si solo necsitas que el valor representado sea negativo multiplica (nValor * -1) para mostrarlo en negativo en el folder..
Si necesitas algo más elaborado comentanos y te apoyaremos..
Saludos. |
xBrowse - Footer (SOLUCIONADO) | Victor; gracias pr responder
No escribí bien la pregunta
El valor, que llamas nValor, sería el resultado :MakeTotals().
Yo probé, sobre la columna en custión, haciendo:
[code=fw:3ng194dk]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">bFooter</span>:= <span style="color: #000000;">{</span>|| Trans<span style="color: #000000;">(</span> -Val<span style="color: #000000;">(</span> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Cobrado</span>:<span style="color: #000000;">cFooter</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:3ng194dk]
y me devuelve 0.
O sea la consulta sería: como obtengo el valor de dicha columna? |
xBrowse - Footer (SOLUCIONADO) | [quote="MarioG":1cw0hrgd]Victor; gracias pr responder
No escribí bien la pregunta
El valor, que llamas nValor, sería el resultado :MakeTotals().
Yo probé, sobre la columna en custión, haciendo:
[code=fw:1cw0hrgd]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">bFooter</span>:= <span style="color: #000000;">{</span>|| Trans<span style="color: #000000;">(</span> -Val<span style="color: #000000;">(</span> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Cobrado</span>:<span style="color: #000000;">cFooter</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:1cw0hrgd]
y me devuelve 0.
O sea la consulta sería: como obtengo el valor de dicha columna?[/quote:1cw0hrgd]
Mario, si entiendo bien lo que quieres, nMonto de la columna cuando defines maketotal mantiene ese valor, yo lo uso cuando en una columna hay diferentes valores y quiero que maketotal sea condicionado dependiendo del valor de la celda...nose si es lo que quieres, una imagen habla mas que mil palabras, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse - Footer (SOLUCIONADO) | José Luis;
lo que quiero es, saber el valor (para el ejemplo 173,81). Como lo obtengo??. |
xBrowse - Footer (SOLUCIONADO) | Mario
Creo que para cada objeto columna hay dos datas :nTotal y :nTotalSq, quizás puedas verlo ahí. |
xBrowse - Footer (SOLUCIONADO) | [quote="MarioG":1nwj4iym]José Luis;
lo que quiero es, saber el valor (para el ejemplo 173,81). Como lo obtengo??.[/quote:1nwj4iym]
Yo lo obtengo asi:
oBrw:MakeTotals()
oBrw:Refresh()
nTotalCol := oBrw:Monto:nTotal
nTotalCol recibe el valor
oBrw:Monto es la columna donde usas el maketotal,, puede ser el header de la columna o el numero, ejemplo aCol[n]
nTotal contiene el valor resultante de maketotal
espero sea lo que necesitas, saludos... |
xBrowse - Footer (SOLUCIONADO) | Cristobal, gracias
Efectivamente :nTotal devuelve el valor.
Pero solo estoy mas cerca... <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
Hago lo siguiente, y me sigue mostrando el valor como positivo. Supongo que es porque el evento ocurre despues de lo que yo hago
[code=fw:2pucivmt]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT ::<span style="color: #000000;">oLstDeuda</span><br /> ...<br /> :<span style="color: #000000;">lFooter</span> = <span style="color: #00C800;">TRUE</span><br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> :<span style="color: #000000;">bGotFocus</span>:= <span style="color: #000000;">{</span>|| h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabVentas"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> </div>[/code:2pucivmt] |
xBrowse - Footer (SOLUCIONADO) | Jose Luis, gracias
Eso es lo que necesitaba!. Como bien lo apunto tambien Cristobal
Aunque como leerás, aun no tengo lo que quiero... |
xBrowse - Footer (SOLUCIONADO) | Si quieres obtener el valor en negativo, solo debes multiplicar el resultado por menos uno (-1), como te dijo el colega al principio, saludos... |
xBrowse - Footer (SOLUCIONADO) | Pues mi máquina no sabe multiplicar <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Lo haga asi:
[code=fw:293igqxo]<div class="fw" id="{CB}" style="font-family: monospace;"> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:293igqxo]
o así:
[code=fw:293igqxo]<div class="fw" id="{CB}" style="font-family: monospace;"> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> <span style="color: #000000;">(</span><span style="color: #000000;">-1</span>*::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:293igqxo]
y muestra como en la primer imagen que envie |
xBrowse - Footer (SOLUCIONADO) | Mario, intenta asi:
[code=fw:1m39f804]<div class="fw" id="{CB}" style="font-family: monospace;"> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:1m39f804]
Saludos. |
xBrowse - Footer (SOLUCIONADO) | Francisco;
::oLstDeuda:RefreshFooter(), me da error de metodo no valido
pero, asi refresca... aunque el valor lo sigue mostrando como positivo <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
[code=fw:3s6ianjf]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:3s6ianjf]
me parece que despues del bChange, hace algo, por eso toma el valor original |
xBrowse - Footer (SOLUCIONADO) | Mario, lo que yo hago no lo hago en la columna, sino afuera en una funcion, en la columna puedes colocar nTotal == tu_function() y en tu_funcion haces el calculo que quieras o coloca el -1 entre parentesis, es decir asi (-1) * tu_valor. En que quieres usar el valor de nTotal, en otra celda o para otra operacion que veo que usas en on change..? saludos...
Prueba asi
Trans( ( [b:3j5n5lel](-1)[/b:3j5n5lel] * ::oLstDeuda:Monto:nTotal), "@E( 99,999.99" ) |
xBrowse - Footer (SOLUCIONADO) | extendamos un poco xbrowse agregando una data cFooterPicture a la clase txbrwcolumn
y modifiquemos el metodo FooterStr a la clase txbrwcolumn
y ya tenemos un picture definible para cada footer.
probado con harbour y xharbour
ejemplo de uso
[code=fw:1dyz0h6v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">03</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">"Total C$:"</span><br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">06</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cFooterPicture</span> := <span style="color: #ff0000;">"(999,999.99)"</span> <span style="color: #B900B9;">//ejemplo</span><br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">06</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> END<br /> </div>[/code:1dyz0h6v]
[code=fw:1dyz0h6v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> EXTEND <span style="color: #00C800;">CLASS</span> TXBRWCOLUMN WITH <span style="color: #00C800;">DATA</span> cFooterPicture<br /> OVERRIDE <span style="color: #00C800;">METHOD</span> FooterStr IN <span style="color: #00C800;">CLASS</span> TXBRWCOLUMN WITH KFooterStr<br /> </div>[/code:1dyz0h6v]
[code=fw:1dyz0h6v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> KFooterStr<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> <span style="color: #00C800;">Self</span> := HB_QSelf<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cFooter := <span style="color: #ff0000;">""</span>, cType<br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bFooter</span> != <span style="color: #00C800;">nil</span><br /> cFooter := Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bFooter</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DEFAULT</span> cFooter := <span style="color: #ff0000;">""</span><br /> elseif ::<span style="color: #000000;">nTotal</span> != <span style="color: #00C800;">nil</span> .or. ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">nFooterType</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">nFooterType</span> := AGGR_SUM, ::<span style="color: #000000;">nTotal</span> := <span style="color: #000000;">0.0</span><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nFooterType</span> >= AGGR_STD<br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nCount</span> > <span style="color: #000000;">0</span><br /> cFooter := ::<span style="color: #000000;">nTotalSq</span> - <span style="color: #000000;">(</span> ::<span style="color: #000000;">nTotal</span> * ::<span style="color: #000000;">nTotal</span> / ::<span style="color: #000000;">nCount</span> <span style="color: #000000;">)</span><br /> cFooter /= ::<span style="color: #000000;">nCount</span> - <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nFooterType</span> == AGGR_STDEVP, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> cFooter ^= <span style="color: #000000;">0.5</span><br /> <span style="color: #00C800;">else</span><br /> cFooter := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">endif</span><br /> elseif ::<span style="color: #000000;">nFooterType</span> == AGGR_AVG<br /> cFooter := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nCount</span> > <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nTotal</span> / ::<span style="color: #000000;">nCount</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> elseif ::<span style="color: #000000;">nFooterType</span> == AGGR_COUNT<br /> cFooter := ::<span style="color: #000000;">nCount</span><br /> <span style="color: #00C800;">else</span><br /> cFooter := ::<span style="color: #000000;">nTotal</span><br /> <span style="color: #00C800;">endif</span><br /> elseif ::<span style="color: #000000;">cFooter</span> != <span style="color: #00C800;">nil</span><br /> cFooter := ::<span style="color: #000000;">cFooter</span><br /> <span style="color: #00C800;">endif</span><br /><br /> cType := ValType<span style="color: #000000;">(</span> cFooter <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> cType != <span style="color: #ff0000;">'C'</span><br /> <span style="color: #00C800;">if</span> cType == ::<span style="color: #000000;">cDataType</span> .and. ::<span style="color: #000000;">cEditPicture</span> != <span style="color: #00C800;">nil</span><br /> cFooter := cValToStr<span style="color: #000000;">(</span> cFooter, IIf<span style="color: #000000;">(</span> ::<span style="color: #000000;">cFooterPicture</span>==<span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">cEditPicture</span>, ::<span style="color: #000000;">cFooterPicture</span> <span style="color: #000000;">)</span>,, ;<br /> IfNil<span style="color: #000000;">(</span> ::<span style="color: #000000;">lDisplayZeros</span>, ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lDisplayZeros</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> cFooter := cValToChar<span style="color: #000000;">(</span> cFooter <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cFooter<br /> </div>[/code:1dyz0h6v] |
xBrowse - Footer (SOLUCIONADO) | hola. podrias decirme como tenes definido el STYLE del xbrowse? porque necesito que sea sin el borde que me da y veo que vos lo tenes como lo necesito.
gracias. |
xBrowse - Footer (SOLUCIONADO) | Hola
Al vuelo, si lo que quieres es siempre que salga negativo, has probado colocar el signo negativo antes?
[code=fw:3pchcznr]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= Trans<span style="color: #000000;">(</span> -::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span><br /><br />::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">cFooter</span>:= <span style="color: #ff0000;">"(-)"</span>+Trans<span style="color: #000000;">(</span> ::<span style="color: #000000;">oLstDeuda</span>:<span style="color: #000000;">Monto</span>:<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">"@E( 99,999.99"</span> <span style="color: #000000;">)</span></div>[/code:3pchcznr] |
xBrowse - Footer (SOLUCIONADO) | Goos;
como te comente en otro post, estoy medio atrasado <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->, uso Workshop
Editando el .rc te trasncribo como está definido el STYLE, del recurso en el dlg que expongo en este post
[code=fw:12z40o8r]<div class="fw" id="{CB}" style="font-family: monospace;">CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">305</span>, <span style="color: #ff0000;">"TXBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, <span style="color: #000000;">6</span>, <span style="color: #000000;">34</span>, <span style="color: #000000;">283</span>, <span style="color: #000000;">181</span></div>[/code:12z40o8r]
En código, use para este caso:
[code=fw:12z40o8r]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT ::<span style="color: #000000;">oLstCobros</span><br /> :<span style="color: #000000;">l2007</span> := <span style="color: #00C800;">TRUE</span><br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_NOMARQUEE <span style="color: #B900B9;">// linea señaladora</span><br /> :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY <span style="color: #B900B9;">// Linea Tipo</span><br /> :<span style="color: #000000;">lHScroll</span> := <span style="color: #00C800;">FALSE</span><br /><br /> :<span style="color: #000000;">lFooter</span> = <span style="color: #00C800;">TRUE</span><br /> ...<br /> END<br /> </div>[/code:12z40o8r]
saludos |
xBrowse - Headers are not painted | Hi all,
in an empty xBrowse-object (that means, the data did not meet the scope condition and no data lines are shown) the header is not painted or it´s hidden.
Only if i leftclick on the header, i can see it.
What can i do to get all headers always visible ?
kind regards
Stefan |
xBrowse - Headers are not painted | Nobody who noticed this behavior ? |
xBrowse - Headers are not painted | Yes, I noticed it in little samples but it doesn't seem to be easely reproduceable.
EMG |
xBrowse - Headers are not painted | Enrico,
I can reproduce it all the time, every time the datalines are empty. I have searched in the class, but i did not find anything what stops the painting of the header.
I will try to build a little sample
Stefan |
xBrowse - Headers are not painted | Stefan,
In Class TXBrowse Method Paint() comment out this line and please try it again:
[code:1m35x3m7]
if ::nLen == 0
// ::EraseData( nFirstRow )
return nil
endif
[/code:1m35x3m7] |
xBrowse - Headers are not painted | Antonio, please note that I saw the problem in some situations also when records were present.
EMG |
xBrowse - Headers are not painted | Enrico,
That may be another problem. In this case is when there are no records to show |
xBrowse - Headers are not painted | Ok.
EMG |
xBrowse - Headers are not painted | Antonio,
if i only comment out ::EraseData (...), it´s not working, but if i comment out return nil, than it´s working as exspected, all headers are shown.
[code:1g16w73o]if ::nLen == 0
// ::EraseData( nFirstRow )
// return nil
endif [/code:1g16w73o]
But i don´t know, if this has side effects in other situations.
many thanks
kind regards
Stefan |
xBrowse - Headers are not painted | Stefan,
It looks ok. Lets change it this way:
[code:3ryvw2zk]
/* To paint headers when there are no records to show
if ::nLen == 0
::EraseData( nFirstRow )
return nil
endif
*/
[/code:3ryvw2zk] |
xBrowse - Headers are not painted | I think it should be like this:
[code:190effpy]
if ::nLen == 0
::EraseData( nFirstRow )
::DispEnd( aInfo ) // gs
return nil
endif
[/code:190effpy]
In this way it don't paint an empty row.
Let me know if it works
Regards
Gianni |
xBrowse - Headers are not painted | Gianni,
Yes, you are right. many thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse - Imagem + Texto na mesma célula (solucionado) | Amigos,
é possível utilizar no xBrowse:
Imagem
+
Texto
juntos na mesma célula do xbrowse? |
xBrowse - Imagem + Texto na mesma célula (solucionado) | Claro que es posible, fijate en samples xbrimag3.prg
Saludos |
xBrowse - Imagem + Texto na mesma célula (solucionado) | Gracias Horacio. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
xBrowse - Jump to a specific column | I have an xbrowse that begins by displaying column 1 (as normal).
There are over 1000 fields in a particular database.
Users can specify which column they wish to see (column 500 for example) without scrolling to the right looking for certain values.
Question --
What is the best way to "move" my browse display from column 1 to column 500 so that my users can now view the data in column 500?
I've tried to modify the obrw:ncolsel variable, but, upon a paint() command the internals of the browse are reset 1 - the previous ncolsel value.
What I'm trying to avoid the slowness of "GoRight" 499 times, if possible.
is there a method available that will "GoToColumn( nCol )" or something like that? |
xBrowse - Jump to a specific column | Hi Don
oLbx:SelectCol(10)
oLbx:Refresh()
Hope that is what you meant.
Cheers
Colin |
xBrowse - Jump to a specific column | yes - thank you. |
xBrowse - LDblClicked ?? | Hi all,
I try to test left click of the mouse, the program did not display dialog browse and the program is close. why...?
oBrw:LDblClicked := {|| txtKode := oResAcct:Fields("kode"):Value, oDlg:end() }
if i use Enter key with bKeyDown methode, the result is Oke..
sameone can help me..?
Mulyadi. |
xBrowse - LDblClicked ?? | Hi, Maybe this way?:
oBrw[b:27y607k0]:bLDblClick[/b:27y607k0] := {|| txtKode := oResAcct:Fields("kode"):Value, oDlg:end() }
Best regards |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.