topic
stringlengths
1
63
text
stringlengths
1
577k
Browse edit of cell with brush
Looks like if I put [code=fw:eatfl8zs]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">lFullPaint</span> := .T.</div>[/code:eatfl8zs] resolves the issue
Browse edit of cell with brush
[quote="AntoninoP":56rzi0uf]Looks like if I put [code=fw:56rzi0uf]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">lFullPaint</span> := .T.</div>[/code:56rzi0uf] resolves the issue[/quote:56rzi0uf] Asi? [code=fw:56rzi0uf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\ANTONINO.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_EDITED RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">240</span>,<span style="color: #000000;">64</span>,<span style="color: #000000;">64</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oBrw<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, n, oBrush<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; aAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Product "</span> + hb_ntoc<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0.0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">STYLE</span> <span style="color: #000000;">2015</span> DATASOURCE aData ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> HEADERS <span style="color: #ff0000;">"Desc"</span>, <span style="color: #ff0000;">"Qta"</span><br /><br />&nbsp; &nbsp;WITH object oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lFastEdit</span> := .T.<br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;WITH object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> := EDIT_GET<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999999.99"</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAutoSave</span> := .T.<br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oBrush</span> := <span style="color: #000000;">&#123;</span>|| iif<span style="color: #000000;">&#40;</span> empty<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, oBrush, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> &nbsp;iif<span style="color: #000000;">&#40;</span> empty<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, CLR_BLACK, CLR_EDITED <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CLR_WHITE <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;end<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">lFullPaint</span> := .T.<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:56rzi0uf] Gracias, thanks. Regards, saludos.
Browse edit of cell with brush
[quote:238rlbci]On my program I have a XBrowse with fast edit and brush. My problem is when I edit last visible row and go down to end the edit the scrolling does not update well:[/quote:238rlbci] Here is the real bug. This has nothing to do with colors or brushes. Bug: When the user edits a cell in the last row and then exits the Get by pressing Enter key or UpArrowKey, there is no problem at all and everything works correctly as expected. But if the user exits the Get by pressing Down Arrow key, the changes are written to the array (or other datasource) but the change is not updated in the browse. What exactly happening is that the browse is scrolled up without repainting the last row. This bug remains even till today. We will work on suitable fix and get back. Till then, please depend on oBrw:lFullPaint := .t., though this slows down the browse painting
Browse edit of cell with brush
[quote:eygb1j5b]using 18.01 my PC create an executable of 3.686.400 bytes for this sample, how big is with new version? (the size is main reason why we don't update so long) [/quote:eygb1j5b] 4.8 MB
Browse edit of cell with brush
[quote="nageswaragunupudi":3autfqr0] This bug remains even till today. We will work on suitable fix and get back. Till then, please depend on oBrw:lFullRefresh := .t., though this slows down the browse painting[/quote:3autfqr0] Mr. Rao, [quote:3autfqr0] oBrw:lFullRefresh := .t. // I do not know this DATA [/quote:3autfqr0] or [quote:3autfqr0] oBrw:lFullPaint := .t. [/quote:3autfqr0] Thanks
Browse edit of cell with brush
Extremely sorry. lFullPaint is the correct name. I edited and corrected this mistake Thanks
Browse no muestra registros (SOLUCIONADO)
Estimados Estoy trabajando con 2 PRG, uno MAIN donde coloco el siguiente codigo #include "Fivewin.ch" FUNCTION MAIN() LOCAL oBar, oBtn Set DATE TO FRENCH SET CENTURY ON Set EPOCH TO 2000 SET DELETED OFF SET _3DLOOK ON REQUEST DBFCDX RddSetDefault("DBFCDX") Y en el otro trato de abrir una ventana con un Browse pero este no trae los registros de la DBF #include "fivewin.ch" #include "xbrowse.ch" MEMVAR oWndPrinc STATIC CODBCO, NOMBCO, CTABCO, CTACTA, GRA, NREG, oDlg, oBrw, oCol, cCODANT, oRpt STATIC TNUEVO := .T. STATIC LVAN := .F. FUNCTION BANCOS() LOCAL oWndBCO, cTitle, oFont, oBar, oMeter, oText, cAlias, oBrw LOCAL UBI:= "DATA\" LOCAL cVIA := "DBFCDX" IF SELECT("BANCO")>0 BANCO->(DBCLOSEAREA()) ENDIF IF SELECT("BANCO")=0 DBUSEAREA(.T.,cVia,UBI+"BANCO","BANCO",.T.) ENDIF BANCO->(ORDSETFOCUS(1)) DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc ; oBrw := TXBrowse():New( oWndBCO ) oBrw:cAlias := cAlias oBrw:SetRDD() oBrw:CreateFromCode() oWndBCO:SetControl(oBrw) ACTIVATE WINDOW oWndBCO ; ON INIT oBrw:SetFocus() Ambos cargan bien, el problema es que no me muestra nungun registro del DBF y este tiene cargado varios alli. Agradezco cualquier aporte
Browse no muestra registros (SOLUCIONADO)
Hola, la variable cAlias trae valor NIL. Intenta asi: IF SELECT("BANCO")=0 DBUSEAREA(.T.,cVia,UBI+"BANCO","BANCO",.T.) [color=#00BF00:lo3uvrx1]cAlias:=Alias()[/color:lo3uvrx1] ENDIF
Browse no muestra registros (SOLUCIONADO)
Fracisco, No funciono. Siguen sin aparecer los registros
Browse no muestra registros (SOLUCIONADO)
Parece que te falta establecer los indices, porque cerraste y re-abriste la dbf BANCO: [color=#BF0040:1h83z08n]IF SELECT("BANCO")=0 DBUSEAREA(.T.,cVia,UBI+"BANCO","BANCO",.T.) DBSETINDEX(cIndice1........) ; DBSETINDEX(cIndice2........) ENDIF cAlias:=Alias() [/color:1h83z08n] BANCO->(ORDSETFOCUS(1))
Browse no muestra registros (SOLUCIONADO)
Agregando indices o no, igual no muestra los registros de la DBF
Browse no muestra registros (SOLUCIONADO)
¿Ya intentaste poner en el ON INIT (oBrw:cAlias)->(dbgotop()), oBrw:Refresh() ? Fijate que el cAlias:=Alias() lo saqué del If..endif
Browse no muestra registros (SOLUCIONADO)
Tampoco hizo nada amigo
Browse no muestra registros (SOLUCIONADO)
Hola, te hice este ejemplo, basado en tu codigo, y funciona (probado) (compilado con FWH712) #include "fivewin.ch" #include "xbrowse.ch" MEMVAR oWndPrinc //------------------ FUNCTION MAIN() DEFINE WINDOW oWndPrinc MDI ACTIVATE WINDOW oWndPrinc ; ON INIT BANCOS() oWndPrinc:End() RETURN NIL //-------------------------- FUNCTION BANCOS() LOCAL oWndBCO, cAlias, oBrw LOCAL UBI:= "C:\DATA\" LOCAL cVia:="DBFNTX" IF SELECT("BANCO")>0 BANCO->(DBCLOSEAREA()) ENDIF IF SELECT("BANCO")=0 DBUSEAREA(.T.,cVia,UBI+"BANCO","BANCO",.T.) ENDIF cAlias:=Alias() DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc oBrw := TXBrowse():New( oWndBCO ) oBrw:cAlias := cAlias oBrw:SetRDD() oBrw:CreateFromCode() oWndBCO:SetControl(oBrw) ACTIVATE WINDOW oWndBCO ; ON INIT oBrw:SetFocus() RETURN NIL Saludos
Browse no muestra registros (SOLUCIONADO)
Funciona chevere en un solo PRG. De hecho tengo un programa asi. El problema se me esta presentando al tener 2 PRG (Main y Banco, en este ultimo es donde esta el browse) Trata de hacer el ejemplo que me enviastes en 2 prg a ver si tienes el mismo comportamiento que a mi
Browse no muestra registros (SOLUCIONADO)
Compuin: Puedes hacerlo en 2 prgs. (dos ficheros de texto) Ejemplo: Los DEFINE y la funcion Main() incluyelos en el primer fichero y le agregas al final: (despues del return) #INCLUDE "Miprg2.prg" La Funcion Bancos la incluyes en otro fichero, en este caso MiPrg2, compilas y listo. A cada fichero le das el nombre que quieras. Saludos
Browse no muestra registros (SOLUCIONADO)
Eso ya lo hice, y desde alli se presenta el problema de no ver los registros. Solo te hice el planteamiento para que recrearas el escenario y vieras el error con 2 prgs porque en 1 solo no presenta ningun error
Browse no muestra registros (SOLUCIONADO)
Saludos... algun ejemplo que podamos probar con una dbf real??? para poder reproducir el error...
Browse no muestra registros (SOLUCIONADO)
Saludos Daniel, El ejemplo es el que esta al comienzo del post. Son 2 PRG.
Browse no muestra registros (SOLUCIONADO)
Hola [quote="Daniel Garcia-Gil":16i93ebt]Saludos... algun ejemplo que podamos probar con una dbf real??? para poder reproducir el error...[/quote:16i93ebt] Repito la solicitud En el primer post no veo donde esta la creacion de la dbf a usar o un link de descarga de la misma No veo donde termina la funcion main Cuando llamar a la funcion banco ? De la forma como esta expuesto el ejrmplo es imposible construirlo y ver o reproducir el problema que comentas Si pudieras publicar un ejemplo que podamos user sera mejor, mejor aun si el ejemplo reproduce tu problema
Browse no muestra registros (SOLUCIONADO)
Ok aca los 2 PRG ////////// 1er PRG //////////////////////// [code=fw:1v6byizs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />MEMVAR oWndPrinc<br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oBar, oBtn<br /><br />SetHandleCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />REQUEST DBFCDX<br />RddSetDefault<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span><br /><br />SET <span style="color: #00C800;">DEFAULT</span> <span style="color: #0000ff;">TO</span> \MX<br />SET DATE <span style="color: #0000ff;">TO</span> FRENCH<br />SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2000</span><br />SET CENTURY <span style="color: #0000ff;">ON</span><br />SET DELETED OFF<br />SET EXCLUSIVE OFF<br />SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndPrinc ;<br />   <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ventana Principal"</span> <span style="color: #0000ff;">MDI</span> ;<br />   <span style="color: #0000ff;">MENU</span> MenuPri<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWndPrinc <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">41</span> 3D<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar;<br />   TOOLTIP <span style="color: #ff0000;">"Bancos"</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Bancos"</span> NOBORDER <span style="color: #0000ff;">ADJUST</span>;<br />   <span style="color: #0000ff;">ACTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndPrinc <span style="color: #0000ff;">MAXIMIZED</span> ;<br />         <span style="color: #0000ff;">VALID</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"¿   Está seguro de querer Salir   ?"</span>, <span style="color: #ff0000;">"!!! Atención !!!"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MenuPri<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oMenu<br /><span style="color: #0000ff;">MENU</span> oMenu<br /><br /><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&General"</span><br />    <span style="color: #0000ff;">MENU</span><br />    <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Parametros de Precio"</span><br />    <span style="color: #0000ff;">SEPARATOR</span><br />    <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Salir"</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Caja y &Bancos"</span><br />    <span style="color: #0000ff;">MENU</span><br />     <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Bancos"</span> ;<br />     <span style="color: #0000ff;">ACTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #00C800;">RETURN</span> oMenu</div>[/code:1v6byizs] ////////// 2dor PRG //////////////////////// [code=fw:1v6byizs]<div class="fw" id="{CB}" style="font-family: monospace;"><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 />MEMVAR oWndPrinc<br /><br /><span style="color: #00C800;">STATIC</span> CODBCO, NOMBCO, CTABCO, CTACTA, GRA, NREG, oDlg, oBrw, oCol, cCODANT, oRpt<br /><span style="color: #00C800;">STATIC</span> TNUEVO := .T.<br /><span style="color: #00C800;">STATIC</span> LVAN   := .F.<br /><br /><span style="color: #00C800;">FUNCTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oWndBCO, cTitle, oFont, oBar, oMeter, oText, cAlias<br /><span style="color: #00C800;">LOCAL</span> oBrw<br /><span style="color: #00C800;">LOCAL</span> UBI:= <span style="color: #ff0000;">"DATA<span style="color: #000000;">\"</span><br />LOCAL cVIA := "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />cTitle := "</span>Cuentas Bancarias<span style="color: #ff0000;">"<br /><br />   CREASTRUCT()<br /><br />   ABRESTRUCT()<br /><br />   DEFINE FONT oFont NAME "</span>Arial<span style="color: #ff0000;">" SIZE 0,-12 BOLD<br /><br />   DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc ;<br />          FROM 0, 0 TO 0, 0           ;<br />          TITLE cTitle                ;<br />          COLOR 0, 14215660           ;<br />          PIXEL                       ;<br /><br />          SET FONT OF oWndBCO TO oFont<br /><br />          SET MESSAGE OF oWndBCO<br /><br />          oWndBCO:Hide()<br /><br />          DEFINE BUTTONBAR oBar OF oWndBCO SIZE 40, 50 3D<br /><br />          DEFINE BUTTON OF oBar FLAT ;<br />          TOOLTIP "</span>Incluir<span style="color: #ff0000;">" MESSAGE "</span> Incluir<span style="color: #ff0000;">";<br /><br />          DEFINE BUTTON OF oBar FLAT ;<br />          TOOLTIP "</span>Salir<span style="color: #ff0000;">" MESSAGE "</span> Salir<span style="color: #ff0000;">" ;<br />          ACTION oWndBCO:END()<br /><br />          oBrw := TXBrowse():New( oWndBCO )<br /><br />          oBrw:SetRDD()<br />          oBrw:CreateFromCode()<br />          oWndBCO:SetControl(oBrw)<br /><br />   ACTIVATE WINDOW oWndBCO ;<br />               ON INIT oBrw:Refresh() ;<br /><br />   oWndPrinc:cascade()<br />   oWndBCO:oClient = oBrw<br />   oWndBCO:Show()<br /><br />RETURN NIL<br /><br />STATIC FUNCTION CREASTRUCT()<br />LOCAL BANCO<br /><br />BANCO := "</span>\<span style="color: #00C800;">DATA</span>\BANCO.DBF<span style="color: #ff0000;">"<br /><br />lMkDir("</span><span style="color: #00C800;">DATA</span><span style="color: #ff0000;">")<br /><br />IF .NOT. FILE ("</span><span style="color: #00C800;">DATA</span>\BANCO.DBF<span style="color: #ff0000;">")<br />         DbCreate( "</span><span style="color: #00C800;">DATA</span>\BANCO<span style="color: #ff0000;">", { { "</span>BCO_CODIGO<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 12, 0 },;<br />                                   { "</span>BCO_DESCRI<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 30, 0 },;<br />                                   { "</span>BCO_CUENTA<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 20, 0 },;<br />                                   { "</span>BCO_SLDANT<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />                                   { "</span>BCO_DEBE<span style="color: #ff0000;">"  , "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />                                   { "</span>BCO_HABER<span style="color: #ff0000;">" , "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />                                   { "</span>BCO_CHEQUE<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 },;<br />                                   { "</span>BCO_NOTADB<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 },;<br />                                   { "</span>BCO_ENOTRA<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">",  1, 0 },;<br />                                   { "</span>BCO_CODMON<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">",  3, 0 },;<br />                                   { "</span>BCO_CTABAN<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 20, 0  } } )<br />          dbCloseAll()<br />ENDIF<br /><br />IF .NOT. FILE ("</span><span style="color: #00C800;">DATA</span>\BANCO.CDX<span style="color: #ff0000;">")<br />         USE DATA<span style="color: #000000;">\B</span>ANCO ALIAS BANCO<br />             MsgMeter( { | oMeter, oText, oDlg, lEnd | ;<br />             BuildIndex( oMeter, oText, oDlg, @lEnd, "</span>BANCO->BCO_CODIGO <span style="color: #ff0000;">", "</span>CODIGO<span style="color: #ff0000;">" ) },;<br />             "</span>Indexando Cuentas por Codigo...<span style="color: #ff0000;">", "</span>Espere un momento<span style="color: #ff0000;">" )<br />    dbCloseAll()<br />ENDIF<br /><br />RETURN (.T.)<br /><br />STATIC FUNCTION ABRESTRUCT()<br />LOCAL UBI:= "</span><span style="color: #00C800;">DATA</span>\<span style="color: #ff0000;">"<br />LOCAL cVIA := "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />    IF SELECT("</span>BANCO<span style="color: #ff0000;">")>0<br />        BANCO->(DBCLOSEAREA())<br />    ENDIF<br /><br />    IF SELECT("</span>BANCO<span style="color: #ff0000;">")=0<br />        DBUSEAREA(.T.,cVia,UBI+"</span>BANCO<span style="color: #ff0000;">","</span>BANCO<span style="color: #ff0000;">",.T.)<br />    ENDIF<br /><br />    BANCO->(ORDSETFOCUS(1))<br /><br />RETURN (.T.)<br /><br />STATIC FUNCTION BuildIndex( oMeter, oText, oDlg, lEnd, campo, bolsa )<br />   oMeter:nTotal = RecCount()<br />   OrdSetFocus(0)<br />   INDEX ON &(Campo) TAG &(Bolsa) ;<br />      EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )<br />RETURN NIL</span></div>[/code:1v6byizs] POST EDITADO POR DANIEL... RECOMENDANDO EL USO DEL TAG CODE [img:1v6byizs]http&#58;//img843&#46;imageshack&#46;us/img843/3708/testh&#46;jpg[/img:1v6byizs] Saludos,
Browse no muestra registros (SOLUCIONADO)
Debes agregarle los registros con DBU porque el 2do PRG no tiene inclusion de registros y crea la DBF vacia Atento a tus comentarios
Browse no muestra registros (SOLUCIONADO)
Saludos he probado el ejemplo a mi me funciona.... modifique el ejemplo para que se vea la version que estoy utilizando y añada automaticamente registros teniendo la informacion necesaria es mas facil para ayudar... prg1 [code=fw:3d6qloiw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />MEMVAR oWndPrinc<br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oBar, oBtn<br /><br />SetHandleCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />REQUEST DBFCDX<br />RddSetDefault<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span><br /><br />SET <span style="color: #00C800;">DEFAULT</span> <span style="color: #0000ff;">TO</span> \MX<br />SET DATE <span style="color: #0000ff;">TO</span> FRENCH<br />SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2000</span><br />SET CENTURY <span style="color: #0000ff;">ON</span><br />SET DELETED OFF<br />SET EXCLUSIVE OFF<br />SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndPrinc ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ventana Principal "</span> + FWVERSION <span style="color: #0000ff;">MDI</span> ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> MenuPri<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWndPrinc <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">41</span> 3D<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar;<br />&nbsp; &nbsp;TOOLTIP <span style="color: #ff0000;">"Bancos"</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Bancos"</span> NOBORDER <span style="color: #0000ff;">ADJUST</span>;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndPrinc <span style="color: #0000ff;">MAXIMIZED</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"¿ &nbsp; Está seguro de querer Salir &nbsp; ?"</span>, <span style="color: #ff0000;">"!!! Atención !!!"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MenuPri<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oMenu<br /><span style="color: #0000ff;">MENU</span> oMenu<br /><br /><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&General"</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Parametros de Precio"</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Salir"</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Caja y &Bancos"</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Bancos"</span> ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #0000ff;">ENDMENU</span><br /><span style="color: #00C800;">RETURN</span> oMenu<br />&nbsp;</div>[/code:3d6qloiw] prg2 [code=fw:3d6qloiw]<div class="fw" id="{CB}" style="font-family: monospace;"><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 />MEMVAR oWndPrinc<br /><br /><span style="color: #00C800;">STATIC</span> CODBCO, NOMBCO, CTABCO, CTACTA, GRA, NREG, oDlg, oBrw, oCol, cCODANT, oRpt<br /><span style="color: #00C800;">STATIC</span> TNUEVO := .T.<br /><span style="color: #00C800;">STATIC</span> LVAN &nbsp; := .F.<br /><br /><span style="color: #00C800;">FUNCTION</span> BANCOS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oWndBCO, cTitle, oFont, oBar, oMeter, oText, cAlias<br /><span style="color: #00C800;">LOCAL</span> oBrw<br /><span style="color: #00C800;">LOCAL</span> UBI:= <span style="color: #ff0000;">"DATA<span style="color: #000000;">\"</span><br />LOCAL cVIA := "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />cTitle := "</span>Cuentas Bancarias<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;CREASTRUCT()<br /><br />&nbsp; &nbsp;ABRESTRUCT()<br /><br />&nbsp; &nbsp;DEFINE FONT oFont NAME "</span>Arial<span style="color: #ff0000;">" SIZE 0,-12 BOLD<br /><br />&nbsp; &nbsp;DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM 0, 0 TO 0, 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TITLE cTitle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 0, 14215660 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PIXEL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET FONT OF oWndBCO TO oFont<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET MESSAGE OF oWndBCO<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWndBCO:Hide()<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFINE BUTTONBAR oBar OF oWndBCO SIZE 40, 50 3D<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFINE BUTTON OF oBar FLAT ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOOLTIP "</span>Incluir<span style="color: #ff0000;">" MESSAGE "</span> Incluir<span style="color: #ff0000;">";<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFINE BUTTON OF oBar FLAT ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOOLTIP "</span>Salir<span style="color: #ff0000;">" MESSAGE "</span> Salir<span style="color: #ff0000;">" ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ACTION oWndBCO:END()<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw := TXBrowse():New( oWndBCO )<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:SetRDD()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:CreateFromCode()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWndBCO:SetControl(oBrw)<br /><br />&nbsp; &nbsp;ACTIVATE WINDOW oWndBCO ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON INIT oBrw:Refresh() ;<br /><br />&nbsp; &nbsp;oWndPrinc:cascade()<br />&nbsp; &nbsp;oWndBCO:oClient = oBrw<br />&nbsp; &nbsp;oWndBCO:Show()<br /><br />RETURN NIL<br /><br />STATIC FUNCTION CREASTRUCT()<br />LOCAL BANCO<br />local n<br /><br />BANCO := "</span>\<span style="color: #00C800;">DATA</span>\BANCO.DBF<span style="color: #ff0000;">"<br /><br />lMkDir("</span><span style="color: #00C800;">DATA</span><span style="color: #ff0000;">")<br /><br />IF .NOT. FILE ("</span><span style="color: #00C800;">DATA</span>\BANCO.DBF<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DbCreate( "</span><span style="color: #00C800;">DATA</span>\BANCO<span style="color: #ff0000;">", { { "</span>BCO_CODIGO<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 12, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_DESCRI<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 30, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_CUENTA<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 20, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_SLDANT<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_DEBE<span style="color: #ff0000;">" &nbsp;, "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_HABER<span style="color: #ff0000;">" , "</span>N<span style="color: #ff0000;">", 14, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_CHEQUE<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_NOTADB<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_ENOTRA<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", &nbsp;1, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_CODMON<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", &nbsp;3, 0 },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ "</span>BCO_CTABAN<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 20, 0 &nbsp;} } )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; USE DATA<span style="color: #000000;">\B</span>ANCO ALIAS BANCO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for n = 1 to 500 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;banco->( DBAppend() )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;banco->BCO_CODIGO = "</span>CODIGO<span style="color: #ff0000;">" + StrZero( n, 3 )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;banco->BCO_DESCRI = "</span>DESCRIBE<span style="color: #ff0000;">" + StrZero( n, 3 )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; next<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbCloseAll()<br />ENDIF<br /><br />IF .NOT. FILE ("</span><span style="color: #00C800;">DATA</span>\BANCO.CDX<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;USE DATA<span style="color: #000000;">\B</span>ANCO ALIAS BANCO<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgMeter( { | oMeter, oText, oDlg, lEnd | ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BuildIndex( oMeter, oText, oDlg, @lEnd, "</span>BANCO->BCO_CODIGO <span style="color: #ff0000;">", "</span>CODIGO<span style="color: #ff0000;">" ) },;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span>Indexando Cuentas por Codigo...<span style="color: #ff0000;">", "</span>Espere un momento<span style="color: #ff0000;">" )<br />&nbsp; &nbsp; dbCloseAll()<br />ENDIF<br /><br />RETURN (.T.)<br /><br />STATIC FUNCTION ABRESTRUCT()<br />LOCAL UBI:= "</span><span style="color: #00C800;">DATA</span>\<span style="color: #ff0000;">"<br />LOCAL cVIA := "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp; IF SELECT("</span>BANCO<span style="color: #ff0000;">")>0<br />&nbsp; &nbsp; &nbsp; &nbsp; BANCO->(DBCLOSEAREA())<br />&nbsp; &nbsp; ENDIF<br /><br />&nbsp; &nbsp; IF SELECT("</span>BANCO<span style="color: #ff0000;">")=0<br />&nbsp; &nbsp; &nbsp; &nbsp; DBUSEAREA(.T.,cVia,UBI+"</span>BANCO<span style="color: #ff0000;">","</span>BANCO<span style="color: #ff0000;">",.T.)<br />&nbsp; &nbsp; ENDIF<br /><br />&nbsp; &nbsp; BANCO->(ORDSETFOCUS(1))<br /><br />RETURN (.T.)<br /><br />STATIC FUNCTION BuildIndex( oMeter, oText, oDlg, lEnd, campo, bolsa )<br />&nbsp; &nbsp;oMeter:nTotal = RecCount()<br />&nbsp; &nbsp;OrdSetFocus(0)<br />&nbsp; &nbsp;INDEX ON &(Campo) TAG &(Bolsa) ;<br />&nbsp; &nbsp; &nbsp; EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )<br />RETURN NIL</span></div>[/code:3d6qloiw] script para compilar los 2 archivos para usar el scrip nombre_del_scrip prg1 prg2 [code=fw:3d6qloiw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ECHO OFF<br />CLS<br />ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿<br />ECHO ³ FiveWin <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">7.12</span> - Dec. <span style="color: #000000;">2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Harbour development <span style="color: #0000ff;">power</span> &nbsp;³Ü<br />ECHO ³ <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech, <span style="color: #000000;">1993</span><span style="color: #000000;">-2007</span> &nbsp; &nbsp;<span style="color: #00C800;">for</span> Microsoft Windows <span style="color: #000000;">95</span>/<span style="color: #000000;">98</span>/NT/<span style="color: #000000;">2000</span>/ME/XP/Vista ³Û<br />ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ<br /><br /><br /><span style="color: #00C800;">if</span> A%<span style="color: #000000;">1</span> == A GOTO :<span style="color: #000000;">SINTAX</span><br /><span style="color: #00C800;">if</span> NOT EXIST %<span style="color: #000000;">1</span>.prg GOTO :<span style="color: #000000;">NOEXIST</span><br /><span style="color: #00C800;">if</span> NOT EXIST %<span style="color: #000000;">2</span>.prg GOTO :<span style="color: #000000;">NOEXIST</span><br /><br />ECHO Compiling...<br /><br />set hdir=%HBDIR%<br />set hdirl=%hdir%\lib\win\bcc<br />set fwh=c:\fwh<br />set bcdir=c:\BCC55<br /><br />%hdir%\bin\harbour %<span style="color: #000000;">1</span> /n /i%fwh%\include;%hdir%\include /w /p &nbsp;> comp.log<br />%hdir%\bin\harbour %<span style="color: #000000;">2</span> /n /i%fwh%\include;%hdir%\include /w /p &nbsp;> comp.log<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO COMPILEERRORS<br />@type comp.log<br /><br />echo -O2 -e%<span style="color: #000000;">1</span>.exe -I%hdir%\include -I%bcdir%\include %<span style="color: #000000;">1</span>.c %<span style="color: #000000;">2</span>.c > b32.bc<br />%bcdir%\bin\bcc32 -M -c @b32.bc<br />:<span style="color: #000000;">ENDCOMPILE</span><br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %<span style="color: #000000;">1</span><br /><br />echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo %<span style="color: #000000;">1</span>.obj %<span style="color: #000000;">2</span>.obj, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.exe, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.map, + >> b32.bc<br />echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib + >> b32.bc<br />echo %hdir%\lib\rtl.lib + >> b32.bc<br />echo %hdir%\lib\vm.lib + >> b32.bc<br />echo %hdir%\lib\gtgui.lib + >> b32.bc<br />echo %hdir%\lib\lang.lib + >> b32.bc<br />echo %hdir%\lib\macro.lib + >> b32.bc<br />echo %hdir%\lib\rdd.lib + >> b32.bc<br />echo %hdir%\lib\dbfntx.lib + >> b32.bc<br />echo %hdir%\lib\dbfcdx.lib + >> b32.bc<br />echo %hdir%\lib\dbffpt.lib + >> b32.bc<br />echo %hdir%\lib\hbsix.lib + >> b32.bc<br />echo %hdir%\lib\debug.lib + >> b32.bc<br />echo %hdir%\lib\common.lib + >> b32.bc<br />echo %hdir%\lib\pp.lib + >> b32.bc<br />echo %hdir%\lib\codepage.lib + >> b32.bc<br />echo %hdir%\lib\hbwin32.lib + >> b32.bc<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />rem echo %hdir%\lib\rddads.lib + >> b32.bc<br />rem echo %hdir%\lib\Ace32.lib + >> b32.bc<br /><br />echo %bcdir%\lib\cw32.lib + >> b32.bc<br />echo %bcdir%\lib\import32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\rasapi32.lib, >> b32.bc<br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.res echo %<span style="color: #000000;">1</span>.res >> b32.bc<br /><span style="color: #00C800;">if</span> %GT% == gtwin %bcdir%\bin\ilink32 -Tpe -s @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br /><span style="color: #00C800;">if</span> %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO * Application successfully built *<br />%<span style="color: #000000;">1</span><br />GOTO EXIT<br />ECHO<br /><br />rem delete temporary files<br />@del %<span style="color: #000000;">1</span>.c<br /><br />:<span style="color: #000000;">COMPILEERRORS</span><br />@type comp.log<br />ECHO * Compile errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO * Linking errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">SINTAX</span><br />ECHO &nbsp; &nbsp;SYNTAX: <span style="color: #000000;">Build</span> <span style="color: #000000;">&#91;</span>Program<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>-- No especifiques la extensi¢n PRG<br />ECHO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span>-- Don<span style="color: #ff0000;">'t specify .PRG extension<br />GOTO EXIT<br /><br />:NOEXIST<br />ECHO The specified PRG %1 does not exist<br /><br />:EXIT<br /><br /></span></div>[/code:3d6qloiw] link de descarga del exe [url:3d6qloiw]http&#58;//www&#46;sitasoft&#46;net/fivewin/samples/testxb9&#46;zip[/url:3d6qloiw]
Browse no muestra registros (SOLUCIONADO)
Estimados, Estuve revissando y al compilar con Verce, no estaba apuntando al DBF con datos, esa era la razon de no verlos. Gracias a Daniel por la orientacion
Browse via internet and repaint
Hello! I'm testing an app that works on the internet via AIS and I'm trying to optimize it ... I would like know if there is a way to find out whether bSkip codeblock of TWBrowse is executed because of the navigating the browse or just because of the repainting after the window that covered the browse area was closed? Thanks, Roman
Browse via internet and repaint
Skip is executed while repainting also. If size of AdsCacheRecords(..) is set optimally, the skip is only on records cached by the client
Browse via internet and repaint
Hello! [quote="nageswaragunupudi":vmb15j09]Skip is executed while repainting also. If size of AdsCacheRecords(..) is set optimally, the skip is only on records cached by the client[/quote:vmb15j09] Thanks. I set it to AdsCacheRecords(80), but I've also reviewed the code and noticed that I made a lot of neccessary calls on events like [code=fw:vmb15j09]<div class="fw" id="{CB}" style="font-family: monospace;">bChange, bPainted, bLostFocus, bGotFocus, bWhen and bLogicLen</div>[/code:vmb15j09] Now the browse is working much much faster on ADSL / cable internet ... Regards, Roman
Browse via internet and repaint
Roman, i have this problem too.. can you share your experience? you change only adscacherecords? thanks
Browse via internet and repaint
Hello! [quote="norberto":hpi86lsc] [quote:hpi86lsc]I set it to AdsCacheRecords(80), but I've also reviewed the code and noticed that I made a lot of neccessary calls[/quote:hpi86lsc] i have this problem too.. can you share your experience? you change only adscacherecords? thanks [/quote:hpi86lsc] I'm sorry that I was not clear in my reply. I've added the AdsCacheRecords(80) just to be safe, because I didn't know the default value - the setting didn't accelerate the browse. My application is MDI based - it is possible to browse one table (with single alias) in different MDI windows with different filters/scopes. So on each event like bGotFocus or bRepaint I use functions like dbSelectArea, dbSetOrder, dbSetScope, dbGoto and similar to be sure that repainting works correctly. After I removed most calls to those functions, browse became much faster (but now I can't use multiple MDI windows) ... Regards, Roman
Browse via internet and repaint
you can open the same table with different alias for each Browse in each MDI. This works well. Each browse can be navigated independently and the server optimizes performance well when same table is opened with different aliases.
Browse with lCellStyle and Setcolor
Hello Antonio There are problem with SetColor and lCellStyle , the row focused is always black and white Maurizio #include "FWCE.ch" REQUEST DBFCDX //----------------------------------------------------------------------------// function Main() local oWnd, oBrw, hBmp := ReadBitmap( CurDir() + "\go.bmp" ) USE ( CurDir() + "\Customer" ) VIA "DBFCDX" DEFINE WINDOW oWnd TITLE "Tutor10" @ 1, 1 LISTBOX oBrw ; FIELDS hBmp, Customer->Last, Customer->First,Customer->City ; SIZES 15,65,65 ,65 ; HEADERS "", "Last", "First" ; SIZE 280, 190 oBrw:lCellStyle := .t. oBrw:SetColor( CLR_HRED,CLR_YELLOW ) @ 12, 2 BUTTON "Done" SIZE 80, 30 ; ACTION oWnd:End() ACTIVATE WINDOW oWnd ; ON CLICK MsgInfo( "Click!" ) return nil //----------------------------------------------------------------------------//
Browse with lCellStyle and Setcolor
Maurizio, Fixed. In a few minutes a new FWPPC build will be available for download. Thanks for your feedback,
Browse() sale en ingles como lo pongo en español??
HOLA <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Pienso usar para una base de datos muy chiquita el browse() que ya sale con botonsitos etc. pero me sale en ingles que ahi que hacer <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> para que salga en español.SaluditoAida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Browse() sale en ingles como lo pongo en español??
Prueba con #define SPANISH antes del include Fivewin.ch
Browse() sale en ingles como lo pongo en español??
\fwh\source\function\browse.prg
Browse() sale en ingles como lo pongo en español??
Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ya quedo en español tenquius <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> SaludosAida <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Browser for FW sample folder
[url:3p5n9gu2]http&#58;//www&#46;atzwanger-software&#46;com/fw/SamplesPreview&#46;zip[/url:3p5n9gu2] I have made a handy tool to browse the Fivewin samples which I want share. Maybe you like it. At the moment I have about 260 screenshots. But I saw that there are more than 700 sample-prgs. But I will continue. 1) Unpack the zip-file into the sample folder 2) In samples.dbf the path must look to the fivewin/sample folder. 3) snipk.exe is the exe to browse the samples. Best regards, Otto [img:3p5n9gu2]http&#58;//www&#46;atzwanger-software&#46;com/fw/sk&#46;jpg[/img:3p5n9gu2]
Browser for FW sample folder
OTTO: Great idea. Years ago fw192 had a program that compiled samples and work great. I'm having a problem. unziped all in c:\fwh\samples. executed the snipk.exe the dialog opens. None of the button bmps appear. Try to run a file and I get on most msg File not found. Only works on one or 2 files. What am I doing wrong?
Browser for FW sample folder
Hello Harvey, the source code is also included. Please have a look to: [code=fw:3corzcmk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> FILE cPathBMP + <span style="color: #ff0000;">"run.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> &nbsp;iif<span style="color: #000000;">&#40;</span>file<span style="color: #000000;">&#40;</span>winexec<span style="color: #000000;">&#40;</span>cDirName + &nbsp;<span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-4</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">".exe"</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;winexec<span style="color: #000000;">&#40;</span>cDirName + &nbsp;<span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-4</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">".exe"</span> <span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"File not found"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Run"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TOOLTIP <span style="color: #ff0000;">"Run"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Run"</span> &nbsp;NOBORDER</div>[/code:3corzcmk] “Run” only executes programs which are already compiled. As I use UeStudio for my work I compile with UeStudio. Before I had also a function call: function compile( oBrw ) // winexec("buildx.bat " + substr(oBrw:aArrayData[oBrw:nArrayAt,1],1,( len(oBrw:aArrayData[oBrw:nArrayAt,1])-4) ) ) winexec("buildh.bat " + substr(oBrw:aArrayData[oBrw:nArrayAt,1],1,( len(oBrw:aArrayData [oBrw:nArrayAt,1])-4) ) ) return nil >None of the button bmps appear. In the sample.dbf I have "c:\FWH\samples" – first record. Maybe you have a different folder. The “SamplesPreview” folder must be a subfolder of “samples”. Best regards, Otto
Browser for FW sample folder
Otto: I'll take a look at the program later today. Have you had a chance to look at the program you downloaded..re: my product
Browser for FW sample folder
Hello Harvey, I will send you an email. Best regards, Otto
Browser for FW sample folder
[url:2j77rt3x]http&#58;//www&#46;atzwanger-software&#46;com/fw/SamplesPreview1&#46;zip[/url:2j77rt3x] I uploaded the next 50 screenshots. Best regards, Otto
Browser for FW sample folder
Mr Otto This is a very nice program
Browser for FW sample folder
I uploaded the next 50 screenshots. Now there are 370 screeenshots online. Best regards, Otto [url:7l0lzpwh]http&#58;//www&#46;atzwanger-software&#46;com/fw/SamplesPreview2&#46;zip[/url:7l0lzpwh]
Browser for FW sample folder
I uploaded the next 140 screenshots. Now there are 510 screeenshots online. Best regards, Otto [url:39481mg3]http&#58;//www&#46;atzwanger-software&#46;com/fw/SamplesPreview3&#46;zip[/url:39481mg3]
Browser for FW sample folder
Otto, thanks for sharing this nice tool. It's very convenient <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Browser for FW sample folder
Fivewin 9.10 I uploaded the next 160 screenshots. Now there are 660 screeenshots online. More or less all the samples. Best regards, Otto [url:1ssta7bg]http&#58;//www&#46;atzwanger-software&#46;com/fw/SamplesPreview4&#46;zip[/url:1ssta7bg]
Browser for FW sample folder
Dear Otto: [quote="Otto":2dydlrhj]I uploaded the next 160 screenshots. Now there are 660 screeenshots online. More or less all the samples.[/quote:2dydlrhj] Great work, thanks a lot, I use your code sniper program from the begining. Best regards.
Browser for FW sample folder
Hello Manuel, thank you for your kind words. Good to know that snipkeeper is of some help for you. I use your great work “TSBUTTON” so much. May I take the opportunity to ask for your help: @ 88,697 BITMAP oBmp FILENAME cPathBMP + "snipkeeper.bmp" OF oWnd ; SIZE 580,300 PIXEL SCROLL ADJUST I show the screenshots with the adjust clause. But it would be better only to adjust if the screenshot is larger than the place reserved on the screen to show it. How could I check for the size and only adjust it necessary? Thanks in advance Otto
Browser for FW sample folder
Otto: Great work ! Kudos ! It would be nice if Antonio provide us with some sort of make utility or batch file to compile all samples. I think this will reduce unnecessary posting. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Browser for FW sample folder
Dear Otto: [quote="Otto":21b0wkkb]I show the screenshots with the adjust clause. But it would be better only to adjust if the screenshot is larger than the place reserved on the screen to show it. How could I check for the size and only adjust it necessary?[/quote:21b0wkkb] The functions to get the sizes of bitmaps are: nBmpWidth( oBmp:hBitmap ) // bitmap's width nBmpHeight( oBmp:hBitmap ) // bitmap's height I was trying with a function that may do the job (not fully tested)[code=fw:21b0wkkb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> AdjustBmp<span style="color: #000000;">&#40;</span> oBmp <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">Local</span> nAdj, nNewH, ;<br />         nWidth  := nBmpWidth<span style="color: #000000;">&#40;</span> oBmp:<span style="color: #000000;">hBitMap</span> <span style="color: #000000;">&#41;</span>, ;<br />         nHeight := nBmpHeight<span style="color: #000000;">&#40;</span> oBmp:<span style="color: #000000;">hBitMap</span> <span style="color: #000000;">&#41;</span><br /><br />   nAdj := <span style="color: #000000;">1</span> + <span style="color: #000000;">&#40;</span> nWidth / <span style="color: #000000;">450</span> <span style="color: #000000;">&#41;</span><br />   nNewH := nHeight * nAdj<br /><br />   <span style="color: #00C800;">While</span> nNewH > <span style="color: #000000;">300</span><br />      nAdj -= .<span style="color: #000000;">01</span><br />      nNewH := nHeight * nAdj<br />   <span style="color: #00C800;">EndDo</span><br /><br />   nWidth  *= nAdj<br />   nHeight *= nAdj<br />   oBmp:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nWidth, nHeight, .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span></div>[/code:21b0wkkb]This function could be inserted in your bChange code block. Another suggestion, in the main window of your program, remove the space for the directory selection (putting it in tools tab) and increase the space for the snapshot and the code viewer. Best regards.
Browser for FW sample folder
To search for a certain sample program you can also use the WINDOWS build in gallery. Best regards, Otto [img:1xriwc47]http&#58;//www&#46;atzwanger-software&#46;com/fw/galerie&#46;jpg[/img:1xriwc47]
Browser icon
Hi, There is a window handle. This window is a page of a particular web browser. Is it possible to get an icon of this browser ?
Browses Bug
Mouse Wheel acts on focused browse control even when mouse pointer is not over it's client area.I have fixed that in TSBrowse, here the new MouseWheel method:[code:1y9p8aga]METHOD MouseWheel&#40; nKeys, nDelta, nXPos, nYPos &#41; CLASS TSBrowse Local nWParam, ; aPoint &#58;= &#123; nYPos, nXPos &#125; ScreenToClient&#40; &#58;&#58;hWnd, aPoint &#41; If ! IsOverWnd&#40; &#58;&#58;hWnd, aPoint&#91; 1 &#93;, aPoint&#91; 2 &#93; &#41; Return Super&#58;MouseWheel&#40; nKeys, nDelta, nXPos, nYPos &#41; EndIf nDelta /= 120 If &#40; nDelta &#41; > 0 If &#58;&#58;nWheelLines != Nil nWParam &#58;= SB_LINEUP nDelta &#58;= &#58;&#58;nWheelLines * nDelta Else nWParam &#58;= SB_PAGEUP EndIf Else If &#58;&#58;nWheelLines != Nil nWParam &#58;= SB_LINEDOWN nDelta &#58;= &#58;&#58;nWheelLines * Abs&#40; nDelta &#41; Else nWParam &#58;= SB_PAGEDOWN nDelta &#58;= Abs&#40; nDelta &#41; EndIf EndIf While nDelta > 1 &#58;&#58;VScroll&#40; nWParam, 0 &#41; nDelta-- EndDo Return &#58;&#58;VScroll&#40; nWParam, 0 &#41;[/code:1y9p8aga] For Antonio, here a proposed MouseWheel method for xBrowse: [code:1y9p8aga]METHOD MouseWheel&#40; nKeys, nDelta, nXPos, nYPos &#41; CLASS TXBrowse Local aPoint &#58;= &#123; nYPos, nXPos &#125; ScreenToClient&#40; &#58;&#58;hWnd, aPoint &#41; if ! IsOverWnd&#40; &#58;&#58;hWnd, aPoint&#91; 1 &#93;, aPoint&#91; 2 &#93; &#41; Return Super&#58;MouseWheel&#40; nKeys, nDelta, nXPos, nYPos &#41; endif if lAnd&#40; nKeys, MK_MBUTTON &#41; if nDelta > 0 &#58;&#58;PageUp&#40;&#41; else &#58;&#58;PageDown&#40;&#41; endif else if nDelta > 0 &#58;&#58;GoUp&#40;&#41; else &#58;&#58;GoDown&#40;&#41; endif endif Return nil [/code:1y9p8aga]Regards.Manuel Mercado
Browses Bug
Antonio,I see that xBrowse is not using the lines per movement for the mouse wheel that is set in the Windows registry. This would be a nice addition. Browsing a table one line at a time can be very slow and tedious.You can get the needed value like this:[code:24odjf3h] oReg&#58;= Treg32&#40;&#41;&#58;new&#40; HKEY_CURRENT_USER,"Control Panel\Desktop"&#41; &#58;&#58;nWheelScrollLines &#58;= val&#40; oReg&#58;get&#40;"WheelScrollLines"&#41; &#41; oReg&#58;close&#40;&#41;[/code:24odjf3h]James
Browses Bug
James ,Very good idea , it is easy to work out , only a few changes are needed.1) What is the normal behaviour when we are at the end or the beginning from the list , now i have:[code:ubhazfiw] FOR n &#58;= 1 TO &#58;&#58;nWheelScrollLines IF nDelta <= 0 IF EVAL&#40;&#58;&#58;bKeyNo&#41; = EVAL&#40;&#58;&#58;bKeyCount,self&#41; // > EVAL&#40;&#58;&#58;bKeyCount,self&#41; - &#58;&#58;nWheelScrollLines EXIT END ELSE IF EVAL&#40;&#58;&#58;bKeyNo&#41; == 1 //< &#58;&#58;nWheelScrollLines EXIT END END IF nDelta > 0 &#58;&#58;GoUp&#40;&#41; else &#58;&#58;GoDown&#40;&#41; endif NEXT [/code:ubhazfiw] GoDown() is not executed on the last row , GoUp() not on the first row 2) Now i have nWheelScrollLines defined as a data , which must receive his value for each instance from xBrowse in method new. Probably a better aproach is to define a ClassData , which must only receive his value one time How is this done ? PROBLEMS : 1) Browsing a DBF , and after Ctrl-PgDn , EVAL(bKeyNo) seems to give a wrong value , so GoDown() is executed 2) Browsing a Array : When we are at the last row from the screen , and executing GoDown , the last 3 rows from the screen are all the same Frank [quote="James Bott":ubhazfiw]Antonio, I see that xBrowse is not using the lines per movement for the mouse wheel that is set in the Windows registry. This would be a nice addition. Browsing a table one line at a time can be very slow and tedious. You can get the needed value like this: [code:ubhazfiw] oReg&#58;= Treg32&#40;&#41;&#58;new&#40; HKEY_CURRENT_USER,"Control Panel\Desktop"&#41; &#58;&#58;nWheelScrollLines &#58;= val&#40; oReg&#58;get&#40;"WheelScrollLines"&#41; &#41; oReg&#58;close&#40;&#41;[/code:ubhazfiw] James[/quote:ubhazfiw]
Browses Bug
Frank,[quote:r8up9tq2]Probably a better aproach is to define a ClassData , which must only receive his value one time How is this done ? [/quote:r8up9tq2]Just define it as CLASSDATA:classdata nWheelScrollLines Then in the new method:if ::nWheelScrollLines == nil // define it hereendifJames
Browsing a large recordset
Hi, I have a question about browsing a large amount of records with ADO. I have a client that want to browse a table with lot of records. The problem is that running the query to get the recordset is taking already 3 .5 seconds. What I can do is setting a LIMIT op 1000 records, and fetching the next 1000 when I get to the buttom of the browse. HeidiSQL is doing this by doing [code=fw:3u7nr7ss]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">SELECT</span>  * <span style="color: #0000ff;">FROM</span> .. <span style="color: #0000ff;">ORDER BY</span> .. <span style="color: #0000ff;">ASC</span> LIMIT <span style="color: #000000;">1000</span>;</div>[/code:3u7nr7ss] and then when reaching the bottom [code=fw:3u7nr7ss]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">SELECT</span>  * <span style="color: #0000ff;">FROM</span> .. <span style="color: #0000ff;">ORDER BY</span> .. <span style="color: #0000ff;">ASC</span> LIMIT <span style="color: #000000;">1000</span>,<span style="color: #000000;">1000</span>;</div>[/code:3u7nr7ss] How can I do this, with xbrowse()
Browsing a large recordset
XBrowse or some other browse is not the issue. The second sql statement results in a 2nd recordset different from the 1st recordset. You can not concatenate both recordsets. Hope you agree. Do you plan to replace the 1st record set with 2nd recordset? While browsing one of the recordsets the user wants to change the sort order. How do you propose to handle this? If you are first clear on how do you plan to handle ADO recordset issues, then you can fit your idea easily into xbrowse or any other browse.
Browsing a large recordset
This is for information. If you are using recent FWH, you can use FWMYSQL RowSet. You can continue to use ADO for most of the application and use FWHMYSQL rowset in one or two cases. With rowsets it is possible to read a few records initially and readnext records later. Records read later are appended to the rowset and the rowset is enlarged. oMySql := mysql_Open( oAdoCnObject ) oRs := oMySql:RowSet( <ctable>, 1000 ) // read first 1000 records << browse code >> At an appropriate time, you can oRs:ReadNext( 2000 ) // read and append next 2000 records or oRs:ReadNext() // read all remaining records and append oRs:lMore if .t. there are still some records to be read. If oRs:lMore is .f., no more records are remaining to be read. If you want to read next records when you reach end of file in xbrowse, oBrw:bPastEof := { || If( oRs:lMore, oRs:ReadNext(500), nil ), oBrw:Refresh() }
Browsing arrays
Is possible to browse arrays? Best Regards. Claudio
Browsing arrays
Hi Claudio, I'm happy to see you here! This is a working sample: [code:1iajjjk5]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd, oBrw LOCAL aArray &#58;= &#123; "Test1", "Test2", "Test3" &#125; LOCAL nCur &#58;= 1 DEFINE WINDOW oWnd; TITLE "Browsing array" @ 0, 0 LISTBOX oBrw FIELDS aArray&#91; nCur &#93;; HEADERS "Test data" oBrw&#58;bLogicLen = &#123; || Len&#40; aArray &#41; &#125; oBrw&#58;bGoTop = &#123; || nCur &#58;= 1 &#125; oBrw&#58;bGoBottom = &#123; || nCur &#58;= Len&#40; aArray &#41; &#125; oBrw&#58;bSkip = &#123; | nSkip | Skipper&#40; aArray, @nCur, nSkip &#41; &#125; oBrw&#58;cAlias = "ARRAY" oBrw&#58;SetFocus&#40;&#41; ACTIVATE WINDOW oWnd RETURN NIL STATIC FUNCTION SKIPPER&#40; aArray, nCur, nSkip &#41; LOCAL nOld &#58;= nCur nCur += nSkip IF nCur > LEN&#40; aArray &#41;; nCur = LEN&#40; aArray &#41;; ENDIF IF nCur < 1; nCur = 1; ENDIF RETURN nCur - nOld[/code:1iajjjk5] EMG
Browsing arrays
[quote="EnricoMaria":1jot5jvb]Hi Claudio, I'm happy to see you here! This is a working sample: [snip] EMG[/quote:1jot5jvb] Thanks, i try immediatly. I'm here because our frend Andrea convinced me <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> , i'm happy too. Claudio.
Browsing arrays
Hi all, I have a situation where I need to browse an array. The problem is that it can be a one or two dimension array. At the time the array is passed to my function I still don`t know what type of array the function will have to browse and how many columns it includes. So I want the function to determine this by itself and display all the elements and columns. So far I partly solved the problem execpt for oLbx:bLine where I have no idea of how I can display all columns. Any ideas Regards, <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
Browsing arrays
Gilbert, as far as i know you can not browse one dimensional arrays. At least not with TWBrowse and TSBrowse. One dimension you can list in a normal listbox. Regards, Detlef
Browsing arrays
Hi Detlef, Sorry to tell you that I have browse array with TWBrowse without any problems in many of my applications so far. That is not my problem. My real problem is that in the application under developpement I need to browse a 2 dimensions array not knowing how many column I will need. If the array was a fixed structure that would be no problem, but it the lenght of the second dimension change depending on what the user does. Since all the columns must be predefine when calling TWBrowse I cannot use a loop to create the needed columns. That is my problem. Regards,
Browsing arrays
Gilbert, if you need a variable number of columns try this: [code:1sy7f0to] DEFINE DIALOG oDlg NAME "STATBROWSE" ; TITLE OemToAnsi&#40; cTitle &#41;; of oWnd REDEFINE COLUMN BROWSE oBrow ID 40 OF oDlg oBrow&#58;SetArray&#40; gaStatArr &#41; oBrow&#58;nFreeze &#58;= 1 ADD COLUMN TO oBrow ARRAY ELEM 1; HEADER aHeader&#91;1&#93;; SIZE aSize&#91;1&#93;; PICTURE aPict&#91;1&#93;; NOBAR; LEFT for n &#58;= 2 to len&#40; aHeader &#41; oBrow&#58;AddColumn&#40; TCColumn&#40;&#41;&#58;New&#40;; OemToAnsi&#40; aHeader&#91; n &#93; &#41;, MakeBlock&#40; n, oBrow &#41;,; aPict&#91; n &#93;,,, If&#40; !&#46;T&#46;, "LEFT", Upper&#40; "RIGHT" &#41; &#41;, aSize&#91; n &#93;, &#46;F&#46;, &#46;F&#46;,,,, &#46;F&#46; &#41; &#41; next ADD COLUMN TO oBrow ;// ARRAY ELEM 1; HEADER " "; SIZE 16; PICTURE NIL; NOBAR; LEFT &#46;&#46;&#46; &#46;&#46;&#46; &#46;&#46;&#46; ////////////////////////////////// STATIC FUNCTION MakeBlock&#40;n, oBrw&#41; ////////////////////////////////// RETURN &#40; &#123;|x| if&#40;pcount&#40;&#41; > 0, oBrw&#58;aArray&#91;oBrw&#58;nAt&#93;&#91;n&#93; &#58;= x, oBrw&#58;aArray&#91;oBrw&#58;nAt&#93;&#91;n&#93;&#41;&#125; &#41; [/code:1sy7f0to] This is sample when i use TSBrowse. Maybe this could help you? Best regards, Detlef
Browsing arrays
Hi Biel, At first look it seem like that`s what I was looking for. I will get on it this coming weekend. Thanks Gilbert
Browsing data with images.
Is there a way and/or example of a browse where I can display regular fields AND an image (BMP or JPG) ? Thank you.
Browsing data with images.
Hello,This weekend, my new tools are finished.Included in the application, is a Project / picture browser.I can show all kind of pictures. Each record shows 2 different pictures.If it is that, you are looking for, i can send you the source by e-mail. This source is not included in the new application, I will put in the forum.It works with two browsers : On the left hand side : main-informationsOn the right hand side : detail-informationsAs well a full-screen preview is included.[img:1hjvj9ke]http&#58;//www&#46;pflegeplus&#46;com/pictures/pictbrowser&#46;jpg[/img:1hjvj9ke]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Browsing data with images.
Uwe:Thank you for your help. What you suggest seems that it's what I need. Please email me the source. Thank you very much.
Browsing data with images.
Hello HunterEC,you can download the complete application < BACKGROUND-Tools >Have a look, what i have done there.Maybe something belongs to your problem.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Browsing empty arrays
The below works as required; however, when aData is an empty array it comes up with 1132 Error, Bound error:array access. This doesn't happen with the 16-bit FW27. Advice would be appreciated as to how this is dealt with using FWH Thanks // Browsing a two dimensions array with FiveWin powerfull TWBrowse #include "FiveWin.ch" //----------------------------------------------------------------------------// function Main() local oDlg, oBrw local aData := { { "1", "Cliente", "=", "123456" },; { "2", "Direccion", "$", "Spain" },; { "3", "Telefono", "<>", "889977665" } } SET _3DLOOK ON DEFINE DIALOG oDlg FROM 2, 2 TO 20, 50 @ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],; aData[ oBrw:nAt ][ 2 ],; aData[ oBrw:nAt ][ 3 ],; aData[ oBrw:nAt ][ 4 ] OF oDlg ; SIZE 150, 100 HEADERS "One", "Two", "Three", "Four" oBrw:SetArray( aData ) @ 10, 9 BUTTON "&End" OF oDlg ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED return nil //----------------------------------------------------------------------------//
Browsing empty arrays
[quote="George Trojan":2u434x06]@ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],;[/quote:2u434x06] @ 1, 1 LISTBOX oBrw FIELDS IF( EMPTY( aData ), "", aData[ oBrw:nAt ][ 1 ] ),; And so on. EMG
Browsing empty arrays
Thanks for your response. That works in the sample; howevere, it doesn't work in the below: REDEFINE LISTBOX oBrwOrdr ; FIELDS aOrder[oBrwOrdr:nAt][1],aOrder[oBrwOrdr:nAt][2],; aOrder[oBrwOrdr:nAt][3],aOrder[oBrwOrdr:nAt][4],aOrder[oBrwOrdr:nAt][5],aOrder[oBrwOrdr:nAt][6] ; ID 110 OF oAddOrder ; COLSIZES 415,47,60,60,60,60 HEADERS "Product Description","Qty","Price","Sub-Total","Sub-GST","Total" ; COLOR CLR_BLUE,CLR_WHITE ; FONT oFont ; UPDATE If when the array is empty, I can assign {''} to aOrder ie. aOrder:={''} but we get a blank line in the browse and we start with an element in the array. Declaring aOrder:={} and the above works in 16bit FW. I have tried various combinations of ...FIELDS IIF(empty(aOrder),... as below: FIELDS IIF(!empty(aOrder),(aOrder[oBrwOrdr:nAt][1],aOrder[oBrwOrdr:nAt][2],; aOrder[oBrwOrdr:nAt][3],aOrder[oBrwOrdr:nAt][4],aOrder[oBrwOrdr:nAt][5],aOrder[oBrwOrdr:nAt][6]),'') ; I always get the "bound error, array access". Thanks for your asistance/advice. Regards
Browsing empty arrays
[quote="George Trojan":1kngukef]FIELDS IIF(!empty(aOrder),(aOrder[oBrwOrdr:nAt][1],aOrder[oBrwOrdr:nAt][2],; aOrder[oBrwOrdr:nAt][3],aOrder[oBrwOrdr:nAt][4],aOrder[oBrwOrdr:nAt][5],aOrder[oBrwOrdr:nAt][6]),'') ;[/quote:1kngukef] You have to put an IF() for each browse column: [code:1kngukef]FIELDS IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;1&#93;&#41;,; IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;2&#93;&#41;,; IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;3&#93;&#41;,; IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;4&#93;&#41;,; IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;5&#93;&#41;,; IIF&#40;!empty&#40;aOrder&#41;, "", aOrder&#91;oBrwOrdr&#58;nAt&#93;&#91;6&#93;&#41; ;[/code:1kngukef] Or something similar. EMG
Browsing empty arrays
Tried FIELDS IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][1],''),IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][2],''),; IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][3],''),IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][4],''),; IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][5],''),IIF(!empty(aOrder),aOrder[oBrwOrdr:nAt][6],'') ; still get the same error, the only way I can get it to work is to have a 'blank' element in the array ie. aOrder:={'','','','','',''} Thanks
Browsing empty arrays
George, i had the same problem and just added an empty array to the browser if there is no data present. Something like: aadd(aData, { "", "", "", "" }) Regards, John.
Browsing empty arrays
This is a working sample: [code:11g7m09t]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd, oBrw LOCAL aArray &#58;= &#123; &#123; "Test1_1", "Test1_2" &#125;,; &#123; "Test2_1", "Test2_2" &#125;,; &#123; "Test3_1", "Test3_2" &#125; &#125; LOCAL nCur &#58;= 1 aArray = &#123;&#125; DEFINE WINDOW oWnd; TITLE "Browsing array" @ 0, 0 LISTBOX oBrw FIELDS IF&#40; EMPTY&#40; aArray &#41;, "", aArray&#91; nCur, 1 &#93; &#41;,; IF&#40; EMPTY&#40; aArray &#41;, "", aArray&#91; nCur, 2 &#93; &#41;; SIZE 200, 200; HEADERS "Test1", "Test2" oBrw&#58;bLogicLen = &#123; || Len&#40; aArray &#41; &#125; oBrw&#58;bGoTop = &#123; || nCur &#58;= 1 &#125; oBrw&#58;bGoBottom = &#123; || nCur &#58;= Len&#40; aArray &#41; &#125; oBrw&#58;bSkip = &#123; | nSkip | Skipper&#40; aArray, @nCur, nSkip &#41; &#125; oBrw&#58;cAlias = "ARRAY" oBrw&#58;SetFocus&#40;&#41; ACTIVATE WINDOW oWnd RETURN NIL STATIC FUNCTION SKIPPER&#40; aArray, nCur, nSkip &#41; LOCAL nOld &#58;= nCur nCur += nSkip IF nCur > LEN&#40; aArray &#41;; nCur = LEN&#40; aArray &#41;; ENDIF IF nCur < 1; nCur = 1; ENDIF RETURN nCur - nOld[/code:11g7m09t] EMG
Browsing empty arrays
Thanks John, I was trying to avoid having an element in the array at the beginning. Think I may have a solution, do as you suggest and then: oAddOrder:bStart:={| |aSize(aOrder,0)} this avoids the array error and starts the browse with an empty array. I was trying to maintain code compatibility between FW and FWH. Thanks
Brush & Fondos & Controles
Buenos dias foro, hoy la cosa va de fondos (brush) en diálogos: Tengo un diálogo (desde recursos con un brush) que tiene 1 folder, el problema está en que la parte superior del folder (donde están las pestañas) tiene un fondo que llega hasta la izquierda, que tapa el brush que tiene el diálogo, ¿cómo puedo solucionarlo?, he probado ltransparent, ..., pero no lo soluciono. MUCHAS GRACIAS.
Brush & Fondos & Controles
Mike, Puedes poner la imagen en <!-- w --><a class="postlink" href="http://www.imageshack.us">www.imageshack.us</a><!-- w --> y aqui el link para poder verlo ? gracias
Brush & Fondos & Controles
Creo que lo he hecho correctamente: Ahi va [url=http&#58;//imageshack&#46;us:28e8gozj][img:28e8gozj]http&#58;//img170&#46;imageshack&#46;us/img170/1084/foldersmc5&#46;png[/img:28e8gozj][/url:28e8gozj]
Brush & Fondos & Controles
Mike, Te refieres a la banda gris a la derecha de las pestañas ?
Brush & Fondos & Controles
Exactamente.
Brush & Fondos & Controles
Has probado a hacer oFolder:SetColor( ..., .... ) ?
Brush & Fondos & Controles
No lo he probado Antonio <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> , porque no quiero asignarle ningún color, sino que sea transparente, y que lo que se vea sea el brush de fondo del dialogo. Si eso se puede conseguir con setcolor, ¿cuál sería?. MUCHAS GRACIAS.
Brush & Fondos & Controles
Mike, Transparente no se puede hacer salvo que se hagan cambios internos en la propia clase de Windows en el pintado. Si el fondo del diálogo es un color, lo que tal vez se pueda hacer es asignarle ese color al folder y ver si cambia el color de esa franja.
Brush & Fondos & Controles
[quote="Mike Serra":2gog4bnv]Buenos dias foro, hoy la cosa va de fondos (brush) en diálogos: Tengo un diálogo (desde recursos con un brush) que tiene 1 folder, el problema está en que la parte superior del folder (donde están las pestañas) tiene un fondo que llega hasta la izquierda, que tapa el brush que tiene el diálogo, ¿cómo puedo solucionarlo?, he probado ltransparent, ..., pero no lo soluciono. MUCHAS GRACIAS.[/quote:2gog4bnv] Mike, Yo tuve/tengo ese mismo problema. Al principio no entendia lo que pasaba, porque veia que en otras aplicaciones Windows si funcionaba transparente. Una vez que me di cuenta de que el problema es que no se hacia transparente opte por alargar la ultima pestaña hasta el total del folder... pero no me gustaba porque no quedaba "al pelo" y ademas lo tenia que hacer manualmente. Al final opte por declarar el folder con un style de marco... no me acuerdo que style es... la idea es que alrededor del folder me pinta un recuadro y ya queda algo mas pasable... al menos a mi gusto. Saludos
Brush a xBrowse?
Hola Foreros: Cómo pongo el BRUSH a un xBrowse? Saludos
Brush a xBrowse?
Armando Look at sample TestXbr3.prg [code=fw:2zvymgot]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> ownd <span style="color: #0000ff;">ALIAS</span> cAlias ;<br />      AUTOSORT <span style="color: #0000ff;">AUTOCOLS</span> FOOTERS FASTEDIT LINES CELL ;<br />      BACKGROUND <span style="color: #ff0000;">'PAPER'</span><br /> </div>[/code:2zvymgot] From xBrowse.Ch [code=fw:2zvymgot]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #000000;">&#91;</span> BACKGROUND <uBack> <span style="color: #000000;">&#91;</span> <bckmode: <span style="color: #000000;">TILED</span>, STRETCH, FILL, <span style="color: #0000ff;">VERTICAL</span>, HORIZONTAL> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br /> </div>[/code:2zvymgot] Rick Lipkin
Brush a xBrowse?
Rick: Thanks so much, I will Regards
Brush en Browse
Tengo un pequeño xbrowse que se dibuja dentro de un folder, no ocupa todo el folder sólo lo redefinido en el recurso "oBrw:CreateFromResource( 120 )" Este browse, que toma los datos de un array, se actualiza en tiempo de ejecución según una serie de condiciones. Cada vez que se tiene que actulizar el browse llamo a: oBrw:SetArray( aArr ) He detectado, con checkres(), que no se limpia el brush asignado al browse. [code=fw:2714q74s]<div class="fw" id="{CB}" style="font-family: monospace;">...<br /><span style="color: #0000ff;">BRUSH</span>,<span style="color: #000000;">1594890193</span>,TGHE_XBROWSE:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">882</span><span style="color: #000000;">&#41;</span>->__OBJSENDMSG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->OSEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->ASEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">197</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">638</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">298</span><span style="color: #000000;">&#41;</span>->TFOLDER:<span style="color: #00C800;">DEFAULT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">406</span><span style="color: #000000;">&#41;</span>->TFOLDER:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">341</span><span style="color: #000000;">&#41;</span>->__OBJSENDMSG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->OSEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->ASEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">197</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">638</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">298</span><span style="color: #000000;">&#41;</span>->TGHE_EDITDAT:<span style="color: #000000;">ONINIT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1695</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_EDITDAT:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">199</span><span style="color: #000000;">&#41;</span>->TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">973</span><span style="color: #000000;">&#41;</span>->TMDICHILD:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">248</span><span style="color: #000000;">&#41;</span>->TGHE_EDITDAT:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">199</span><span style="color: #000000;">&#41;</span>->ARTICULO<span style="color: #000000;">&#40;</span><span style="color: #000000;">77</span><span style="color: #000000;">&#41;</span>->PS_ACTION<span style="color: #000000;">&#40;</span><span style="color: #000000;">37</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>LARTICULO<span style="color: #000000;">&#40;</span><span style="color: #000000;">22</span><span style="color: #000000;">&#41;</span>->TGHE_BUSQ:<span style="color: #000000;">EJECUTAR</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">518</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_BUSQ:<span style="color: #000000;">BUILDCONTROLS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">393</span><span style="color: #000000;">&#41;</span>->TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">465</span><span style="color: #000000;">&#41;</span>->TGHE_BUSQ:<span style="color: #000000;">KEYDOWN</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">684</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_BUSQ:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">286</span><span style="color: #000000;">&#41;</span>->TGHE_XBROWSE:<span style="color: #000000;">LDBLCLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">3560</span><span style="color: #000000;">&#41;</span>->TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1699</span><span style="color: #000000;">&#41;</span>->TGHE_XBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">11634</span><span style="color: #000000;">&#41;</span>->_FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3159</span><span style="color: #000000;">&#41;</span>->WINRUN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">980</span><span style="color: #000000;">&#41;</span>->MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span><br />...</div>[/code:2714q74s] Así que cada vez que llamo a SetArray(), deja el anterior brush sin cerrar. Revisando el código de la clase xbrowse e visto como solucionarlo En el método Adjust se crea el nuevo brush pero no se elimina el anterior [code=fw:2714q74s]<div class="fw" id="{CB}" style="font-family: monospace;">...<br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBrushRecSel</span><>NIL <span style="color: #B900B9;">//fgondi</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBrushRecSel</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />::<span style="color: #000000;">hBrushRecSel</span> := CreateSolidBrush<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nRecSelColor</span> <span style="color: #000000;">&#41;</span><br />...<br /> </div>[/code:2714q74s]
Brush en Browse
Por ahí digo una tontería pero para actualizar el array en un xbrowse la intruccion que yo uso es oBrw : aArrayData := aArray y funciona perfectamente. Salu2
Brush en Browse
Horacio, Además de ::aArrayData := aArray tendrás que refrescar el browse y dependiendo de las condiones del nuevo array y de como tengas defino el browse (ej. WIN7) tendrás que llamar a Adjust() Por lo que al final es lo mismo, ya que setarray() y si ya estan difinidas las columnas establece el nuevo array y llama a Adjust y Refresh. Y tengo el problema en el método Adjust(). No es un error, sólo es que el no vacia el antiguo brush, por lo que a medida se usa el sistema se va cargando los recursos.
Brush en Browse
Fer, yo detecte con el checkres que se queda en memoria la imagen que pongo de fondo en el xbrowse... y como comentas el 90% de los xbrowse que tengo en el sistema usan imagenes de fondo, asi que pues con el uso continuo los recursos se consumen rapido, voy a probar tu solucion a ver si me funciona, por aqui esta mi post... <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=23502&start=15">viewtopic.php?f=6&t=23502&start=15</a><!-- l --> saludos paco
Brush en Browse
Parece que ya solucioné modificando la clase Destroy() de la xbrowse agregando estas lineas, if ::oBrush:hBitmap != 0 .and. ValType( ::oBrush:Cargo ) == 'N' DeleteObject( ::oBrush:hBrush ) endif nomas que lo confirme Antonio a ver si es correcto saludos paco
Brush en Browse
Hola Francisco. Que version usas?. Yo uso la Ver. 1006 y tengo el mismo problema. Mi version tiene este codigo en el METHOD DESTROY(): if ::oBrush:hBitmap != 0 .and. ValType( ::oBrush:Cargo ) == 'N' .and. ; ::oBrush:hBrush != ::oBrush:Cargo // resized brush DeleteObject( ::oBrush:Cargo ) endif Estos no los elimina: DEFINE BRUSH oBrush FILENAME cBrush DEFINE FONT oFont NAME "MS SANS SERIF" SIZE 0, -10 BOLD DEFINE FONT oFont2 NAME "MS SANS SERIF" SIZE 0, -14 BOLD oBrw:SetBackGround(".\STONE.BMP") Al salir, hago esto: oFont:End() //esta no la elimina oFont2:End() //esta SI oBrush:End() //este tampoco Este es el CheckRes.txt 21/02/2012 14:02:48: BRUSH,-1693446056,TBITMAP:SETCOLOR(2462)->TBITMAP:DEFINE(265)->MAIN(101) 21/02/2012 14:02:48: FONT,-1861610563,MAIN(102) 21/02/2012 14:02:48: BMP,117773251,TMDIFRAME:HANDLEEVENT(0)->_FWH(3391)->SHOWWINDOW(0)->TMDIFRAME:ACTIVATE(959)->MAIN(130) 21/02/2012 14:02:48: BMP,923079686,TMSGBAR:PAINT(428)->TMSGBAR:HANDLEEVENT(0)->_FWH(3391)->UPDATEWINDOW(0)->TMDIFRAME:ACTIVATE(960)->MAIN(130) 21/02/2012 14:02:48: FONT,-1794501682,CREDITOS(80)->(b)MAIN(109)->TBTNBMP:CLICK(463)->TBTNBMP:LBUTTONUP(658)->TWINDOW:HANDLEEVENT(0)->TCONTROL:HANDLEEVENT(1483)->TBTNBMP:HANDLEEVENT(1437)->_FWH(3391)->WINRUN(0)->TMDIFRAME:ACTIVATE(976)->MAIN(130) 21/02/2012 14:02:48: BMP,1929712564,CREDITOS(346)->(b)MAIN(109)->TBTNBMP:CLICK(463)->TBTNBMP:LBUTTONUP(658)->TWINDOW:HANDLEEVENT(0)->TCONTROL:HANDLEEVENT(1483)->TBTNBMP:HANDLEEVENT(1437)->_FWH(3391)->WINRUN(0)->TMDIFRAME:ACTIVATE(976)->MAIN(130) 21/02/2012 14:02:48: BRUSH,672142353,TXBROWSE:SETBACKGROUND(4799)->CREDITOS(346)->(b)MAIN(109)->TBTNBMP:CLICK(463)->TBTNBMP:LBUTTONUP(658)->TWINDOW:HANDLEEVENT(0)->TCONTROL:HANDLEEVENT(1483)->TBTNBMP:HANDLEEVENT(1437)->_FWH(3391)->WINRUN(0)->TMDIFRAME:ACTIVATE(976)->MAIN(130) 21/02/2012 14:02:48: ==================================================================================================== Talvez Antonio tenga tiempo y nos ayuda con esto. Saludos.
Brush en Browse
Francisco, El cambio que le hice a la Destroy() no es igual a la que usas, prueba a dejarla como la muestro a ver si te funciona.. utilizo la 1103, prueba a usar: deleteobject( oFont ) deleteobject( oBrush ) de hecho si es un rollo, revisar que objetos se te quedan en memoria, yo revise nuevamente todo el sistema por partes, y tumbe 6 font que como me hicieron batallar, pero ya lsa saque, unicamente hay una FONT que no me mata y se el proceso que la genera, pero no le veo nada anormal, es una impresion, la compare con otra impresion igual pero con datos diferentes y no la finaliza. Te recomiendo que revises parate por parte lo que picas, es entrar y salir muchas veces, pero asi lo detectaras rapido. Lo que pudiera ser que tuvieras un RETURN antes del finalizar tu dialogo donde cargas las font y no las finalices, y parece que la btnbmp y msgbar por ahi traes el problema con unas imagenes y una font.. ese es mi punto de vista... a ver si Antonio no echa una pista.. saludos paco
Brush en Browse
[quote="fgondi":1971wz1i]Tengo un pequeño xbrowse que se dibuja dentro de un folder, no ocupa todo el folder sólo lo redefinido en el recurso "oBrw:CreateFromResource( 120 )" Este browse, que toma los datos de un array, se actualiza en tiempo de ejecución según una serie de condiciones. Cada vez que se tiene que actulizar el browse llamo a: oBrw:SetArray( aArr ) He detectado, con checkres(), que no se limpia el brush asignado al browse. [code=fw:1971wz1i]<div class="fw" id="{CB}" style="font-family: monospace;">...<br /><span style="color: #0000ff;">BRUSH</span>,<span style="color: #000000;">1594890193</span>,TGHE_XBROWSE:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">882</span><span style="color: #000000;">&#41;</span>->__OBJSENDMSG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->OSEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->ASEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">197</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">638</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">298</span><span style="color: #000000;">&#41;</span>->TFOLDER:<span style="color: #00C800;">DEFAULT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">406</span><span style="color: #000000;">&#41;</span>->TFOLDER:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">341</span><span style="color: #000000;">&#41;</span>->__OBJSENDMSG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->OSEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span>->HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->ASEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">197</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">638</span><span style="color: #000000;">&#41;</span>->TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">298</span><span style="color: #000000;">&#41;</span>->TGHE_EDITDAT:<span style="color: #000000;">ONINIT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1695</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_EDITDAT:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">199</span><span style="color: #000000;">&#41;</span>->TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">973</span><span style="color: #000000;">&#41;</span>->TMDICHILD:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">248</span><span style="color: #000000;">&#41;</span>->TGHE_EDITDAT:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">199</span><span style="color: #000000;">&#41;</span>->ARTICULO<span style="color: #000000;">&#40;</span><span style="color: #000000;">77</span><span style="color: #000000;">&#41;</span>->PS_ACTION<span style="color: #000000;">&#40;</span><span style="color: #000000;">37</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>LARTICULO<span style="color: #000000;">&#40;</span><span style="color: #000000;">22</span><span style="color: #000000;">&#41;</span>->TGHE_BUSQ:<span style="color: #000000;">EJECUTAR</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">518</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_BUSQ:<span style="color: #000000;">BUILDCONTROLS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">393</span><span style="color: #000000;">&#41;</span>->TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">465</span><span style="color: #000000;">&#41;</span>->TGHE_BUSQ:<span style="color: #000000;">KEYDOWN</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">684</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGHE_BUSQ:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">286</span><span style="color: #000000;">&#41;</span>->TGHE_XBROWSE:<span style="color: #000000;">LDBLCLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">3560</span><span style="color: #000000;">&#41;</span>->TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1699</span><span style="color: #000000;">&#41;</span>->TGHE_XBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">11634</span><span style="color: #000000;">&#41;</span>->_FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3159</span><span style="color: #000000;">&#41;</span>->WINRUN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>->TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">980</span><span style="color: #000000;">&#41;</span>->MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span><br />...</div>[/code:1971wz1i] Así que cada vez que llamo a SetArray(), deja el anterior brush sin cerrar. Revisando el código de la clase xbrowse e visto como solucionarlo En el método Adjust se crea el nuevo brush pero no se elimina el anterior [code=fw:1971wz1i]<div class="fw" id="{CB}" style="font-family: monospace;">...<br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBrushRecSel</span><>NIL <span style="color: #B900B9;">//fgondi</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBrushRecSel</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />::<span style="color: #000000;">hBrushRecSel</span> := CreateSolidBrush<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nRecSelColor</span> <span style="color: #000000;">&#41;</span><br />...<br /> </div>[/code:1971wz1i][/quote:1971wz1i] Fernando, Muchas gracias, incluido para el próximo build 12.02 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->