topic
stringlengths
1
63
text
stringlengths
1
577k
Browse and lower case keys
[quote="nageswaragunupudi":eoa7vzjz]GetKeyState( VK_SHIFT ) --> Shift key is pressed[/quote:eoa7vzjz] Hi. This does not work when "CAPS LOCK" is turned off and no SHIFT pressed. Do you know how do I know CAPS LOCK state ? [[]] Maurício Ventura Faria
Browse and lower case keys
Maurício: [code=fw:3e81xqyr]<div class="fw" id="{CB}" style="font-family: monospace;">cKey:= CHR<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span></div>[/code:3e81xqyr] Regards, saludos.
Browse colocar en color una linea de registro
Estoy utilizando el objeto TXBrowse, para mostrar un archivo .DBF, lo hace perfecto, la tarea ahora es mostrar en un color distinto los registros 10, 20 y 30, osea los multiplos de 10. oBrw := TXBrowse():New(oChild) Desde ya se agradece cuaquier aporte. Saludos
Browse colocar en color una linea de registro
Hola, prueba algo asi [code=fw:3lw0rasq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oGrid:<span style="color: #000000;">bClrStd</span> &nbsp;:= <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> ordKeyNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> % <span style="color: #000000;">10</span> == <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span> CLR_BLUE, CLR_WHITE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> CLR_RED, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3lw0rasq] saludos Marcelo
Browse colocar en color una linea de registro
Marcelo, exelente. Se agradece. [quote="Marcelo Via Giglio":1klhvutl]Hola, prueba algo asi [code=fw:1klhvutl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oGrid:<span style="color: #000000;">bClrStd</span>  := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> ordKeyNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> % <span style="color: #000000;">10</span> == <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span> CLR_BLUE, CLR_WHITE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> CLR_RED, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:1klhvutl] saludos Marcelo[/quote:1klhvutl]
Browse colour corruptions with bitmaps
Hi, Since upgrading to 8.12 i've noticed that the colours of bitmaps in a browse (twbrowse?) are corrupted: [img:3q5183g5]http&#58;//i714&#46;photobucket&#46;com/albums/ww142/PANDLSOFTWARE/Test&#46;jpg[/img:3q5183g5] The first 2 columns should be the same colour as the rest of the line - also if you scroll down the list the highlight bar turns the bitmap white. Any ideas how to fix this? Many Thanks Pete
Browse colour corruptions with bitmaps
Pete, Are you using a codeblock to set the browse colors or just fixed RGB Colors (numeric value) ?
Browse colour corruptions with bitmaps
I'm using a code block. [code:fvfhfzpr] oBrw&#58;nClrpane &#58;= { || SetBack() } oBrw&#58;nClrText &#58;= { || SetFore() } oBrw&#58;nClrforefocus &#58;= { || SetFBack() } oBrw&#58;nClrbackfocus &#58;= { || SetFFore() } STATIC FUNCTION SetBack LOCAL RetCol &#58;= 0 ScedColInit() IF SELECT("SCHEDULE") <> 0 &#46;AND&#46; ASCAN(SchedArr,SCHEDULE->(RECNO())) <> 0 RetCol &#58;= mGrpBack ELSEIF ORDSCED->OR_FROMDAT < m_scdate RetCol &#58;= mOverBack ELSEIF !EMPTY(ORDSCED->OR_VEHICLE) RetCol &#58;= mAlocBack ELSE RetCol &#58;= mNormBack ENDIF RETURN RetCol STATIC FUNCTION SetFore LOCAL RetCol &#58;= 0 IF SELECT("SCHEDULE") <> 0 &#46;AND&#46; ASCAN(SchedArr,SCHEDULE->(RECNO())) <> 0 RetCol &#58;= mGrpFore ELSEIF ORDSCED->OR_FROMDAT < m_scdate RetCol &#58;= mOverFore ELSEIF !EMPTY(ORDSCED->OR_VEHICLE) RetCol &#58;= mAlocFore ELSE RetCol &#58;= mNormFore ENDIF RETURN RetCol STATIC FUNCTION SetFBack LOCAL RetCol &#58;= 0 IF SELECT("SCHEDULE") <> 0 &#46;AND&#46; ASCAN(SchedArr,SCHEDULE->(RECNO())) <> 0 RetCol &#58;= mGrpFocB ELSEIF ORDSCED->OR_FROMDAT < m_scdate RetCol &#58;= mOverFocB ELSEIF !EMPTY(ORDSCED->OR_VEHICLE) RetCol &#58;= mAlocFocB ELSE RetCol &#58;= mNormFocB ENDIF RETURN RetCol STATIC FUNCTION SetFFore LOCAL RetCol &#58;= 0 IF SELECT("SCHEDULE") <> 0 &#46;AND&#46; ASCAN(SchedArr,SCHEDULE->(RECNO())) <> 0 RetCol &#58;= mGrpFocF ELSEIF ORDSCED->OR_FROMDAT < m_scdate RetCol &#58;= mOverFocF ELSEIF !EMPTY(ORDSCED->OR_VEHICLE) RetCol &#58;= mAlocFocF ELSE RetCol &#58;= mNormFocF ENDIF RETURN RetCol [/code:fvfhfzpr]
Browse colour corruptions with bitmaps
Pete, What FWH build were you using previously to 8.12 ? The simplest way should be to compare wbrowse.prg from both versions and see what changes may be affecting your code.
Browse colour corruptions with bitmaps
Pete, I just reread your first post and noticed that you were talking about the bitmaps! ops, my mistake <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Please post here some of the bitmaps that you are using. You can use <!-- w --><a class="postlink" href="http://www.imageshack.us">www.imageshack.us</a><!-- w --> to upload the images and post here the urls. Thanks
Browse colour corruptions with bitmaps
Urls to bmps: <!-- m --><a class="postlink" href="http://img407.imageshack.us/img407/7435/68549894jp2.png">http://img407.imageshack.us/img407/7435/68549894jp2.png</a><!-- m --> <!-- m --><a class="postlink" href="http://img407.imageshack.us/img407/7636/confirmaf4.png">http://img407.imageshack.us/img407/7636/confirmaf4.png</a><!-- m --> <!-- m --><a class="postlink" href="http://img407.imageshack.us/img407/4888/tickedfk9.png">http://img407.imageshack.us/img407/4888/tickedfk9.png</a><!-- m --> Just to add - the bmps are held in a resource file
Browse colour corruptions with bitmaps
Pete, Please change the background color of your bitmaps to a color not used in the image, like this: [url=http&#58;//imageshack&#46;us:ol3zm20w][img:ol3zm20w]http&#58;//img108&#46;imageshack&#46;us/img108/503/captureew1&#46;png[/img:ol3zm20w][/url:ol3zm20w]
Browse colour corruptions with bitmaps
Just tried it and no difference i'm afraid - also i noticed that the highlight bar doesnt highlight the bitmap columns
Browse colour corruptions with bitmaps
Antonio, Just linked in my previous version of wbrowse.prg (7.12) and it works fine - i have done a file compare between the two files and i think the problem is in the function wBrwLine If i comment the nRowpos line as detailed below, this fixes the problem [code:2v70sn0a]static function wBrwLine( hWnd, hDC, nRowPos, aValues, aColSizes,; nColPos, nClrText, nClrPane,; hFont, lTree, aJustify, nPressed, nLineStyle,; nColAct, lFocused, oVScroll, bLogicLen, nClrTxt, nClrBack ) local nTxtHeight, hOldFont local nColStart &#58;= -1 local nWidth &#58;= WndWidth( hWnd ) - If( oVScroll != nil &#46;and&#46; ; Eval( bLogicLen ) > 1,; GetSysMetrics( SM_CYHSCROLL ) + 3, 0 ) local nRow &#58;= nRowPos, nTop, nBottom, nLeft, nRight, n local lReleaseDC &#58;= &#46;f&#46; local hPen, hOld, hBrush DEFAULT lTree &#58;= &#46;f&#46; if Empty( hDC ) hDC = GetDC( hWnd ) lReleaseDC = &#46;t&#46; endif hOldFont = SelectObject( hDC, hFont ) nTxtHeight = GetTextHeight( hWnd, hDC ) + 1 nTop = nTxtHeight * nRow nBottom = nTop + nTxtHeight - 1 SetTextColor( hDC, If( ValType( nClrText ) == "B",; nClrText &#58;= Eval( nClrText ), nClrText ) ) //if nRowPos == 0 SetBkColor( hDC, If( ValType( nClrPane ) == "B",; nClrPane &#58;= Eval( nClrPane ), nClrPane ) ) //endif[/code:2v70sn0a] However there is one more difference between the two versions: [code:2v70sn0a] if ValType( aValues&#91; n &#93; ) == "N" hBrush = CreateSolidBrush( If( nColAct != nil, nClrBack, GetBkColor( hDC ) ) ) hOld = SelectObject( hDC, hBrush ) FillRect( hDC, { nTop, nLeft, nBottom, nRight + If( ( nLineStyle == ; LINES_NONE &#46;or&#46; nLineStyle == LINES_H_GRAY &#46;or&#46; nLineStyle == ; LINES_H_BLACK ) &#46;and&#46; nRowPos != 0, 2, 0 ) }, hBrush ) DrawMasked( hDC, aValues&#91; n &#93;, nTop, nLeft + 0 ) SelectObject( hDC, hOld ) DeleteObject( hBrush ) else if nColAct != nil &#46;and&#46; n == nColAct SetTextColor( hDC, nClrText ) SetBkColor( hDC, nClrPane ) else if nRowPos != 0 SetTextColor( hDC, If( nColAct != nil, If( ValType( nClrTxt ) == "B",; Eval( nClrTxt, n ), nClrTxt ),; If( ValType( nClrText ) == "B", Eval( nClrText, n ), nClrText ) ) ) <-----This is new in 8&#46;12 over 7&#46;12 SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",; Eval( nClrBack, n ), nClrBack ),; If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) ) <-----This is new in 8&#46;12 over 7&#46;12 endif endif if ! lTree if nRowPos == 0 &#46;and&#46; ( IsAppThemed() &#46;and&#46; IsThemeActive() ) <--- The &#46;and&#46; isthemeactive() is new in 8&#46;12 over 7&#46;12 DrawHeader( hWnd, hDC, nTop - 1, nLeft, nBottom, nRight, AnsiToOem( aValues&#91; n &#93; ) ) else if aJustify != nil &#46;and&#46; aJustify&#91; n &#93; SetTextAlign( hDC, TA_RIGHT ) ExtTextOut( hDC, nTop, nRight - 2,; { nTop, nLeft, nBottom, nRight + If( (nLineStyle == ; LINES_NONE &#46;or&#46; nLineStyle == LINES_H_GRAY &#46;or&#46; ; nLineStyle == LINES_H_BLACK ) &#46;and&#46; nRowPos != 0, 2, 0 ) },; //socs + If((nLineStyle == LINES_NONE &#46;OR&#46; nLineStyle == LINES_H_GRAY &#46;OR&#46; nLineStyle == LINES_H_BLACK) &#46;AND&#46; nRowPos#0 ,2,0),; cValToChar( aValues&#91; n &#93; ) ) else SetTextAlign( hDC, TA_LEFT ) ExtTextOut( hDC, nTop, nLeft + 2,; { nTop, nLeft, nBottom, nRight + If( ( nLineStyle == ; LINES_NONE &#46;or&#46; nLineStyle == LINES_H_GRAY &#46;or&#46; ; nLineStyle == LINES_H_BLACK ) &#46;and&#46; nRowPos != 0, 2, 0 ) },; cValToChar( aValues&#91; n &#93; ) ) endif endif else DrawText( hDC, cValToChar( aValues&#91; n &#93; ),; { nTop, nLeft + 4, nBottom, nRight } ) endif endif [/code:2v70sn0a] My knowledge of modifying this code is limited so what harm would it be to comment out the first line or does it need modifying?
Browse colour corruptions with bitmaps
Pete, You are right, its a bug in Class TWBrowse. Just remove these two lines and it should work fine: [code:hw9gyqlm] static function wBrwLine( hWnd, hDC, nRowPos, aValues, aColSizes,; &#46;&#46;&#46; SetTextColor( hDC, If( ValType( nClrText ) == "B",; nClrText &#58;= Eval( nClrText ), nClrText ) ) //if nRowPos == 0 SetBkColor( hDC, If( ValType( nClrPane ) == "B",; nClrPane &#58;= Eval( nClrPane ), nClrPane ) ) //endif [/code:hw9gyqlm] Here it is working fine with those changes.
Browse colour corruptions with bitmaps
Thanks for your response Antonio - will this be fixed in the next release (9.01)? Many Thanks Pete
Browse colour corruptions with bitmaps
Pete, Yes, we have already included it for the next 9.01 build Thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Browse com Merge
Alguem sabe dizer se é possivel utilizar esta opção como é feita no EXCEL
Browse command
Can I edit the browse command method so I can add fields or footer OR footer only enable with txbrowse class ?
Browse completo con mysql
Estoy practicando los ejemplos, quiero hacer un browse completo pero con conexión mysql as: Me conecto bien, pero el l browse lo muestra vacio. FUNCTION Main() LOCAL o, oRs, hRes,oBrw,oo oo := WDO():Rdbms( 'MYSQL', "127.0.0.1", "root", "19585287", "indfundacion", 3307 ) IF oo:lConnect ? 'Connected !', '<b>Versión RDBMS MySql', oo:Version() ELSE ? oo:cError ENDIF cSql := "select * from contrib limit 5" IF !empty( hRes := oo:Query( cSql ) ) ? '<br><b>Total Select: </b>', oo:Count( hRes ) aData := oo:FetchAll( hRes ) endif DEFINE WEB oWeb TITLE 'Basic Browse' TABLES INIT DEFINE FORM o HTML o INLINE '<h3>Basic Browse</h3><hr>' INIT FORM o DEFINE BROWSE oBrw ID 'ringo' HEIGHT 400 EXPORT SEARCH PRINT TOOLS OF o ADD oCol TO oBrw ID 'nit' HEADER 'IDENTIFICACION' ALIGN 'right' ADD oCol TO oBrw ID 'razon' HEADER 'RAZON SOCIAL' SORT ADD oCol TO oBrw ID 'direcc' HEADER 'DIRECCION' WIDTH 70 INIT BROWSE oBrw DATA aData END FORM o RETU NIL
Browse completo con mysql
Ya lo resolví, viendo el video donde Charly explica Creación de un CRUD usando el Browse, paso a paso. Asi: // -------------------------------------------------------------- // Title......: WDO Web Database Objects // Description: Test WDO // Date.......: 28/07/2019 // // {% LoadHRB( '/lib/wdo/wdo.hrb' ) %} // Loading WDO lib // {% HB_SetEnv( 'WDO_PATH_MYSQL', "c:/xampp/htdocs/" ) %} // Usuarios Xampp // {% LoadHrb( 'lib/tweb/tweb.hrb' ) %} // -------------------------------------------------------------- #include {% TWebInclude() %} FUNCTION Main() LOCAL o, oRs, hRes,oBrw,oo oo := WDO():Rdbms( 'MYSQL', "127.0.0.1", "root", "123456", "indfundacion", 3307 ) IF oo:lConnect ? 'Connected !', '<b>Versión RDBMS MySql', oo:Version() ? 'Adolfredo Martinez esta es tu Version:', twebversion() ELSE ? oo:cError ENDIF cSql := "select nit, razon, direcc, tiporegime from contrib" IF !empty( hRes := oo:Query( cSql ) ) ? '<br><b>Total Select: </b>', oo:Count( hRes ) aData := oo:FetchAll( hRes, .t. ) endif DEFINE WEB oWeb TITLE 'Basic Browse' TABLES INIT DEFINE FORM o HTML o INLINE '<h3>Basic Browse</h3><hr>' INIT FORM o DEFINE BROWSE oBrw ID 'ringo' HEIGHT 400 CLICKSELECT EXPORT SEARCH PRINT TOOLS OF o oBrw:lStripped := .t. ADD oCol TO oBrw ID 'nit' HEADER 'CODIGO' ALIGN 'left' ADD oCol TO oBrw ID 'razon' HEADER 'RAZON' ALIGN 'left' SORT ADD oCol TO oBrw ID 'tiporegime' HEADER 'TIPOREGIMEN' ALIGN 'left' WIDTH 200 INIT BROWSE oBrw DATA aData END FORM o RETU NIL [url:3n3t046y]https&#58;//subir-imagen&#46;com/i/RA2Mm[/url:3n3t046y]
Browse con Combobox
Alguien tiene por aqui un ejemplo que una columna sea editable , pero con un combo... ? A ser posible, con la TWBrowse de Hernan o en su defecto la TSBrowse de Manuel.. No encuentro los samples de Hernan, ¿ sabe alguien DONDE estan ? Gracias Rafa Carmona
Browse con Combobox
Rafa: Toda la gracia esta en el evento que edita la celda, que recibe como parametro POR REFERENCIA la variable que deseas editar: oBrw:lEditCol(oBrw:nColAct,@xVar,cPict,bValid,RGB(0,0,0),Rgb(255,255,255)) @xVar es el valor que tu quieres editar, puedes hacer por ejemplo xVar := 0 o bien xVar := SPACE(20) y ahora la magia: xVar := {"enero", "febrero","marzo","abril"....} Cuando la variable es un ARRAY, AUTOMATICAMENTE, al momenot de editar se crea un combo. Asi de facil, parece una tonteria, pero realmente es una estupidez.
Browse con Combobox
[quote="RF":ag2epfvm]Rafa: Toda la gracia esta en el evento que edita la celda, que recibe como parametro POR REFERENCIA la variable que deseas editar: oBrw:lEditCol(oBrw:nColAct,@xVar,cPict,bValid,RGB(0,0,0),Rgb(255,255,255)) @xVar es el valor que tu quieres editar, puedes hacer por ejemplo xVar := 0 o bien xVar := SPACE(20) y ahora la magia: xVar := {"enero", "febrero","marzo","abril"....} Cuando la variable es un ARRAY, AUTOMATICAMENTE, al momenot de editar se crea un combo. Asi de facil, parece una tonteria, pero realmente es una estupidez.[/quote:ag2epfvm] Bueno, Rene ya de paso, me puedes pasar un ejemplo funcional ? Perdona que en estos momentos no tengo mucha lucidez con el tema de los browses. Tengo que crear un browse en runtime que las celdas sean todas con combobox, y ademas , modifiquen directamente en la dbf. He intentando usar la TsBrowse 7.0 de Manuel , y la verdad , funciona flancamente mal, muy mal. Saludos Rafa Carmona
Browse con Combobox
Tu pide por esa boca.... Enviado a tu privado
Browse con Combobox
[quote="RF":3a1p0u7n]Tu pide por esa boca.... Enviado a tu privado[/quote:3a1p0u7n] Podrias enviarme ese ejemplo? estoy confundido con una app que estoy haciendo. Gracias. Mail: <!-- e --><a href="mailto:goosfancito@gmail.com">goosfancito@gmail.com</a><!-- e -->
Browse con Combobox
con txbrowse lo hacemos de esta forma: oCol := oBrw3:aCols[ 1 ] oCol:nEditType := 1 oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, _saveCol1( o:nCreationOrder, v ), ) } static function _saveCol1( nCol, cValor ) local nRecno := (cAli)->( recno() ) dbselectArea(cAli) if nCol = 1 rlock() field->fecha := ctod(cValor) dbunlock() endif oBrw3:refresh() dbgoto( nRecno ) return saludos...
Browse con Combobox
Gracias.- [quote="sysctrl2":jyjks3sb]con txbrowse lo hacemos de esta forma: oCol := oBrw3:aCols[ 1 ] oCol:nEditType := 1 oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, _saveCol1( o:nCreationOrder, v ), ) } static function _saveCol1( nCol, cValor ) local nRecno := (cAli)->( recno() ) dbselectArea(cAli) if nCol = 1 rlock() field->fecha := ctod(cValor) dbunlock() endif oBrw3:refresh() dbgoto( nRecno ) return saludos...[/quote:jyjks3sb]
Browse con Combobox
Saludos Cordiales Colegas!!! Bueno para un Objeto oBrw yo lo he utilizado asi! [code:15fnuvvk] // Lista oCol&#58;=oBrw&#58;AddCol&#40;"VAL_TIPO"&#41; oCol&#58;cTitle &#58;="Tipo" oCol&#58;nWidth &#58;=200 oCol&#58;aItems &#58;=&#123;"EFECTIVO","CHEQUE","TARJETA CR","TARJETA DB","CESTA TIK","EGRESO"&#125; oCol&#58;aItemsData&#58;=&#123;"EFE","CHQ","TAR","TDB","CTK","EGR"&#125; oCol&#58;lPrimary &#58;=&#46;T&#46; // No puede Repetirse oCol&#58;lRepeat &#58;=&#46;F&#46; oCol&#58;nEditType &#58;=EDIT_GET_BUTTON [/code:15fnuvvk] Cuando utilizas la propiedad oCol:aItems y la llenas con un arreglo esta se convierte en un combobox Creo que es mas estupido que cualquiera de las anteriores!! Avisenos como les fue!!!
Browse con Dialog
Al maximizar un dialog que contiene un browse se puede redimensionar automaticamente o de alguna manera el Browse para que me ocupe todo el dialog. Graicas
Browse con Dialog
o como sabes si un dialog se ha maximizado para cambian de resoure
Browse con Dialog
Garbi, oDlg:SetClient( oBrowse )
Browse con Dialog
Me da el siguiente error: Error description: Error Objects/6 No Exp. Method: TDIALOG:SETCLIENT Codigo fuente: DEFINE DIALOG oDlg RESOURCE "HOJA" TITLE IIF( lNuevo,"AGREGAR" ,; oemtoansi("MODIFICACION / CONSULTA Presupuesto n§ ")+alltrim(transform(vnumero,"999,999")) ) REDEFINE GET gvfecha Var vfecha ID 102 OF oDlg REDEFINE say gvnombre Var vnombre ID 114 OF oDlg REDEFINE say gvref Var vref ID 116 OF oDlg REDEFINE BROWSE oBrwt ID 103 of oDlg oDlg:SetClient( oBrwt ) oBrwT:bKeyChar = { | nKey, nFlags | (lineas(nkey),oBrwt:refresh(),ftotal(),gvtotal:refresh())} ADD COLUMN to oBrwt DATA (ctemporal)->cantidad HEADER "Ctd" size 40 picture "99,999" ADD COLUMN to oBrwt DATA (ctemporal)->concepto HEADER "Articulo" size 500 ADD COLUMN to oBrwt DATA (ctemporal)->unitario HEADER "Precio" size 100 Picture "9,999,999.99" RIGHT ADD COLUMN to oBrwt DATA (ctemporal)->importe HEADER "Total" size 100 Picture "9,999,999.99" RIGHT REDEFINE say gvtotal Var vtotal ID 105 OF oDlg picture("9,999,999.99") REDEFINE get gvtdto Var vtdto ID 108 OF oDlg picture("999.99") valid ftotal() REDEFINE say gvdto Var vdto ID 109 OF oDlg picture("9,999,999.99") REDEFINE say gvbase Var vbase ID 110 OF oDlg picture("9,999,999.99") REDEFINE say gvtiva Var vtiva ID 111 OF oDlg picture("999.99") REDEFINE say gviva Var viva ID 112 OF oDlg picture("999,999.99") REDEFINE say gvttotal Var vttotal ID 104 OF oDlg picture("9,999,999.99") REDEFINE BTNBMP aBoton[1] ID 113 RESOURCE "DATOS" OF oDlg; tooltip oemtoansi("Datos Adicionales"); action (datosadicionales(),gvnombre:refresh()) REDEFINE BTNBMP aBoton[2] ID 504 RESOURCE "sumar" OF oDlg; tooltip oemtoansi("A¤adir Linea"); action (lineas(1),oBrwt:refresh()) REDEFINE BTNBMP aBoton[8] ID 107 RESOURCE "pgup" OF oDlg; tooltip oemtoansi("Insertar Linea"); action (lineas(19),oBrwt:refresh()) REDEFINE BTNBMP aBoton[3] ID 505 RESOURCE "restar" OF oDlg; tooltip oemtoansi("Borar Linea"); action (lineas(2),oBrwt:Refresh()) REDEFINE BTNBMP aBoton[4] ID 506 RESOURCE "cambIar" OF oDlg; tooltip oemtoansi("Modificar Linea"); action (lineas(13),oBrwt:Refresh()) REDEFINE BTNBMP aBoton[7] ID 106 RESOURCE "TEXTO" OF oDlg; tooltip oemtoansi("Nuevo"); action (lineas(14),oBrwt:Refresh()) REDEFINE BTNBMP aBoton[9] ID 117 RESOURCE "TARIFA" OF oDlg; tooltip oemtoansi("Acceso Tarifa"); action (ftarifas(1),ftotal(),oBrwt:gotop(),oBrwt:Refresh()) * action (lineas(14),oBrwt:Refresh()) REDEFINE COMBOBOX getvfpago Var vfpago ID 115 items tfpago OF odlg REDEFINE BTNBMP aBoton[5] ID 501 RESOURCE "ACEPTAR" OF oDlg ; ACTION ( aVret:= ActAcepta( aVars ) , lSalva := aVret[1] ,; IIF( lSalva , oDlg:End() , Obj(aVret[2]):SetFocus() )); MESSAGE "Guardar cambios y salir del catalogo" ; WHEN ( Acceso(oApp:aUsuarios,"PPTO", nActua ) ) REDEFINE BTNBMP aBoton[6] ID 502 RESOURCE "SALIR" OF oDlg ACTION (lSalva := falso, oDlg:End()) ; MESSAGE "Salir del catalogo" ACTIVATE DIALOG oDlg CENTER on init ftotal()
Browse con Dialog
Prueba con: oDlg:oClient = oBrowse
Browse con Dialog
Funciona. Se maximiza la ventana, pero que hago con los botones, los says y demas. Gracias
Browse con Dialog
Garbi, Si quieres reajustar las posiciones de todos los controles, has de hacerlo desde el codeblock bResized: [code:1xymoxdv] oDlg&#58;bResized = &#123; || CalculaNuevasPosiciones&#40; oDlg, oButton1, &#46;&#46;&#46; &#41; &#125; function CalculaNuevasPosiciones&#40; oDlg, oButton1, &#46;&#46;&#46; &#41; oButton1&#58;nTop = &#46;&#46;&#46; oButton2&#58;nLeft = &#46;&#46;&#46; &#46;&#46;&#46; [/code:1xymoxdv]
Browse con Dialog
Lo probare. Puedes poner un sample un poco más completo. Gracias Por ejemplo que pongo despues ntop:=
Browse con Dialog
El valor de la nueva posición de cada control.
Browse con Dialog
Antonio se pueden definir "paneles" cosa de poder separar por un lado los controles, botones, trees, etc, de la parte que uno quiera que ocupe el browse, por ejemplo menu en tree y botones sobre la izquierda en forma vertical, sobre la derecha desde la mitad y hasta el final un browse en otro panel, y que al redimensionar el dialogo se redimensione solo el panel que uno quiera, por ejemplo el sector del browse. Es solo estético nada importante, de hecho ahora meto todos los botones en una barra de botones y que se redimensione todo el resto, pero a veces hacen falta otras cosas en el dialogo. Gracias.
Browse con Vista de Window 7
Antonio Estoy usando la función que nos pasaste para que la barra se vea como Windows 7 Funciona bien, lo que quiero es que la primera columna sea de otro color. Hago lo siguiente: [code=fw:hk35ltr1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> Muestra<span style="color: #000000;">&#40;</span>aTexto<span style="color: #000000;">&#41;</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBig  <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Courier New"</span> <span style="color: #0000ff;">SIZE</span>  <span style="color: #000000;">0</span>,<span style="color: #000000;">-13</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Courier New"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-11</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">-9.8</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgView <span style="color: #0000ff;">FROM</span> nDWTop, nDWLeft <span style="color: #0000ff;">TO</span> nDWBottom, nDWRight <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Muestra archivo "</span><br />      <br />         oBrw1:= TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlgView <span style="color: #000000;">&#41;</span><br />         WITH OBJECT oBrw1<br />            :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br />            :<span style="color: #000000;">lRecordSelector</span>:=.F.<br />            :<span style="color: #000000;">nFreeze</span>:=<span style="color: #000000;">1</span><br />            :<span style="color: #000000;">nColSel</span>:=<span style="color: #000000;">2</span><br />            :<span style="color: #000000;">nHeaderHeight</span>:=<span style="color: #000000;">8</span><br />            :<span style="color: #000000;">lTransparent</span>=.T.<br />            :<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aTexto,.T. <span style="color: #000000;">&#41;</span><br />         END<br />         <br />         oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>:=.F. <br />         oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">25</span><br />         oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oDataFont</span>:=oFont1<br />                    oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cOrder</span>:=<span style="color: #ff0000;">"D"</span><br />                    oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span>:=AL_RIGHT<br />        oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span>CLR_GRAY,nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">230</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">240</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />         <br />         oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> := .F.<br />         oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oDataFont</span>:= <span style="color: #000000;">&#123;</span> || iif<span style="color: #000000;">&#40;</span> lFont,oFont,oBig<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />         AEval<span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> | oCol | oCol:<span style="color: #000000;">bPaintText</span> := <span style="color: #000000;">&#123;</span> | oCol, hDC, cData, aRect | PaintCol<span style="color: #000000;">&#40;</span> oCol, hDC, cData, aRect <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />    <br />       oBrw1:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <br />     <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgView <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br />...<br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> ROUNDBOX <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HDC hDC = <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   HBRUSH hBrush = <span style="color: #000000;">&#40;</span> HBRUSH <span style="color: #000000;">&#41;</span> GetStockObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />   HBRUSH hOldBrush = <span style="color: #000000;">&#40;</span> HBRUSH <span style="color: #000000;">&#41;</span> SelectObject<span style="color: #000000;">&#40;</span> hDC, hBrush <span style="color: #000000;">&#41;</span>;<br />   HPEN hPen, hOldPen ; <br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span><br />      hPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> COLORREF <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">else</span><br />      hPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, <span style="color: #000000;">&#40;</span> COLORREF <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   hOldPen = <span style="color: #000000;">&#40;</span> HPEN <span style="color: #000000;">&#41;</span> SelectObject<span style="color: #000000;">&#40;</span> hDC, hPen <span style="color: #000000;">&#41;</span>;<br />   hb_retl<span style="color: #000000;">&#40;</span> RoundRect<span style="color: #000000;">&#40;</span> hDC ,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>,<br />                                 hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />   SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldBrush <span style="color: #000000;">&#41;</span>;<br />   DeleteObject<span style="color: #000000;">&#40;</span> hBrush <span style="color: #000000;">&#41;</span>;<br />   SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldPen <span style="color: #000000;">&#41;</span>;<br />   DeleteObject<span style="color: #000000;">&#40;</span> hPen <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />*<br /><span style="color: #00C800;">function</span> PaintCol<span style="color: #000000;">&#40;</span> oCol, hDC, cData, aRect <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">VGetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == oBrw1:<span style="color: #000000;">nArrayAt</span> <span style="color: #B900B9;">//Cust->( OrdKeyNo() )</span><br />      GradientFill<span style="color: #000000;">&#40;</span> hDC, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">2</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">3</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">5</span>,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">220</span>, <span style="color: #000000;">235</span>, <span style="color: #000000;">252</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">193</span>, <span style="color: #000000;">219</span>, <span style="color: #000000;">252</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, .T. <span style="color: #000000;">&#41;</span><br />      SetBkMode<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />      RoundBox<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">2</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">1</span>, WndWidth<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">22</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>,;<br />                RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">235</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">253</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <br />      RoundBox<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">1</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">2</span>, WndWidth<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">21</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>,;<br />                RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">125</span>, <span style="color: #000000;">162</span>, <span style="color: #000000;">206</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <br />   <span style="color: #00C800;">endif</span><br /><br />   SetTextColor<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   DrawTextEx<span style="color: #000000;">&#40;</span> hDC, cData, aRect, oCol:<span style="color: #000000;">nDataStyle</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:hk35ltr1] El resultado es: [img:hk35ltr1]http&#58;//200&#46;58&#46;169&#46;10//paquetes/browse&#46;png[/img:hk35ltr1] Gracias por ayuda Saludos Adhemar
Browse con Vista de Window 7
Adhemar, En la llamada a RoundBox() cambia el valor aRect[ 1 ] - 1 por oBrw1:aCols[1]:nWidth y asi el pintado se hará a continuación de la primera columna.
Browse con Vista de Window 7
Gracias Distinguido Hice el cambio, pero no varia nada. ?oBrw1:aCols[1]:nWidth da un valor de 25 Gracias de nuevo Saludos Adhemar
Browse con Vista de Window 7
Cambiandole el segundo valor 2 de RoundBox() por oBrw1:aCols[1]:nWidth con el parametro lTransparent:=.T. Sale asi: [img:1mua7c0o]http&#58;//200&#46;58&#46;169&#46;10/paquetes/browse1&#46;png[/img:1mua7c0o] sin el parametro lTransparent:=.T. Sale asi: [img:1mua7c0o]http&#58;//200&#46;58&#46;169&#46;10/paquetes/browse2&#46;png[/img:1mua7c0o] La primer columna sale de otro color pero mantiene el pintado del puntero. Gracias por la ayuda Saludos Adhemar
Browse con Vista de Window 7
Adhemar, Disculpa, hay que cambiar tambien el valor de llamada a GradientFill(), cambiando aRect[ 1 ] - 2 de igual forma
Browse con Vista de Window 7
Gracias Distinguido Ahora empieza desde la 2da. columna, el problema ahora es el ltransparent con .T. no muestra la 1ra. con fondo gris, con .F. muestra gris pero mantiene el pintado del puntero. Saludos Adhemar
Browse con Vista de Window 7
Adhemar, Puedes añadir otra llamada a GradientFill() para que rellene la zona de la primera columna, con las coordenadas de la primera columna. Tenemos libertad de dibujar como queramos ahi <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Browse con Vista de Window 7
Gracias Distinguido Lo logré haciendo otro Gradientfill como me indico el resultado es: [img:23pm33s5]http&#58;//200&#46;58&#46;169&#46;10/paquetes/browse3&#46;png[/img:23pm33s5] No me aparece la enumeración completa, pero creo que se ve bien. como es una tabla y está ordena por la enumeración cuandoy pulso 011 me sale así: [img:23pm33s5]http&#58;//200&#46;58&#46;169&#46;10/paquetes/browse4&#46;png[/img:23pm33s5] Tengo que dar un Click sobre la línea para que recien la pinte con el gradient. Gracias una vez mas por sus ayuda y su tiempo Saludos Adhemar
Browse con celdas de colores
Hola, Como puedo hacer que mi browse ,dependiendo de ciertas condiciones, en cada fila o registro se vea de un color espeficico. Segun yo estoy usando el twbrowse. Por lo menos eso dice en el resource workshop cada vez que hago un browse. y para el codigo utilizo la instruccion : redefine LISTBOX olbx FIELDS ........ Si hay que cambiar de browse donde se cambia ? y como gracias
Browse con celdas de colores
[quote="renemontano":1gdzsioj]Hola, Como puedo hacer que mi browse ,dependiendo de ciertas condiciones, en cada fila o registro se vea de un color espeficico. Segun yo estoy usando el twbrowse. Por lo menos eso dice en el resource workshop cada vez que hago un browse. y para el codigo utilizo la instruccion : redefine LISTBOX olbx FIELDS ........ Si hay que cambiar de browse donde se cambia ? y como gracias[/quote:1gdzsioj] Rene, [url:1gdzsioj]http&#58;//incos&#46;sytes&#46;net/fwh/twbrowse17&#46;rar[/url:1gdzsioj] Viene con ejemplos, espero te ayude
Browse con celdas de colores
Rene: Mirate el funcionamiento de estas variables / codigos de bloque: oBrf:bTextColor:={|nRow,nCol| IF(nCol=1,CLR_HRED,)} oBrw:nClrPane:={|| Detcol()} oBrw3:bBkColor:= {|nRow,nCol,nStyle| If( nStyle==0 .and. (nCol==5.OR.ncol==7), ; CLR_YELLOW, ) } STATIC Function Detcol() Local cColor ///DO CASE ///CASE ENCAPEDI->ESTADO == 0 // SIN MOVIMIENTOS cColor:=RGB(251,249,215)//CLR_YELLOW ///CASE ENCAPEDI->ESTADO == 1 // CON RECEPCIONES PARCIALES /// cColor:=CLR_LBLUE ///CASE ENCAPEDI->ESTADO == 2 // recibida totalmente /// cColor:=CLR_LGRAY ///CASE ENCAPEDI->ESTADO == 3 // fecha entrega vencida -rojo- /// cColor:=RGB(255,130,130) ///ENDCASE RETURN cColor //10) Nuevas variables ::bTextColor y ::bBkColor. Son bloques de codigo que // se eval£an en tiempo de pintado. Pueden devolver una valor NUMERICO, // que representa el color RGB con el cual se pintar el texto o fondo, // segun el bloque. Si devuelve otro valor, los colores ser n los especi- // ficados en las respectivas varialbes de instancia de la clase. // Se env¡an 3 argumentos: {|nRow,nCol,nStyleLine| ... } // nStyleLine, puede asumir los siguientes valores: // 0 -> Celda standard normal // 1 -> Celda Header // 2 -> Celda Footer // 3 -> Celda standard normal seleccionada // Ver Pto. 41) //11) Nueva variable ::nClrLine. Especifica un color especifico para las lineas // separadoras de celdas. Por defecto se utilizan los colores de linea // especificos, segun el valor de ::nLineSyle. (Jose Gimenez) // ::nClrFFore y ::nClrFBack -> Color RGB de texto y fondo respectiva- // mente de los (Pies) Footers. Son analogas a las // variables ::nClrForeHead y ::nClrBackHead, usadas en // las Cabeceras (Headers). //17) Nuevas variables ::nClrNFFore y ::nClrNFBack. NF (no focus). Indican // el color RGB de Texto y Fondo respectivamente de la(s) Celda(s) // seleccionada(s) cuando NO HAY FOCO sobre el control. Ambas son analogas // a las variables ::nClrForeFocus y ::nClrBackFocus. // Resumiendo Color(es) de Celda(s) Seleccionada(s): // +-------------------------+--------------+-----------------+ // | Color celda seleccionada| CON FOCO | SIN FOCO | // +-------------------------+--------------+-----------------+ // | Colores de Texto (Fore) | ::nClrNFFore | ::nClrForeFocus | // | Colores de Fondo (Back) | ::nClrNFBack | ::nClrBackFocus | // +-------------------------+--------------+-----------------+ //40) Nueva variable: ::bFont. Es un bloque de codigo opcional, que se ejecuta // en tiempo de pintado, y envia 3 argumentos: {|nRow,nCol,nStyleLine| ... } // nStyleLine, puede asumir los siguientes valores: // 0 -> Celda standard normal // 1 -> Celda Header // 2 -> Celda Footer // 3 -> Celda standard normal seleccionada // Este bloque puede devolver un valor NUMERICO, que representa el handle o // manejador de una fuente de Windows (HFONT). Cualquier otro valor que no // sea numerico ser rechazado, y se asumir que debe usarse la fuente del // control standard. Como vemos esto trae una altisima flexibilidad en cuanto // a las fuentes del grid, la cual si quisieramos, cada celda podr¡a asumir // fuentes de distinto tipo, tama¤o y estilo. Con eso podes manipular a tu gusto, fuentes, y colores de lineas completas, columnas completas o celdas. Saludos,
Browse con imagenes
Manuel, Es una buena idea y sería estupendo que funcionase <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> A mi me gustaría implementar objetos columna para el browse, pero eso ya lo haremos más adelante
Browse con imagenes
Le he estado dando vueltas a la manera de poder usar imagenes en el browse y se me ocurre una manera pero no se si sera la mejor de implementar . En la clase Browse creamos una DATa ::aTipo con un valor para cada columna del browse ( si el valor es nil entendemos que es un string ) .Los tipos pueden ser los distintos elementos que el browse puede presentar ( de momento jugariamos con string o image ) Cuando llamamos a la funcion BrwAddColumn( ::hWnd, aHeaders[ n ] ) en la creación del browse podemos pasar otro parametro : BrwAddColumn( ::hWnd, aHeaders[ n ] , atipos[n] ) el string del browse será el nombre de la imagen . Una vez en la funcion BrwaddColumn analizaremos el tipo y si este es del tipo imagen generaremos un Objeto imagen cuyo archivo será el que nos dice el string "de la casilla". Usando tableView:setObjectValue:forTableColumn:row: podremos assignar los objetos imagen a cada "casilla" del browse . No se si me he esplicado bien y como veis la "jugada" ? . Espero comentarios , y si es el camino correcto , se puede intentar . Saludos.
Browse con imagenes
He remirado la implementacion de browse y lo que temía pensado no se puede hacer ya que el Datasource está creado para admitir textos . Se tendrá que pensar otra manera de hacerlo. Saludos.
Browse con paginación
Hola, He actualizado el proyecto de uso de browse en Mercury Developer -> tweb_crud , con un ejemplo de uso de paginación <!-- m --><a class="postlink" href="http://54.37.60.38/tpl/tweb_crud/browse_pag">http://54.37.60.38/tpl/tweb_crud/browse_pag</a><!-- m --> Una aplicación cerrada y que te la puedes bajar para aprender Como siempre...todo el código <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Buen finde semana. C.
Browse con paginación
Estimado Carles De dónde puedo descargarlo?
Browse con paginación
Hola, Aqui tienes instrucciones --> <!-- m --><a class="postlink" href="https://modharbour.app/compass/search/quick">https://modharbour.app/compass/search/quick</a><!-- m --> C.
Browse con paginación
Estimado Carles Lo revisé todo y no encuentro donde obtener el Browse_page Gracias por su colaboración
Browse con paginación
Ademar, Has de instalarte el mod que indico para poder usar la aplicacion MD (Mercury Developer). Desde allí podras listarte e instalar automaticamente un monton de proyectos listos para usar... C.
Browse con paginación
Carles Listo ya instalé el Mercury Developer Escribo MRP Y muestra lista: Mercury repository projects Escribo Install Y muestra: Install ? for more information Que debo hacer? Gracias por la ayuda
Browse con paginación
Ademar, Que te dice si escribes -> install ? <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> C.
Browse con paginación
Perfecto. Lo logré. Muchas gracias
Browse de Hernan
Amigos: Debo saber en que numero de columna doy el click Con los header me sale pero si la celda no es un header no me sale. Gracias por la ayuda. Saludos Ruben Fernandez
Browse de Hernan
olbx:ncolAct guarda el número de columna actual olbx:lcellstyle := .t. olbx:bLClicked:={|nRow,nCol|MSGALERT(olbx:ncolact)} Un saludo Marcelo Jingo
Browse de Hernan
Gracias Marcelo: Funcionó a la perfección. Saludos Ruben Fernandez
Browse de Hernan
Hola Amigos. Estoy tratando de compilar el ejemplo 01 de los que trae el TwBrowse17 de Hernán, pero me da error: Unresolved external ‘_hb_stack” referenced from C:\fwh\samples\BrwHdc\wBrwLine.obj. Ya sea compilando wBrowse.prg o linkando TwBrw32.lib. no se que hago mal. Alguien ha solucionado esto? Muchas gracias Jorge Vargas
Browse de Hernan
JVargas Estás utilizando una librería compilada que bajaste con el wBrowse? Si es así, lo mejor es compilarla de nuevo. Asegurate de incluir wbrwline.c Si bien uso xHarbour 0.99.60.1 y FWH 26May05, no tengo ningún problema con su uso saludos
Browse de Hernan
Hola Mario. muchas gracias por tu respuesta estoy compilando el Wbrowse sin problemas, el wBrwLine.c lo compilo para convertirlo en obj pero da muchos errores (26) como "unable to open WinTen.h" y muchos "error E2219 wBrwLIne wrong number of arguments in call of macro '_parnl'", en el sample01 no hay problemas, y al momento de linkarlo toma el wBrwLine.obj que existia en el ZIP y da el error 'unresolved external '_hb_stack' referenced from wBrwLine.obj. el problema es al parecer el wBrwLine.c del 10/02/2006 y el wBrwLIne.obj. del 15/02/2005 no incluyo el TwBrw32.lib podrias por favor verificar las fechas de los wBrwLine que tienes? agradeceria tu ayuda Jorge Vargas
Browse de Hernan
Te envio los fuentes que tengo y uso Saludos
Browse de Hernan
Hola Mario. muchisimas gracias por tu ayuda otro si pregunto. alguien sabe como se usa los archivos .MAK para crear una libreria? gracias Jorge Vargas
Browse de Hernan
[quote="jvargas":1r02zumi]Hola Mario. muchisimas gracias por tu ayuda otro si pregunto. alguien sabe como se usa los archivos .MAK para crear una libreria? gracias Jorge Vargas[/quote:1r02zumi] Usar VERCE <!-- m --><a class="postlink" href="http://incos.sytes.net/fivewin">http://incos.sytes.net/fivewin</a><!-- m -->
Browse de Hernan
Hola William. muchas gracias por tu info. voy a descargarlo y ver lo que hago saludos Jorge Vargas
Browse de Hernan
[quote="jvargas":hnxc1vdj]Hola William. muchas gracias por tu info. voy a descargarlo y ver lo que hago saludos Jorge Vargas[/quote:hnxc1vdj] Por cualquier duda a: <!-- e --><a href="mailto:wmormar@yahoo.com.mx">wmormar@yahoo.com.mx</a><!-- e --> o por messenger en: <!-- e --><a href="mailto:wmormar@hotmail.com">wmormar@hotmail.com</a><!-- e -->
Browse de Hernan
Hola Amigos Todavía no puedo hacer funcionar el Browse de Hernán , Cuando compilo el wBrwLine.c me da 26 errores. Para compilar uso: echo -O2 -ewBrwLine.exe -I%hdir%\include;%fwh%\include wBrwLine.c >b32.bc %bcdir%\bin\bcc32 -M -c -v @b32.bc > clip.log Tratando de averiguar cual es el origen del error, compilo el wBrwLine.c que trae el Fw 7.05 y me da el sgte. Diagnostico: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland \fwh\source\function\wbrwline.c: Error E2451 \fwh\source\function\wbrwline.c 655: Undefined symbol 'params' in function ABRWPOSREC Warning W8065 \fwh\source\function\wbrwline.c 655: Call to function 'PARNL' with no prototype in function ABRWPOSREC *** 1 errors in Compile *** que es esta línea l = _parnl( 3, wIndex ); Y como el Lenguaje C es igual que chino para mí. Alguno de Uds. conocedores de C, podría echarme una manito? o hago algun error? Muchas gracias Jorge Vargas
Browse de Hernan
Jorge: Yo la he compilado con VERCE y no he tenido problemas, funciona bien. Que usas para compilar ? Saludos
Browse de Hernan
Hola Armando muchas gracias por reponder yo uso el buildx.bat que viene con Fw, lo mismo que para compilar cualquier Prg. despues de hacerlo con Harbour que lo convierte a C viene: echo -O2 -ewBrwLine.exe -I%hdir%\include;%fwh%\include wBrwLine.c >b32.bc %bcdir%\bin\bcc32 -M -c -v @b32.bc > clip.log y eso lo debe convertir a Obj La verdad es que deseo quedarme con solamente lo que trae Fw. es bastante simple, pero parece que solo a mi me sucede esto. otra vez gracias Jorge Vargas
Browse de Hernan
Hola Amigos Alguna pequeña ayuda de mis amigos???? que hago mal? gracias Jorge Vargas
Browse de Hernan
Hola Amigos Alguna pequeña ayuda de mis amigos???? que hago mal? gracias Jorge Vargas
Browse de Hernan
Jorge, Los archivos en C que usa FWH requieren llamar a fwh\tools\clp2harb.exe fichero.c nuevo.c ya que sirven para varios compiladores distintos, y clp2harb.exe se encarga de adaptar un módulo en C a Harbour. Si aún así no lo consigues, envíame por email un ZIP con los ficheros y los compilamos aqui y te los enviamos compilados
Browse de Hernan
Hola Antonio. muchas gracias por tu apoyo. ya funcionó. todavia me estoy riendo de fichero.c nuevo.c.... Saludos Jorge Vargas
Browse de Hernan
bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Browse de Hernan
Hola AmigosEstoy haciendo pruebas con el Brw de Hernan y modificado por Rossine, hice algunos arreglos a un ejemplo de entrada de datos, hasta que resultó el modelo que yo quería y me funciona muy bien.Al usar ese modelo como base para un prg de mi aplicación me devuelve:Application=========== Path and name: C:\ALW\XL.EXE (32 bits) Size: 1,944,576 bytes Time from start: 0 hours 0 mins 57 secs Error occurred at: 15/08/2008, 10:43:48 Error description: Error BASE/1066 Argument error: conditional Args: [ 1] = U Stack Calls=========== Called from: TGET.PRG => TGET:LVALID(0) Called from: CONTROL.PRG => TGET:FWLOSTFOCUS(0) Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0) Called from: TGET.PRG => TGET:HANDLEEVENT(0) Called from: WINDOW.PRG => _FWH(0) Called from: => SYSREFRESH(0) Called from: CONTROL.PRG => TCONTROL:KEYCHAR(0) Called from: TGET.PRG => TGET:KEYCHAR(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0) Called from: TGET.PRG => TGET:HANDLEEVENT(0) Called from: WINDOW.PRG => _FWH(0) Called from: => DIALOGBOXINDIRECT(0) Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: x.prg => AL721(181) Called from: al0.prg => MAIN(90)He modificado el programa para hacer el seguimiento del error poniendo solo una columna e igual me da el mismo error.Ya tengo bastante tiempo tratando de encontrarle soluciónA alguien le ha pasado esto?, es error de Brw?Lo que me confunde es que en el ejemplo funciona bien todo.Les agradecería su ayudaSaludos y gracias por anticipadoJorge Vargas
Browse de Hernan
El problema viene de un GET que estás usando cuyo VALID no devuelve un valor lógico
Browse de Hernan
Hola Antonio.Muchas gracias por responder. Hasta ahí he llegado. Eso se desprende del msg.La rutina es bastante simple, da el msg de línea 255, luego el de la línea 257, regresa de la rutina de edición con .F. y cancela. Lo mismo si saldría después de hacer el msg de 262. If ! lContinue .and. aDatos[nAt,TNue] // Se agregado un nuevo Item !!!?"255 lContinue=.f. ", aDatos[nAt,TNue], oLbx:nat, oLbx:nLastKey if oLbx:nLastkey=38 &&' ok se dio Up en edit de col1 ?"257 oLbx:nLastKey=38" return .f. endif ?"262 oLbx:nLastKey<>38" return .f. // error de ?? que sale con .F. y entra otra vez a EditCell* EndIf EndIf?"269 Exit" Exit //Sale por cada ColLo que más me confunde es que esta misma rutina trabaja bien en el ejemplo que modifiqué y por mas que reviso no encuentro el errorAgradecería cualquier ayuda, estoy entrampado en esto.Saludos y Gracias otra vezJorge Vargas
Browse de Hernan
Jorge,Aqui:[code:1z7jnxhm] ?"269 Exit" Exit //Sale por cada Col [/code:1z7jnxhm]estás saliendo sin devolver un valor lógico
Browse de Hernan
Hola AntonioOtra vez gracias por tu ayuda.Me faltó poner algo mas de código para mejor entendimiento. El hecho es que se debe abandonar la rutina por la línea 257 que tiene ‘Return .F.’ cuando hay un nLastKey=38 o por la línea 260 por un <> 38.Solo llega a la línea 263 cuando no se cumple la condición de la línea 254 y la rutina sale por ‘Return lContinue’ final, que no es lo que se quiere en este punto porque nLastKey es 38 y debería salir por la línea 257 para que el oLbx tome el control.Estoy usando esta rutina de lectura:oLbx:bEdit:= {|nCol, cBuffer, lFirstEdit|; &&' loop si fin, hasta dar Esc AL721EditaCelda( nCol, cBuffer, lFirstEdit )} Que llama a:Function AL721EditaCelda( nCol, cBuffer, lFirstEdit )LOCAL bValid, nColReal:= nCol ........... Case nCol == 1 bValid:= {|| ValidCol1() } If lContinue:= oLbx:lEditCol( nColReal, @uBuffer, ; "@ZE 99999", bValid,,CLR_YELLOW ) aDatos[nAt,nCol]:=uBuffer else?"223 else Col1",lContinue,lfirstEdit,oLbx:nLastKey // si se da Esc o F2 o KUp en lEditCol... lContinue es .f. EndIf// otras columnas……*?"205 FinCol4",lContinue,lFirstEdit Case nCol==len(oLbx:aColSizes) .and. Len(T)==nAt .and. ; // Ult Col y Ult Fila ! lFirstEdit AL721AdiTab( .f. ) &&' adiciona reg al final EndCase?"253 EndCase",nat,nCol,lContinue,lFirstEdit // x,y , .t. , 1Vez=.t. If ! lContinue .and. aDatos[nAt,TNue] // Se agregó un nuevo Item !!!?"255 lContinue=.f. ", aDatos[nAt,TNue], oLbx:nat, oLbx:nLastKey if oLbx:nLastkey=38 &&' ok se dio Up en edit de col1 ?"257 oLbx:nLastKey=38" ; Return .F. // sale por acá y cancela endif ?"260 oLbx:nLastKey<>38" return .f. // error ?? que sale con .F. EndIf?"263 Exit" Exit //Sale por cada ColEndDoIf Len( aDatos ) > 0 AL721TotDoc() &&' acumula y muestra totalesEndIf?"279 CasiFin EditCell lContinue",lContinue, "nAt",nAt, "nCol",nCol, "oLbx:nLastKey", oLbx:nlastkeyIf lContinue Do Case Case oLbx:nLastKey == VK_UP return If( !GetKeyState(VK_SHIFT), -1, -3 ) Case oLbx:nLastKey == VK_DOWN // 40 return If( !GetKeyState(VK_SHIFT), 3, 2 ) Case oLbx:nLastKey == VK_TAB // 9 return If( GetKeyState(VK_SHIFT), -1, 1 ) EndCaseEndIf?"299 Fin editCell lContinue ",lContinue,"nAt",nAt,"nCol ",nColreturn lContinue // fin AL721EditaCelda*esta rutina no es nada del otro mundo.Los valores de Return que acepta la rutina son .T., .F., 1, 2, 3, -1, -2, -3 según el Método __Xedit y los valores numéricos no los estoy usando. La funcion ValidCol1 siempre devuelve .t. por lo tanto no es alli el problemaAl llegar a la linea 257 ya salió del Get, tampoco es alli.Si funciona bien el ejemplo entonces el problema es totalmente mio.Mi pregunta en concreto es cómo saber qué valor recibe oLbx:bEdit para que cancele?. Los msgs no me dicen mucho y al parecer debo seguir rastreando en el método lEditCol donde hay gets.Entonces seguiré buscando.Muchas gracias por toda la ayudaJorge Vargas
Browse de Hernan
Hola Amigos:Ya encontré el error. No tenia nada que ver con el Brw, era de un Get anterior que en el Valid buscaba los datos para llenar el Brw y alli solo hacia el ‘Return’Lo que me confundía era que el Brw empezaba a pedir datos en varias columnas y lineas y todo iba bien hasta salir del Brw donde me esperaba el Valid.Había revisado 30 veces esta parte pero no vi la diferencia con el ejemplo original.Ya se que uno no ve no solo porque le falla la vista sino porque se está molesto y preocupadoLes agradezco su tiempo y su ayudaJorge Vargas.
Browse de Hernan para FWH 2.7 Febrero y en adelante
Parece que los enlaces que publicamos en: <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=2502">http://fivetechsoft.com/forums/viewtopic.php?t=2502</a><!-- m --> han dejado de funcionar. Alguien tiene esos ficheros, y que pueda volver a alojarlos en <!-- w --><a class="postlink" href="http://www.hyperupload.com">www.hyperupload.com</a><!-- w --> ? gracias
Browse de Hernan para FWH 2.7 Febrero y en adelante
te dejo el Último que se publicó en el foro. <!-- m --><a class="postlink" href="http://hyperupload.com/download/026cd92f26/TWBrowse_17-">http://hyperupload.com/download/026cd92f26/TWBrowse_17-</a><!-- m -->[x]Harbour.exe.html Lo uso con FWH Marzo 2006 y xHarbour 0.99.60 funciona perfecto.
Browse de Hernan para FWH 2.7 Febrero y en adelante
Estimados He bajado la clase y me esta arrojando error de variable no declarada nElements, ahora viendo la clase el metodo NEW(..). no existe la variable nElement ahora que valor deviera tener nElement [code:1h1kozjj] if Len&#40; &#58;&#58;aHeaders &#41; < nElements if &#58;&#58;Cargo == nil &#58;&#58;aHeaders = Array&#40; nElements &#41; for n = 1 to nElements if ! Empty&#40; cAlias &#41; &#46;and&#46; Upper&#40; cAlias &#41; != "ARRAY" &#58;&#58;aHeaders&#91; n &#93; = &#40; cAlias &#41;->&#40; FieldName&#40; n &#41; &#41; else &#58;&#58;aHeaders&#91; n &#93; = AllTrim&#40; Str&#40; n &#41; &#41; endif next else &#58;&#58;aHeaders = &#123; "" &#125; endif endif [/code:1h1kozjj] Saludos Patricio
Browse de Hernan para FWH 2.7 Febrero y en adelante
estimado estoy compilando con el siguiente archivo bat: [code:1103cjmh] @ECHO OFF CLS set include=&#46;\INCLUDE;c&#58;\fwh\include set hdir=c&#58;\harbour set bcdir=c&#58;\borland\bcc55\bin goto inicio &#58;error cls type error&#46;log goto end &#58;inicio %hdir%\bin\harbour SOURCE\CLASSES\WBROWSE&#46;PRG /p /n /a /w /es1 /i\fwh\include;%hdir%\include /oOBJ\WBROWSE&#46;C >error&#46;log if errorlevel 1 goto error %hdir%\bin\harbour SOURCE\CLASSES\TMULTISE&#46;PRG /n /i\fwh\include;%hdir%\include /oOBJ\TMULTISE&#46;C >>error&#46;log if errorlevel 1 goto error rem INICIO Modulos C Generados por Harbour !!! %bcdir%\bcc32 -M -c -D__HARBOUR__ -I%hdir%\include;c&#58;\fwh\include -oOBJ\WBRWLINE&#46;OBJ SOURCE\FUNCTION\WBRWLINE&#46;C %bcdir%\bcc32 -M -c -D__HARBOUR__ -I%hdir%\include -oOBJ\WBROWSE&#46;OBJ OBJ\WBROWSE&#46;C @del OBJ\WBROWSE&#46;c %bcdir%\bcc32 -M -c -D__HARBOUR__ -I%hdir%\include -oOBJ\TMULTISE&#46;OBJ OBJ\TMULTISE&#46;C @del OBJ\TMULTISE&#46;c IF exist LIB\TWBRW32&#46;LIB @del LIB\TWBRW32&#46;LIB %bcdir%\tlib lib\TWBRW32&#46;LIB +OBJ\WBROWSE&#46;OBJ + OBJ\WBRWLINE&#46;OBJ + OBJ\TMULTISE&#46;OBJ &#58;end pause [/code:1103cjmh] pero al compilar WBRWLINE.C me sale el siguiente error [code:1103cjmh]Borland C++ 5&#46;5&#46;1 for Win32 Copyright &#40;c&#41; 1993, 2000 Borland SOURCE\FUNCTION\WBRWLINE&#46;C&#58; Warning W8065 SOURCE\FUNCTION\WBRWLINE&#46;C 1183&#58; Call to function 'hb_dynsymSymbol' with no prototype in function HB_FUN_WBRWPANE Error E2342 SOURCE\FUNCTION\WBRWLINE&#46;C 1183&#58; Type mismatch in parameter 'pSym' &#40;wanted 'HB_SYMB *', got 'int'&#41; in function HB_FUN_WBRWPANE *** 1 errors in Compile ***[/code:1103cjmh] Alguien sabe como compilar WBRWLINE.C xHarbour Compiler build 0.99.3, fwH(2.4) , borland C5.5 saludos Patricio
Browse de Hernan para FWH 2.7 Febrero y en adelante
Jose, Gracias! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Browse desde recursos con pelles
Estoy usando pelles para editar recursos y estoy usando un archivo .rc creado con el workshop. no tengo mayores problemas pero cuando quiero poner un wbrowse de hernán no me muestra las barras de scroll. No tengo manera de ponerlas desde recursos y tampoco los toma desde codigo. Alguien tiene idea ??? Muchas gracias por todo
Browse desde recursos con pelles
[quote="horacio":107ktjrt]Estoy usando pelles para editar recursos y estoy usando un archivo .rc creado con el workshop. no tengo mayores problemas pero cuando quiero poner un wbrowse de hernán no me muestra las barras de scroll. No tengo manera de ponerlas desde recursos y tampoco los toma desde codigo. Alguien tiene idea ??? Muchas gracias por todo[/quote:107ktjrt] Tenes que definirlo como "CUSTOM CONTROL" y en Windows style = 0x50210000 Extend windows style = 0x00000000 Class name = TWBrowse Un abrazo. El Loco =>))
Browse desde recursos con pelles
En el window style: 0x50A10000 scroll vertical 0x50B10000 scroll horizontal salu2 paco
Browse doesn""t get focus
Hello all, I open a window that displays a browse. I use the up and down arrows to skip the records in the browse, the selected record being white on blue while all other records are black on white. There is a button (or I detect a keyboard key) that calls a sub function to do some data entry. When I call this function, the selected record becomes white on grey (probably meaning that it is disabled). When I come back from the sub function, the record stays disabled (white on grey). If I use the scroll bar, there is no problem, the focus goes to the next (previous) record and it is enabled (white on blue). The problem is when I want to skip with the arrow keys. I need to pess this key a few but variable number of times before it seems recognized. How can I change the program so that the record is enabled when returning from the sub function ? The following code is an extract of a more complex routine: [code=fw:35zpj5k1]<div class="fw" id="{CB}" style="font-family: monospace;">   iif<span style="color: #000000;">&#40;</span>nKey == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"3"</span><span style="color: #000000;">&#41;</span>,;<br />             <span style="color: #000000;">&#40;</span>nEss := oF10b:<span style="color: #000000;">ESSENCE</span>,;<br />              iif <span style="color: #000000;">&#40;</span>cMethode == <span style="color: #ff0000;">"M"</span> .AND.;<br />                   <span style="color: #000000;">&#40;</span>nEss == <span style="color: #000000;">41</span> .OR. nEss == <span style="color: #000000;">42</span> .OR. nEss == <span style="color: #000000;">150</span> .OR. nEss == <span style="color: #000000;">151</span><span style="color: #000000;">&#41;</span>,;<br />                   cRet := <span style="color: #ff0000;">"P"</span>,cRet := cMethode<span style="color: #000000;">&#41;</span>,;<br />              DetAddSel<span style="color: #000000;">&#40;</span>aFichiers,Str<span style="color: #000000;">&#40;</span>nEss<span style="color: #000000;">&#41;</span>,Str<span style="color: #000000;">&#40;</span>oF10b:<span style="color: #000000;">SOUS_CODE</span><span style="color: #000000;">&#41;</span>,cRet,<span style="color: #ff0000;">"edit"</span><span style="color: #000000;">&#41;</span>,;<br />              oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />              <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"*"</span><span style="color: #000000;">&#41;</span>,;<br />              oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br /> </div>[/code:35zpj5k1] Remark that MsgInfo("*") is executed but the browse doesn't seem to receive the focus. Regards, Raymond
Browse doesn""t get focus
Raymond, Try not to call oBrw:refresh() and see if that makes a difference, thanks
Browse doesn""t get focus
Hi Antonio, I have an answer, a workaround and maybe an explanation. Explanation: It seems that the function DetAddSel() is executed in another thread. Then the function is called and immediately the following statements are executed. Then the browse is active again, the new window is also started but it is covered by the browse. Workarounds: The one I have used is to add oBrw as a parameter to DetAddSel() and to move the refresh in that function just before leaving: [code=fw:2e67n2xd]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2e67n2xd] Another possibility (I think but not tested) is to use pass oWnd as a parameter to DetAddSel and to use the clause "OF oWnd" when creating the new window. I suppose that then this new window will be modal. Concerning your suggestion, I tried all possibilities but the record always remains disabled. This is not a problem if you use the touchscreen because as soon as you touch the screen, the browse regains the focus but the users of this program must use the keyboard. Regards, Raymond
Browse edit of cell with brush
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: [url=https&#58;//imagesharing&#46;com/photo&#46;php?id=12ef69db7cf5c989104f504a9c117bcadf9be0dd:2sttbzw2][img:2sttbzw2]https&#58;//imagesharing&#46;com/uploads/12ef69db7cf5c989104f504a9c117bcadf9be0dd&#46;gif[/img:2sttbzw2][/url:2sttbzw2] This piece of code reproduces the issue: [code=fw:2sttbzw2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><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> oWnd,oBrw<br />   <span style="color: #00C800;">LOCAL</span> aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>,n, oBrush<br />   <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 />      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 />   <span style="color: #00C800;">next</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<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;">STYLE</span> <span style="color: #000000;">2015</span> ;<br />      DATASOURCE aData ;<br />      COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> ;<br />      HEADERS <span style="color: #ff0000;">"Desc"</span>,<span style="color: #ff0000;">"Qta"</span><br />   with object oBrw<br />      :<span style="color: #000000;">lFastEdit</span> := .T.<br />   end<br />   <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 />   <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 />   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 />      :<span style="color: #000000;">nEditType</span> := EDIT_GET<br />      :<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999999.99"</span><br />      :<span style="color: #000000;">lAutoSave</span> := .T.<br />      :<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 />      :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| ;<br />         <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>,CLR_BLACK,CLR_EDITED<span style="color: #000000;">&#41;</span>, ;<br />            CLR_WHITE<span style="color: #000000;">&#125;</span> ;<br />      <span style="color: #000000;">&#125;</span><br />   end<br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">oClient</span> := oBrw<br />   <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">Window</span> oWnd<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2sttbzw2] I am using the FW 18.01, maybe is it already fixed on newer versions? 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) Regards, PS: without brush is worse, you see the old value
Browse edit of cell with brush
yo haria asi: [code=fw:2acju1vr]<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;">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:2acju1vr] Regards, saludos.
Browse edit of cell with brush
[quote="karinha":puulv7wu]yo haria asi: Regards, saludos.[/quote:puulv7wu] I don't see changes in your code