topic
stringlengths
1
63
text
stringlengths
1
577k
Consulta ayuda Saludos
[quote="tomafa":392wuvn0]Saludos, estoy en un dilema, tengo que hacer un modulo de pedidos a proveedores relacionado a las ventas en la semana, pero no tengo claro como hacerlo algunas sugerencias, ya que la persona que me lo pidio no sabe como realizarlo, estoy manejando un stock de productos y sus existencias como haria la relacion en base a las ventas de un producto x, espero que me puedan ayudar. y saludos a todos en el foro mexico df[/quote:392wuvn0]Primero, Bienvenido, que necesitas..como programar en FWH o la logica del desarrollo del modulo...? soy analista de sistemas y trabajo en la parte de asesoramiento de sistemas administrativos... explicate a ver si puedo ayudarte...saludos desde Venezuela.
Consulta ayuda Saludos
gracias por el apoyo, lo que necesito es una acesoria no tanto en programacion por que sabria hacerlo, pero no se me ocurre nada, el usuario me pudio que el sistema tubiera la capacidad de sacar un reporte de pedidos en base a las ventas, espero que me explique, en tonces es en donde no sabria sacar una formula para realizar esta operacion, manejo un stock, existencias, en donde le pegaria a las ventas, tengo un base en donde se estan a comulando en total de las salidas de un producto. es en esta parte en donde no sabria como aplicar una formula para que me haga el pedido, sin que revase mi stocksaludos
Consulta ayuda Saludos
Tomafa:A ver si me puedo explicar y si es lo que necesitas.Sabemos que tenemos una cantidad de existencia en almacén y que esta va disminuyendo en función a las salidas (ventas).Conocemos cuales son las ventas.Nos hace falta conocer la cantidad a pedir al proveedorLo más sencillo es reponer la misma cantidad que se vendió, peooooPero es más complejo que eso, vamos a ver númerosSupongamos que las ventas en un mes es de 40pzs, desde luego puede variar pero acéptame la cifra para eectos didacticos.Despues de descontar las 40 piezas que vendimos quedan en existencia solo 20Si aceptamos pedir la misma cantidad vendida entonces deberíamos hacer el pedido por 40 piezas y aqui viene el peroooEl proveedor se tarda 2 meses en surtir nuestro pedido, por lo tanto la existencia de 20 piezas las venderiamos en medio mes lo que significa que nos vamos quedar mes y medio sin existencia, recuerda que el proveedor se tarda 2 meses en surtir nuestro pedido.Desde luego no queremos quedarnos sin existencia y desaprovechar la oportunidad de ventas.Todo este rollo es para ejemplificarte que no es tan sencillo como re surtir lo vendido.Algo más técnico sería tener algo que se llama Mínimos, Puntos de reorden y Máximos, estos son cantidades individuales para cada producto que comecializamos.Cómo se determinan los mínimos, puntos de reorden y máximos ???, pues se debe tomar en cuenta la historia de ventas de al menos 12 meses atras, (eso si el producto que comercializamos no es de temporada, como ejemplo de un producto de temporada podriamos mencionar los Helados o mantecados, pues no se vende la misma cantidad en verano que en invierno) y el tiempo en que tarda el proveedor en surtir nuestro pedido. Veamos un pequeño ejemplo:Supongamos que el promedio de los 12 meses de venta nos dice que vendemos 30 piezas cada mes, el provedor se tarda en surtirnos dos meses, si trasladamos esto a numeros diriamos queMínimo de existencia = 2 meses (60 piezas) pues es el tiempo que se tarda el proveedor en surtirnos y para cuando el proveedor nos entregue el pedido estaríamos prácticamente en cero de existencia.Para evitar cualquier riesgo podríamos fijar el punto de re orden en 3 meses = 90 piezas y el máximo de existencia en 5 meses = 150 piezas.Por lo tanto cada vez que hagamos un pedido deberá ser por la diferencia entre la existencia y el punto máximo, vamos números, si la existencia al momento de hacer el pedido fuera de 25 piezas quedaría de esta forma:150 - 25 = 125 piezas a solicitar que nos deben llegar en dos meses.Como ves es algo más complejo pues intervienen muchas cosas subjetivas como promociones, alza de precios, etc etc.Trate de nos ser muy académico para ser más fácil darme a entender, espero esto te ayude en algo.Saludos
Consulta ayuda Saludos
Tomafa, ya Armando te dijo una parte de lo que te iba a recomendar, el manejo de minimo, maxino y tiempo de rotacion como lo llamo yo, es una solucion muy factible, a menos que solo hagas de compra-venta tus porductos o los produscas tu mismo, alli deberias de calcular el tiempo de produccion, algo parecido a lo que dijo Armando, te explico como conocer los productos de la venta, cada vez que hagas una venta de un producto lo guardas en una DBF de "movimientos de productos" con su respectiva fecha, y puedes tener otra DBF con el total de ventas, total de compras y la resta de estos 2 movimientos te dan el saldo del producto. esto lo puedes calcular por mes o por acumulado, depende como mas te sirva, cuando reccorres la DBF de movimientos indexada por el codigo del producto, puedes sumar el total de tus ventas en un periodo solicitado, logico que debes identificar los movimientos con la fecha del movimiento y el tipo de movimiento (venta/compra/ajuste de entra y/o salida/etc), de explicarte te haria un manual, pero es mejor esperar si entiendes el metodo que te explica Armando y esto que te acabo de decir, luego cualquier duda, resolvemos, espero te sirva de ayuda esta respuesta.
Consulta ayuda Saludos
gracias por la ayuda, lo estoy plasmando en la programacion para ver y probar como sale, fue de gran utilidad el consejo, y cuando termine les doy el resultado de como quedo saludos y gracias
Consulta ayuda Saludos
Sólo una salvedad a lo que te han aconsejado.Si no tienes problemas de aumentar el inmovilizado de la empresa, no hay problemas en utilizar los métodos descritos de establecer un "punto de petición" calculado en función de tu estadística de consumo y el tiempo de suministro del proveedor. Así mismo ese método de solucionar el problema se realizará con mercancías o repuestos que sean autenticamente críticos para la producción o mantenimiento.No obstante los nuevos métodos logisticos tienden a no utilizar tanta "estantería" y gestionar "just in Time" los pedidos.Como siempre sólo he conseguido complicarte, pero es muy posible que al utilizar el método del "punto de petición", llenes mucha estantería y aumnetes el inmovilizado de la empresa, con lo cual deberás buscar una solución de compromiso dependiendo, fundamentalmente, de lo [u:j2z8lxbf][b:j2z8lxbf]crítico de cada suministro[/b:j2z8lxbf][/u:j2z8lxbf].Un saludo.
Consulta ayuda Saludos
fergonmsaludos y gracias por tu coperacion, y me intereso tu punto de vista, pero tendrias documentacion respecto al tema o algunos ejemplos para ponerlo en practica, de antemano saludos y gracias
Consulta ayuda Saludos
[quote="tomafa":1qolnuue]fergonm saludos y gracias por tu coperacion, y me intereso tu punto de vista, pero tendrias documentacion respecto al tema o algunos ejemplos para ponerlo en practica, de antemano saludos y gracias[/quote:1qolnuue]Si entras en cualquier buscador con "Justo a tiempo" o con "just in time", obtendrás numerosa información sobre los métodos de excelencia en la gestión de proveedores.No obstante ten cuidado. El método es, en teoría, muy simple, pero verás que en la práctica no es tan simple, ya que exige una gran coordinación y sobre todo un compromiso de toda la cadena logística para realizar suministros con esa filisofía. Las grandes multinacionales del automovil han adoptado esos métodos japoneses de abastecimiento. Han obtenido resultados excelentes, ya que han logrado externalizar trabajo de sus plantas y dedicarse al montaje. Te reitero que en Google obtendrás miles de entradas. Hay monografías muy interesantes en castellano y en inglés. Así mismo encontrarás numerosa bibliografía.Un saludo. Fernando González.
Consulta bLDblClick
Amigo trabajo con xbrowse, mi consulta es, como se en q columna estoy cuando doy doble click oLbx:bLDblClick := {|nRow,nCol,nKeyFlags|(GetArticulos(.F.,oLbx),oLbx:Refresh())} Saludos
Consulta bLDblClick
[quote="jbrita":2kmzco5r]Amigo trabajo con xbrowse, mi consulta es, como se en q columna estoy cuando doy doble click oLbx:bLDblClick := {|nRow,nCol,nKeyFlags|(GetArticulos(.F.,oLbx),oLbx:Refresh())} Saludos[/quote:2kmzco5r] oLbx:nColSel // columna sobre la que s'està actuant.
Consulta básica (Solucionado-bug clase twbrowse Hernán)
Hola: Aquí estoy de nuevo y después de dos años de para en la programación, se nota definitivamente. A ver: utilizo xmate+xharbour (desde cvs) y tengo algo tan simple como esto: [code:2dxgvjqe]REQUEST DBFCDX RddSetDefault( "DBFCDX") aDbf:={} Aadd(aDbf, {"PASO1", "C", 10, 0}) Aadd(aDbf, {"PASO2", "C", 10, 0}) dbCreate( "PASO.DBF", aDbf, "DBFCDX") USE PASO EXCLUSIVE NEW VIA "DBFCDX" SELECT PASO dbGotop() MsgInfo( "browse()") Browse() CLOSE DATABASE[/code:2dxgvjqe] La rutina llega hasta el MsgInfo() y luego se cuelga. Esto me tiene entrampado para utilizar el browse de Hernán. Salduos y mil gracias David Lagos S. Coquimbo-Chile
Consulta básica (Solucionado-bug clase twbrowse Hernán)
David, Cambia Browse() por WBrowse() ó simplemente añade #include "FiveWin.ch" al principio
Consulta básica (Solucionado-bug clase twbrowse Hernán)
Antonio: Tengo puesto #include "fivewin.ch" y no resultó tampoco con wbrowse(). el programa se cuelga. Además no entiendo porqué no me aparece error alguno, ni la ventana ni genera el error.log Saludos David
Consulta básica (Solucionado-bug clase twbrowse Hernán)
David, Porque estas llamando a la función browse para modo consola que proporciona Harbour, por eso se cuelga. FiveWin.ch cambia Browse() por WBrowse(), y la función WBrowse() debe mostrarte un browse básico en modo Windows Prueba a no llamar a Browse() y no debe colgarse
Consulta básica (Solucionado-bug clase twbrowse Hernán)
[quote="Antonio Linares":3an1s171]David, Porque estas llamando a la función browse para modo consola que proporciona Harbour, por eso se cuelga. FiveWin.ch cambia Browse() por WBrowse(), y la función WBrowse() debe mostrarte un browse básico en modo Windows Prueba a no llamar a Browse() y no debe colgarse[/quote:3an1s171] Antonio: No me hice entender. No utilizo nada en modo consola. Sencillamente el simple hecho de hacer un "USE" a una .dbf y realizar un wbrowse() se cuelga. [color=red:3an1s171][b:3an1s171]Vuelvo a preguntar: ¿a qué se puede deber que al presentarse un problema no aparece la ventana de error y no genera el error.log?[/b:3an1s171][/color:3an1s171] Estoy utilizando xmate. Además me funciona perfectamente la twbrowse de hernán. Saludos y muchas gracias. David P.D.:Adjunto imágenes. XMate: [b:3an1s171]Librerías que estoy utilizando[/b:3an1s171] [img:3an1s171]http://img341.imageshack.us/img341/261/xmate1tx9.jpg[/img:3an1s171] [img:3an1s171]http://img251.imageshack.us/img251/292/xmate2dw3.jpg[/img:3an1s171] XMate: [b:3an1s171]Como tengo definido mi proyecto[/b:3an1s171] [img:3an1s171]http://img401.imageshack.us/img401/1910/xmate3pj0.jpg[/img:3an1s171] [b:3an1s171]Hago algo tan simple como esto y se cuelga[/b:3an1s171] [img:3an1s171]http://img208.imageshack.us/img208/6782/simpleejemplo1lo3.jpg[/img:3an1s171]
Consulta básica (Solucionado-bug clase twbrowse Hernán)
David, Tu código funciona aqui perfectamente. Prueba a no enlazar el Browse de Hernan. Si no aparece error y la aplicación se cuelga, es que está en un bucle ó usando Inkey() de [x]Harbour.
Consulta básica (Solucionado-bug clase twbrowse Hernán)
[quote="Antonio Linares":2tys4azn]David, Tu código funciona aqui perfectamente. Prueba a no enlazar el Browse de Hernan. Si no aparece error y la aplicación se cuelga, es que está en un bucle ó usando Inkey() de [x]Harbour.[/quote:2tys4azn] Efectivamente es un bug en la classe de Hernán. Hice lo siguiente: [code:2tys4azn]TRY WBrowse() CATCH oError MsgStop( oError:Description) END[/code:2tys4azn] Con la classe de Hernán arroja el CATCH oError "Undefined Function" Sacando la classe de Hernán funciona perfecto. Mil Gracias nuevamente David Lagos S. Coquimbo-Chile
Consulta básica (Solucionado-bug clase twbrowse Hernán)
Yo utilizo el browse de Hernan y no he tenido ningun problema puede ser el orden de las librerias en mi caso la tengo al principio... [code:82suhfam] ... TWBRW32 + //libreria de hernan... HbTDbf + c:\Fwh\lib\FiveHX.LIB + c:\Fwh\lib\FiveHc.LIB + Funlib32 + FileXls + vBarH + vBoxH + SBrowseH + TBtnGet32 + c:\harbour\lib\rtl.lib + c:\harbour\lib\vm.lib + c:\harbour\lib\gtGui.lib + c:\harbour\lib\lang.lib + c:\harbour\lib\macro.lib + c:\harbour\lib\rdd.lib + c:\harbour\lib\dbfcdx.lib+ c:\harbour\lib\dbffpt.lib+ c:\harbour\lib\hbsix.lib + c:\harbour\lib\common.lib+ c:\harbour\lib\pp.lib + c:\harbour\lib\rddads.lib+ c:\harbour\lib\Ace32.lib + c:\borland\bcc55\lib\cw32.lib + c:\borland\bcc55\lib\import32.lib,, + recurso\wcta.res recurso\toolbar1.res[/code:82suhfam]
Consulta básica (Solucionado-bug clase twbrowse Hernán)
Podria ser un problema de opcodes diferentes el ejemplo que muestras es muy simple por lo que no hay probabilidad de fallos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> por lo que solamente queda esa posibilidad. salu2 carlos vargas
Consulta cGetdir
Estimados: Puedo indicar en cGetDir() que tome la carpeta, por defecto, Mis Dcoumentos definida por windows?; Cómo? gracias
Consulta cGetdir
Mario Fijate que cGetDir Tiene tres parámetros. El primero es el título del dialogo. El Segundo es el directorio Inicial, en tu caso c:\mis documentos Espero que te sirva Saludos
Consulta cGetdir
Horacio: Gracias, eso ya lo lei en la Ayuda. La pregunta es: Si la aplicación se correo en XP con varias sesiones, Mis Documentos, está en por ej: C:\Documents and Settings\Estela\Mis documentos\ Si está en Win98SE con varias sesiones en: C:\Windows\Profiles\Estela\Mis documentos\ Y esa es la pregunta, de donde "leer" esos caminos según la sesión iniciada.
Consulta cGetdir
Mario, Seguramente estén en algún valor del registro. Prueba a abrir un documento y luego busca su path en el registro.
Consulta cGetdir
Hola Mario, Existe la variable de entorno UserProfile que quizas te pueda servir En xp getenv("UserProfile") -> C:\Documents and Settings\Estela En win98 getenv("UserProfile") -> C:\Windows\Profiles\Estela Por tanto podrías usar: cGetDir( 'texto de la ventana', getenv("UserProfile")+"\Mis documentos" )
Consulta cGetdir
Gente; muchas gracias, es lo que necesitaba Saludos
Consulta clase Ttitle [solucionado]
Hola: Por favor, ¿cómo puedo pintar el título en modo plano, como los menús con el estilo 2015? Gracias
Consulta clase Ttitle [solucionado]
Prueba [code=fw:3qzmrm35]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp;oTitle:<span style="color: #000000;">aGrdBack</span> := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, CLR_GRAY, CLR_GRAY <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3qzmrm35]
Consulta clase Ttitle [solucionado]
No funciona, lo siento. Sigue teniendo relieve.
Consulta clase Ttitle [solucionado]
Pues a mi esto si me funciona [code=fw:1jbaxrii]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TITLE</span> oTitle <span style="color: #0000ff;">OF</span> oWndAGENDA <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1025</span>, <span style="color: #000000;">0059</span> NOBORDER <span style="color: #B900B9;">//PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oTitle:<span style="color: #000000;">aGrdBack</span> := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oTitle:<span style="color: #000000;">nShadow</span> &nbsp;:= <span style="color: #000000;">0</span><br /><br />&nbsp;</div>[/code:1jbaxrii]
Consulta clase Ttitle [solucionado]
Con el nShadow ahora sí. Muchas gracias
Consulta comportamientoen combobox
Hola compañeros tuve que compilar mi programa con la version de FWH 17.09 y cuando necesito utilizar el combo con el wbrowse cuando edito una celda, al presionar la decla para seleccionar la opción, cambia pero pasa inmediatamente a la otra celda sin dejarme seguir la búsqueda. En mi pc que tengo una versión anterior de fwh presiono cuantas veces fuese necesario la tecla abajo y luego presiono enter y paso de celda. Gracias por su atención
Consulta con DBCombo
Amigos, es posible en un DBCOMBO, visualizar más de un campo? Por ejemplo: REDEFINE DBCOMBO oCom VAR mCOM ID 108 OF oDlg; ALIAS ALUMNOS ITEMFIELD "CODIGO" LISTFIELD "NOMBRE","CODIGO" UPDATE NOBLANK o algo así? Estuve viendo que existe el parámetro LIST, pero no sé como usarlo y si sirve para lo que yo quiero. Muchas gracias. Roberto
Consulta con DBCombo
Alguien me podría tirar una ayudita? Al menos para saber si se puede saber si se puede o no hacer esto... Muchas gracias Roberto
Consulta con DBCombo
Hoal Roberto: Yo lo hago asi: [code=fw:3tx04jyv]<div class="fw" id="{CB}" style="font-family: monospace;">AEVAL<span style="color: #000000;">&#40;</span>oCom:<span style="color: #000000;">aList</span>,<span style="color: #000000;">&#123;</span>|cItem,nItem| oCom:<span style="color: #000000;">aList</span><span style="color: #000000;">&#91;</span>nItem<span style="color: #000000;">&#93;</span>:=<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>EMPTY<span style="color: #000000;">&#40;</span>oCtrl:<span style="color: #000000;">aList</span><span style="color: #000000;">&#91;</span>nItem<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span>, RTRIM<span style="color: #000000;">&#40;</span>oCom:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span>nItem<span style="color: #000000;">&#93;</span>+<span style="color: #ff0000;">" "</span>+oCom:<span style="color: #000000;">aList</span><span style="color: #000000;">&#91;</span>nItem<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3tx04jyv] Y si usas ADS, podrias hacer algo asi como: [code=fw:3tx04jyv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   SQL_Ejecuta<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT codigo,RTRIM(codigo)+' '+nombre nombre FROM sucursal WHERE movimiento=TRUE ORDER BY codigo;"</span>,,,<span style="color: #ff0000;">"SQLALIAS"</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3tx04jyv] y colocar "SQLALIAS" en el alias del DbCombo. Atentamente, Rolando Cochabamba, Bolivia.
Consulta con DBCombo
Por lo entendido y puesto a prueba, solo se puede usar array de una sola dimension, los array aITEMS y aLIST deben ser del mismo tamaño, aList debe ser de tipo CHAR, en cambio aItems puede ser de tipo CHAR o NUMERICO, aList es el array con los datos a mostrar al usuario, lo que se desplegara y aItem contiene el valor o codigo asociado al valor mostrado, al usar el objeto DBCOMBO dede recurso debes asegurarte que no este configurado el SORT, es decir, desactivarlo para que pueda haber coincidencia en los valores de los array o DBF, espero haber aclarado alguna duda, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> TEXTO DESDE LA CLASE DBCOMBO(dbcombo.prg) Notes The TDBCombo class provides a combo-box which displays one field from a table (such as DeptName) and returns another (such as DeptID). Table can be indexed and/or filtered, just set them before calling DBCombo. To use dbcombo as a resource, define the resource as a combobox. Make sure the ComboBox is not configured to sort aList, or DBCombo will not return the matching element of aItems. Then REDEFINE the combobox control as a DBCOMBO. aList must be character. aItems can be character or numeric.
Consulta con DBCombo
Gracias amigos, hice algo parecido a lo que me dice Rolando. Modifiqué la clase para que me permita visualizar 2 datos. Gracias
Consulta con DBCombo
Podrias compartir los cambios en la clase, tambien mi interesa es que muestre 2 campos al usuario, en mi casi codigo y nombre, gracias y saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Consulta con DBCombo
Tal vez esto te sirva, pero funciona con DBFs, los valores son una combinación de los que usa combobox y twbrowse, espero no sea tan difícil entenderle, sorry, perdí el archivo que tenía con ejemplo. [code=fw:17v5cq7x]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#xcommand <span style="color: #0000ff;">REDEFINE</span> COMBROWSE <span style="color: #000000;">&#91;</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">&#93;</span> <cVar> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ALIAS</span> <cAlias> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">VALID</span> &nbsp; <uValid> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">&#91;</span>,<nClrBack><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">STYLE</span> <nStyle> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PICTURE</span> <cPicture> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">CHANGE</span> <uEChange> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> FIELDS <aFields,...><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> FIELDGET <cFieldGet> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <oCbx> := <span style="color: #000000;">&#93;</span> qComBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> <nId>, bSETGET<span style="color: #000000;">&#40;</span><cVar><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <cAlias>, <oWnd>, <nHelpId>, <<span style="color: #000000;">&#123;</span>uValid<span style="color: #000000;">&#125;</span>>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>|Self|<uChange><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <nClrText>, <nClrBack>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">&#123;</span>uWhen<span style="color: #000000;">&#125;</span>>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <acBitmaps>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>|nItem|<uBmpSelect><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <nStyle>, <cPicture>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#123;</span>uEChange<span style="color: #000000;">&#125;</span>><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span><aFields><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <<span style="color: #000000;">&#123;</span>cFieldGet<span style="color: #000000;">&#125;</span>> <span style="color: #000000;">&#41;</span><br /><br />#xcommand @ <nRow>, <nCol> COMBROWSE <span style="color: #000000;">&#91;</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">&#93;</span> <cVar> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ALIAS</span> <cAlias> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">&#91;</span>,<nClrBack><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <pixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <design: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">STYLE</span> <nStyle> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PICTURE</span> <cPicture> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ON</span> <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">CHANGE</span> <uEChange> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> FIELDS <aFields,...><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> FIELDGET <cFieldGet> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <oCbx> := <span style="color: #000000;">&#93;</span> qComBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <nRow>, <nCol>, bSETGET<span style="color: #000000;">&#40;</span><cVar><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <cAlias>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>|Self|<uChange><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <<span style="color: #000000;">&#123;</span>uValid<span style="color: #000000;">&#125;</span>>, <nClrText>, <nClrBack>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.<span style="color: #0000ff;">pixel</span>.>, <oFont>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">&#123;</span>uWhen<span style="color: #000000;">&#125;</span>>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.design.>, <acBitmaps>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>|nItem|<uBmpSelect><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <nStyle>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <cPicture>, <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#123;</span>uEChange<span style="color: #000000;">&#125;</span>><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span><aFields><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <<span style="color: #000000;">&#123;</span>cFieldGet<span style="color: #000000;">&#125;</span>> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:17v5cq7x] [code=fw:17v5cq7x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Por: &nbsp; Enrique Guerra (Quique)</span><br /><span style="color: #B900B9;">// email: <!-- e --><a href="mailto:quique@quiquesoft.com">quique@quiquesoft.com</a><!-- e --></span><br /><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">CLASS</span> qComBrowse <span style="color: #0000ff;">from</span> tComboBox<br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> aColSizes, aHeaders, cField, uValue1, uValue2, cAlias, aActions<br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> aFields &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// campos a mostrar en el browse</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> bFieldGet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// campo que se selecciona</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> cIndice &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// índice que tiene el archivo ::cAlias para recuperarlo en caso de que se cambie durante el browse</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> oBrw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// referencia al browse</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> oDBF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// se utiliza si el browse se hace a un objeto TARRAY u otro para DBFs</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> lBrowse &nbsp; <span style="color: #0000ff;">init</span> .f. <span style="color: #B900B9;">//protected // indica si el browse está activo</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> lSet &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">init</span> .f. <span style="color: #B900B9;">//protected // para evitar la recursividad en SET</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> nBrwLeft &nbsp;<span style="color: #0000ff;">init</span> <span style="color: #000000;">0</span> &nbsp; <span style="color: #B900B9;">// posición izquierda del browse</span><br />&nbsp; &nbsp;<span style="color: #00C800;">data</span> nBrwWidth &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ancho del browse</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> nRow, nCol, bSetGet, cAlias, nWidth, nHeight, oWnd, nHelpId, bChange, ;<br />&nbsp; &nbsp; &nbsp; bValid, nClrText, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign, ;<br />&nbsp; &nbsp; &nbsp; acBitmaps, bDrawItem, nStyle, cPict, bEChange, aFields, bFieldGet <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">reDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, cAlias, oWnd, nHelpId, bValid, bChange, nClrText, ;<br />&nbsp; &nbsp; &nbsp; nClrBack, cMsg, lUpdate, bWhen, acBitmaps, bDrawItem, nStyle, cPict, bEChange, ;<br />&nbsp; &nbsp; &nbsp; aFields, bFieldGet <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> lButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> keyDown<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">message</span> set <span style="color: #00C800;">method</span> _set<span style="color: #000000;">&#40;</span> xNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">method</span> closeBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> nRow, nCol, bSetGet, cAlias, nWidth, nHeight, oWnd, nHelpId, bChange, ;<br />&nbsp; &nbsp; &nbsp; bValid, nClrText, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign, ;<br />&nbsp; &nbsp; &nbsp; acBitmaps, bDrawItem, nStyle, cPict, bEChange, aFields, bFieldGet <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">class</span> qComBrowse<br />&nbsp; &nbsp;::<span style="color: #000000;">aFields</span> &nbsp; := aFields<br />&nbsp; &nbsp;::<span style="color: #000000;">bFieldGet</span> := bFieldGet<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> valType<span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"O"</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oDBF</span> &nbsp; := cAlias<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cAlias</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">classname</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TARRAY"</span>, <span style="color: #ff0000;">"ARRAY"</span>, ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseIf cAlias == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cAlias</span> := <span style="color: #0000ff;">alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cAlias</span> := cAlias<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">super</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> nRow, nCol, bSetGet, , nWidth, <span style="color: #000000;">0</span>, oWnd, nHelpId,, bValid, ;<br />&nbsp; &nbsp; &nbsp; nClrText, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign, acBitmaps, ;<br />&nbsp; &nbsp; &nbsp; bDrawItem, nStyle, cPict, bEChange <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; IF ::oGet <> nil</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;::oGet:bValid := bValid</span><br /><span style="color: #B900B9;">// &nbsp; ENDIF</span><br />&nbsp; &nbsp;::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span> eval<span style="color: #000000;">&#40;</span> bSetGet <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> &nbsp; := bChange<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">self</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">reDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, cAlias, oWnd, nHelpId, bValid, bChange, nClrText, ;<br />&nbsp; &nbsp; &nbsp; nClrBack, cMsg, lUpdate, bWhen, acBitmaps, bDrawItem, nStyle, cPict, bEChange, ;<br />&nbsp; &nbsp; &nbsp; aFields, bFieldGet <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> qComBrowse<br />&nbsp; &nbsp;::<span style="color: #000000;">aFields</span> &nbsp; := aFields<br />&nbsp; &nbsp;::<span style="color: #000000;">bFieldGet</span> := bFieldGet<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> valType<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"O"</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oDBF</span> &nbsp; := cAlias<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cAlias</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">classname</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"TARRAY"</span>, <span style="color: #ff0000;">"ARRAY"</span>, ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cAlias</span> := cAlias<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">super</span>:<span style="color: #0000ff;">reDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, , oWnd, nHelpId, bValid,, nClrText, nClrBack, ;<br />&nbsp; &nbsp; &nbsp; cMsg, lUpdate, bWhen, acBitmaps, bDrawItem, nStyle, cPict, bEChange <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; ::oGet:bValid := bValid</span><br />&nbsp; &nbsp;::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span> eval<span style="color: #000000;">&#40;</span> bSetGet <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> &nbsp; := bChange<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">self</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> lButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> qComBrowse<br /><span style="color: #00C800;">local</span> nFieldSay, bLine, bValid := ::<span style="color: #000000;">bValid</span><br /><span style="color: #00C800;">local</span> oDlg, this := <span style="color: #00C800;">self</span>, aCor<br /><span style="color: #00C800;">IF</span> ::<span style="color: #000000;">bLClicked</span> = <span style="color: #00C800;">nil</span> .OR. Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLClicked</span>, nRow, nCol, nKeyFlags, <span style="color: #00C800;">self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !::<span style="color: #000000;">lBrowse</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">setFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">lBrowse</span> &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">bValid</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;::oGet:bValid := nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> WS_VISIBLE, WS_POPUP <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span> &nbsp; &nbsp; &nbsp; &nbsp;:= tWBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> , , , , ::<span style="color: #000000;">aFields</span>, ::<span style="color: #000000;">aHeaders</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aColSizes</span>, oDlg, ::<span style="color: #000000;">cField</span>, ::<span style="color: #000000;">uValue1</span>, ::<span style="color: #000000;">uValue2</span>,, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">closeBrowse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ::<span style="color: #000000;">bRClicked</span>, ::<span style="color: #000000;">oFont</span>, ::<span style="color: #000000;">oCursor</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">nClrPane</span>, ::<span style="color: #000000;">cMsg</span>, .F., ::<span style="color: #000000;">cAlias</span>, .t.,, .F.,, ::<span style="color: #000000;">bLClicked</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aActions</span><span style="color: #B900B9;">/*, ::bSeek, ::lSeekEOF*/</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oDBF</span> <> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">classname</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"TARRAY"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">setArray</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">aDatos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bLine</span> := ::<span style="color: #000000;">aFields</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endIf</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bGotop</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bGoBottom</span> := <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">goBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bSkip</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> | nSkip | ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">skip</span><span style="color: #000000;">&#40;</span> nSkip <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; elseIf <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> indexOrd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> dbSeek<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">upStable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">goTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endIf</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bChange</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">closeBrowse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bValid</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">bValid</span> := bValid, <span style="color: #B900B9;">/*::oGet:bValid := bValid, */</span>.t. <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <> <span style="color: #ff0000;">"ARRAY"</span>, ::<span style="color: #000000;">cIndice</span> := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> ordSetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> , <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oDlg:<span style="color: #000000;">setControl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg nomodal;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> <span style="color: #000000;">&#40;</span> &nbsp; aCor := getWndRect<span style="color: #000000;">&#40;</span> this:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> aCor<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">20</span>, aCor<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> + this:<span style="color: #000000;">nBrwLeft</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> this:<span style="color: #000000;">nBrwWidth</span> = <span style="color: #00C800;">nil</span>, this:<span style="color: #000000;">nWidth</span>, this:<span style="color: #000000;">nBrwWidth</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">min</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">160</span>, aCor<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> + this:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> - aCor<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">39</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> .t.<br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> keyDown<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> qComBrowse<br /><span style="color: #00C800;">if</span> nKey=VK_DOWN<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oDBF</span>=<span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>dbSkip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,dbGoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">goBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endIf</span><br />&nbsp; &nbsp;::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />elseif nKey=VK_UP<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">oDBF</span>=<span style="color: #00C800;">nil</span>,<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>dbSkip<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,::<span style="color: #000000;">oDBF</span>:<span style="color: #000000;">skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endIf</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">super</span>:<span style="color: #000000;">keyDown</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">method</span> _set<span style="color: #000000;">&#40;</span> xNewItem <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> qComBrowse<br /><span style="color: #00C800;">local</span> bChange := ::<span style="color: #000000;">bChange</span><br /><span style="color: #00C800;">IF</span> !::<span style="color: #000000;">lSet</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lSet</span> := .t.<br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> := <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> empty<span style="color: #000000;">&#40;</span> xNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; xNewItem := eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bFieldGet</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><span style="color: #B900B9;">// &nbsp; IF ::oGet <> nil .AND. ::oGet:cPicture <> nil</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;xNewItem := transform( xNewItem, ::oGet:cPicture )</span><br /><span style="color: #B900B9;">// &nbsp; else</span><br />&nbsp; &nbsp; &nbsp; xNewItem := cValToChar<span style="color: #000000;">&#40;</span> xNewItem <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLeft</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nLeft</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nColPos</span> := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endIf</span><br />&nbsp; &nbsp;::<span style="color: #000000;">setItems</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> xNewItem <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">super</span>:<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span> xNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, xNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> := bChange<br />&nbsp; &nbsp;::<span style="color: #000000;">nAt</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #0000ff;">change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lSet</span> := .f.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">method</span> closeBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">class</span> qComBrowse<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bLostFocus</span> := <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <> <span style="color: #ff0000;">"ARRAY"</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> ordSetFocus<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cIndice</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lBrowse</span> := .f.<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:17v5cq7x]
Consulta con gráficos.
Hola. Buenas tardes. Estoy tratando de graficar una información determinada. he visto en el foro un ejemplo de Cesar (CmSoft), lo he probado y funciona perfecto ( Que NOVEDAD!!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ). Necesito saber como determino los colores en el gráfico de "Torta", pues lo dibuja con colores que no se de donde los toma. He probado haciendo un dialogo con 3 tipos de gráficos juntos. Linea, Barra y Torta. en linea pone 1 solo color. en Barra arma las 4 columnas correspondientes pero a las 4 del mismo color. en Torta pone los colores que no se de donde salen. 1 color por cada "porción" y me muestra al costado un cuadro referencial con los nombres de cada porción/color, esto en los otros 2 gráficos sólo muestra 1 color. Alguien me orienta un poco? Gracias José Camilo
Consulta con gráficos.
José Camilo: Los colores del grafico de tortas los toma fijo de un arreglo de colores que estan definidos en la clase [code=fw:1gti1twe]<div class="fw" id="{CB}" style="font-family: monospace;">aColor:=<span style="color: #000000;">&#123;</span>RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">68</span>, <span style="color: #000000;">90</span>,<span style="color: #000000;">155</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">128</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">128</span>, <span style="color: #000000;">75</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">180</span>, <span style="color: #000000;">50</span>,<span style="color: #000000;">130</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">218</span>,<span style="color: #000000;">181</span>, <span style="color: #000000;">28</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">34</span>,<span style="color: #000000;">107</span>,<span style="color: #000000;">162</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">168</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">166</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">80</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">128</span>, <span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">198</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span>, <span style="color: #000000;">80</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">120</span>,<span style="color: #000000;">155</span>, <span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:1gti1twe] (Linea 1954) Mira el ejemplo en los samples de Fivewin graph.prg [code=fw:1gti1twe]<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;">"TGraph.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_SI .T.<br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_NO .F.<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> oDlg, oGraph, oBtn<br /><br />&nbsp; &nbsp;#ifdef __CLIPPER__<br />&nbsp; &nbsp; &nbsp; SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test.Dll"</span><br />&nbsp; &nbsp;#else<br />&nbsp; &nbsp; &nbsp; SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test32.Dll"</span><br />&nbsp; &nbsp;#endif<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">500</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> GRAPH oGraph;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">200</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TYPE GRAPH_TYPE_BAR;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;YVALUES 3D XGRID YGRID XVALUES LEGENDS<br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp;oGraph:aSeries = { { "Serie 1", CLR_CYAN } }</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ cLegend, nColor, nType, l3D }</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Serie 1"</span>, CLR_CYAN , , <span style="color: #000000;">&#125;</span>,;<span style="color: #B900B9;">//BAR y 3D por defecto</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Serie 2"</span>, CLR_HBLUE, GRAPH_TYPE_LINE, GRAPH_3D_SI <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Serie 3"</span>, CLR_HRED, GRAPH_TYPE_POINT, GRAPH_3D_NO,.T.,.T.,.T.,<span style="color: #ff0000;">"Rojo"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Jan"</span>, <span style="color: #ff0000;">"Feb"</span>, <span style="color: #ff0000;">"Mar"</span>, <span style="color: #ff0000;">"Apr"</span>, <span style="color: #ff0000;">"May"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp;oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 } }</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">14280</span>, <span style="color: #000000;">20420</span>, <span style="color: #000000;">12870</span>, <span style="color: #000000;">25347</span>, <span style="color: #000000;">7640</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">8350</span>, <span style="color: #000000;">10315</span>, <span style="color: #000000;">15870</span>, <span style="color: #000000;">5347</span>, <span style="color: #000000;">12340</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">12345</span>, <span style="color: #000000;">-8945</span>, <span style="color: #000000;">10560</span>, <span style="color: #000000;">15600</span>, <span style="color: #000000;">17610</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">nClrX</span> = CLR_GREEN<br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">nClrY</span> = CLR_RED<br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">nPoint</span>= <span style="color: #000000;">2</span> &nbsp; <span style="color: #B900B9;">//Cross</span><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">lLine</span> = .T. <span style="color: #B900B9;">//muestra la linea amarilla en BAR</span><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">lViewSRLegend</span> = .T.<br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">lViewVal</span> := .t.<br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">cToolTip</span> = <span style="color: #000000;">&#123;</span>|oGph,nSerie,nPos,nVal| oGph:<span style="color: #000000;">aSeries</span><span style="color: #000000;">&#91;</span>nSerie<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>+CRLF+oGraph:<span style="color: #000000;">aYVals</span><span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span>+<span style="color: #ff0000;">": "</span>+cValToChar<span style="color: #000000;">&#40;</span>nVal<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Bars"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">1</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Lines"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">2</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Points"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">3</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Pie"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">4</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"3D"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">l3D</span> &nbsp;:=!oGraph:<span style="color: #000000;">l3D</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"xGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lxGrid</span> &nbsp;:=!oGraph:<span style="color: #000000;">lxGrid</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"yGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lyGrid</span> &nbsp;:=!oGraph:<span style="color: #000000;">lyGrid</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTER</span><br /><br />&nbsp; &nbsp;SET RESOURCES <span style="color: #0000ff;">TO</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1gti1twe]
Consulta con gráficos.
Cesar. MUCHAS GRACIAS por tu tiempo. Ya lo revise al ejemplo del GRAPH.PRG y no logro terminar de entender algunas cosas. (hasta cambie los colores de la torta) <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> He tomado como base tu ejemplo de tiempo atras solo que en el mismo dialogo defino 3 graficos con los mismos datos. Basicamente tengo que graficar los valores de 4 variable, lo hago asi para las barras, el problema es que cada barra la divide en 4 colores y al ponerles el valor 0 me queda 1/4 de la columna con el color correspondiente pero queda una columna muy fina y no se que hago mal. Si me puedes orientar mi error te lo agradezco. los valores son nVar1 := 5000 nVar2 :=2000 nvar3 := 3000 nVar4 := 3500 cada uno es un proveedor la idea es que arme una columna x cada proveedor con un color distinto. oGraf2:aSeries = { { "Actual ", CLR_YELLOW , 1, .t. },; { "V.María", CLR_RED , 1, .t. },; { "V.Nueva", CLR_BLUE , 1, .t. },; { "Cordoba", CLR_GREEN , 1, .t. }; } oGraf2:aData = { { nVar1, 0 , 0 , 0 },; { 0 , nVar2 , 0, 0 },; { 0, 0 , nVar3, 0 },; { 0, 0 , 0, nVar4 } ; } oGraf2:lViewVal = .t. // ver valores oGraf2:lBorders = .t. oGraf2:aYVals = { "Act","VM","VN","CBA" }
Consulta con gráficos.
Asi? [url=https&#58;//imgbb&#46;com/:2fdrcmdb][img:2fdrcmdb]https&#58;//i&#46;ibb&#46;co/bWCFPSv/Sin-t-tulo&#46;jpg[/img:2fdrcmdb][/url:2fdrcmdb] Este sería el código: [code=fw:2fdrcmdb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"TGraph.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_SI .T.<br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_NO .F.<br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> oDlg, oGraph, oBtn<br /><br />   #ifdef __CLIPPER__<br />      SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test.Dll"</span><br />   #else<br />      SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test32.Dll"</span><br />   #endif<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />           <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">500</span><br /><br />    @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> GRAPH oGraph;<br />           <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">200</span>;<br />           TYPE <span style="color: #000000;">1</span>;<br />           YVALUES 3D XGRID YGRID XVALUES LEGENDS<br /><br /><span style="color: #B900B9;">//    oGraph:aSeries = { { "Serie 1", CLR_CYAN } }</span><br /><br /><span style="color: #B900B9;">//                    { cLegend, nColor, nType, l3D }</span><br /><br />    oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Actual"</span>, CLR_CYAN  <span style="color: #000000;">&#125;</span>,;<span style="color: #B900B9;">//BAR y 3D por defecto</span><br />                       <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"V.Maria"</span>, CLR_HBLUE <span style="color: #000000;">&#125;</span>,;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"V.Nueva"</span>, CLR_HRED <span style="color: #000000;">&#125;</span> ,;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Cordoba"</span>, CLR_HGREEN <span style="color: #000000;">&#125;</span> ;<br />                     <span style="color: #000000;">&#125;</span><br /><br />    oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Totales"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//    oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 } }</span><br /><br />    oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span>  <span style="color: #000000;">5000</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">2000</span><span style="color: #000000;">&#125;</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">3000</span><span style="color: #000000;">&#125;</span> ,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">3500</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   <br />    oGraph:<span style="color: #000000;">lViewSRLegend</span> = .F.<br />    oGraph:<span style="color: #000000;">lViewVal</span> := .t.<br /><br />    <br />    <br />    @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"3D"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">l3D</span>  :=!oGraph:<span style="color: #000000;">l3D</span>     ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"xGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lxGrid</span>  :=!oGraph:<span style="color: #000000;">lxGrid</span>     ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"yGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lyGrid</span>  :=!oGraph:<span style="color: #000000;">lyGrid</span>     ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />             <span style="color: #0000ff;">CENTER</span><br /><br />   SET RESOURCES <span style="color: #0000ff;">TO</span><br /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2fdrcmdb]
Consulta con gráficos.
Gracias Cesar. Un abrazo enorme. Buen finde.
Consulta con gráficos.
Cesar. Solo para comentarte, en el ejemplo que que pones pasa lo mismo que comente, y es que lo que termina mostrando en el grafico es como esta compuesta la primera columna del grafico, por eso la grilla se vuelve mas grande y los valores se salen de las columnas correspondientes. el finde semana seguire buscando una solución, si la encuentro te comento. MUCHISIMAS GRACIAS por tu tiempo. José Camilo
Consulta con gráficos.
Creo que entiendo lo que explicas.. Es que en realidad, para una muestra del tipo que buscas, habría que crear solo una serie, pero te la mostrará con un solo color [code=fw:14tlmyuz]<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;">"TGraph.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_SI .T.<br /><span style="color: #00D7D7;">#Define</span> GRAPH_3D_NO .F.<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> oDlg, oGraph, oBtn<br /><br />&nbsp; &nbsp;#ifdef __CLIPPER__<br />&nbsp; &nbsp; &nbsp; SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test.Dll"</span><br />&nbsp; &nbsp;#else<br />&nbsp; &nbsp; &nbsp; SET RESOURCES <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Test32.Dll"</span><br />&nbsp; &nbsp;#endif<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">500</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> GRAPH oGraph;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">200</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TYPE <span style="color: #000000;">1</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;YVALUES 3D XGRID YGRID XVALUES LEGENDS<br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp;oGraph:aSeries = { { "Serie 1", CLR_CYAN } }</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ cLegend, nColor, nType, l3D }</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aSeries</span> = <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Valores"</span>, CLR_CYAN &nbsp;<span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aYVals</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Actual"</span>, &nbsp;<span style="color: #ff0000;">"V.Maria"</span>, &nbsp;<span style="color: #ff0000;">"V.Nueva"</span>, &nbsp;<span style="color: #ff0000;">"Cordoba"</span><span style="color: #000000;">&#125;</span> ;<br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp;oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 } }</span><br /><br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">aData</span> = <span style="color: #000000;">&#123;</span> &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">5000</span>, <span style="color: #000000;">2000</span> , <span style="color: #000000;">3000</span> , <span style="color: #000000;">3500</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">lViewSRLegend</span> = .F.<br />&nbsp; &nbsp; oGraph:<span style="color: #000000;">lViewVal</span> := .t.<br /><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"3D"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">l3D</span> &nbsp;:=!oGraph:<span style="color: #000000;">l3D</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Lines"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">1</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Points"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">2</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Pie"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oGraph:<span style="color: #000000;">nType</span> := <span style="color: #000000;">4</span>, oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"xGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lxGrid</span> &nbsp;:=!oGraph:<span style="color: #000000;">lxGrid</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ oBtn:<span style="color: #000000;">nTop</span>, oBtn:<span style="color: #000000;">nRight</span><span style="color: #000000;">+1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"yGrid"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">lyGrid</span> &nbsp;:=!oGraph:<span style="color: #000000;">lyGrid</span> &nbsp; &nbsp; ,oGraph:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTER</span><br /><br />&nbsp; &nbsp;SET RESOURCES <span style="color: #0000ff;">TO</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:14tlmyuz]
Consulta con gráficos.
Cesar. Eso es lo que no entendia. Gracias por la explicación. ahora si Buen FINDE!!!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> José Camilo
Consulta de Firebird
Hola alguien tiene algun ejemplo o librerias para poder consultar base de datos FDB Firebird 2,5 ??? Gracias, por su atencion. Saludos
Consulta de Firebird
Intenta primero con ODBC <!-- m --><a class="postlink" href="https://www.firebirdsql.org/en/odbc-driver/">https://www.firebirdsql.org/en/odbc-driver/</a><!-- m -->
Consulta de Firebird
Muchas gracias por responder, tendras un ejemplo para saber como realizar la conexion a la base de datos FDB ?, solo requiero consultarla gracias
Consulta de Firebird
Qué version de Fw utilizas?, Harbour o xHarbour?
Consulta de Firebird
xHarbour
Consulta de Firebird
[url:11j4h3ez]https&#58;//github&#46;com/harbour/core/tree/master/contrib/hbfbird/tests[/url:11j4h3ez] [url:11j4h3ez]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=42&t=13760&p=79876&hilit=FIREBIRD+FIVEWIN#p79876[/url:11j4h3ez] Saludos.
Consulta de Firebird
Muchas gracias por su ayuda pero aun no me queda muy claro que necesito para realizarla conexion, tendras algun ejemplo completo desde el inicio ??, y que librerias o clases debo de tener ? gracias
Consulta de Firebird
Hola gracias a su valiosa ayuda ya logre conectarme a la base de datos firebird mediante oCat:ActiveConnection = "Driver=Firebird/InterBase(r) driver;Uid=SYSDBA;Pwd=masterkey;DbName=d:\firebird\Sae50empre01.FDB;" mediante oCat:Tables:Count() //conozco el numero de tablas oCat:Tables( i ):Name //muestra el nombre de la tabla oCat:Tables(i):Columns:Count() //conozco el numero de columnas de la tabla mi duda ahora es, como puedo saber el nombre de cada columna de cada tabla ?? oCat:Tables( i ):Columns( j ):Name ????? Con que instruccion puedo ahora extraer la informacion de la tabla y los campos campo que necesito ????, por ejemplo Tabla: INVE01 Campos: CVE_ART, DESCR, LIN_PROD Gracias por todo
Consulta de Firebird
Alguna idea ??? Saludos
Consulta de Firebird
Como puedo ver los datos de la tabla de firebird ???
Consulta de Firebird
Miar se ayuda: [url:2i1z5ii6]http&#58;//www&#46;girashop&#46;com&#46;br/xharbour/Firebird&#46;htm[/url:2i1z5ii6] [url:2i1z5ii6]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=42&t=13760[/url:2i1z5ii6] Saludos
Consulta de FiveWeb
Estimado Antonio, una consulta sobre FiveWeb. Una vez que tienes tu aplicación compilada y funcionando, supón que es el TUTOR01.exe, que, una vez descargado el xAmpp copiamos a la carpeta cgi-bin, y ejecutamos desde el Chrome y funciona y vemos nuestro primer "hola mundo", ¿como debería ser la instalación en un cliente que utiliza nuestro sistema (consulto porque estoy medio perdido)? Lo utilizaría como una página web? Donde cada vez que hago una modificación lo subo al lugar donde tenga alojada la página? O cada usuario, deberá actualizar la aplicación en su propio xAmpp? Espero se entienda la pregunta... Muchas gracias! Roberto
Consulta de FiveWeb
Hasta donde se yo, tendria que poner la direccion web (o ip externa o interna si es desde dentro de la red) y el nombre del cgi a ejecutar
Consulta de FiveWeb
Lo primero es saber si en el servicio de alojamiento en donde tu cliente tiene alojadas sus páginas web, permiten el uso de CGIs. No suele ser habitual que lo permitan. Por ejemplo en dreamhost sí lo permiten, de ahi que nosotros tengamos ahí las demos de FiveWeb <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Lo segundo es saber si en ese servicio usan Windows o Linux. Por lo general usan Linux. En dreamhost usan Linux y ojo que es de 64 bits (esto hizo que las demos de FiveWeb dejasen de funcionar cuando actualizaron de 32 bits a 64 bits sin decirnos nada). Por último tienes que solicitar acceso SSH al servidor (cosa que permite DreamHost) y asi remotamente puedes programar y crear tu ejecutable remotamente en el mismo servidor de DreamHost. De nuevo, insisto en que DreamHost es de los pocos que te dá acceso SSH (puedes usar Putty para acceder por SSH). Todos los inconvenientes anteriores los eliminas si tu cliente tiene contratado un servidor dedicado, en cuyo caso puede hacer lo que necesite en el ordenador que sirve su web <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Importante: Ten cuidado de no romper nada ó puedes dejarle a tu cliente sin servicio web. Asi que antes de cambiar algo en el servidor asegurate de que sabes bien lo que haces. Es sencillo, pero hay que tener cuidado <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Consulta de FiveWeb
Gracias Maestro! Clarísimo como siempre! Tendré los cuidados que me indicas! Al menos para hacer alguna prueba... me intriga mucho FiveWeb y me gustaría poder aprovechar su potencial y dejar de depender de los programadores web... sin ofender... pero no hay como la programación y la potencia de la aplicación de escritorio!!!! (al menos para mí!) <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Atentamente, Roberto
Consulta de FiveWeb
Antonio, dos consultitas: 1) Se puede hacer en fiveweb un get de una fecha? Como debería hacerse? 2) Se puede realizar un combobox que en vez de hacer: [color=#FF0000:2cla7j04] @ 30, 30 COMBOBOX oCbx ITEMS "one", "two", "three" OF oDlg[/color:2cla7j04] hagamos: [color=#FF0000:2cla7j04] @ 30, 30 COMBOBOX oCbx ITEM vector[1] OF oDlg[/color:2cla7j04] Mil gracias! Roberto
Consulta de FiveWeb
Roberto, 1) [url:3fnsz0bt]http&#58;//digitalbush&#46;com/projects/masked-input-plugin/[/url:3fnsz0bt] 2) Si lo haces como indicas, ¿ Como le vas a proporcionar los items al combobox ?
Consulta de FiveWeb
Gracias Antonio, perdón por las molestias... 1) Respecto a la máscara del campo fecha, hice varios intentos y no puedo resoliverlo... según lo que me apuntaste, debe tener este formato, pero donde lo coloco? En un Picture o donde.. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> $("#date").mask("99/99/9999",{placeholder:"mm/dd/yyyy"}); 2) Supónte que relleno un vector desde un Query, por ejemplo: vector:=oServer:Query("SELECT ciudad,codigo FROM localidades ORDER BY ciudad"):fillarray ésto en FiveWin lo hago: REDEFINE COMBOBOX oCbx VAR variable PROMPTS ArrTranspose(vector)[1] ID 101 OF oDlg como debería hacerlo en FiveWeb? @ 30, 30 COMBOBOX oCbx ITEM vector[1] OF oDlg Mil gracias! Roberto
Consulta de FiveWeb
Roberto, Te lo miro cuanto antes. Hoy ando bastante ocupado Más tarde si puedo...
Consulta de FiveWeb
Antonio, cuando tú puedas está bien. Son sólo pruebas, la idea es lograr hacer una pequeña aplicación con diferentes variantes, si logro hacer un ejemplo completo y funcional, lo subo para compartir. Saludos Roberto
Consulta de FiveWeb
Roberto, He ampliado la clase TGet para que soporte PICTUREs. Si revisas el código fuente de get.prg verás como lo he hecho de forma muy simple: [url:1xs1tk53]https&#58;//bitbucket&#46;org/fivetech/fiveweb/src/1848ea85336becc471c8fe9dcf5215632fe646f2/source/classes/get&#46;prg?at=master[/url:1xs1tk53] En el método Activate() se genera el código que irá a la página web como <script></script> He actualizado el wiki con un nuevo ejemplo testgetp.prg: [url:1xs1tk53]http&#58;//code&#46;google&#46;com/p/fiveweb/wiki/testgetp_prg[/url:1xs1tk53] Ojo, que el repositorio de FiveWeb está ahora en bitbucket, asi que la versión más reciente se puede descargar desde aqui: [url:1xs1tk53]https&#58;//bitbucket&#46;org/fivetech/fiveweb/downloads[/url:1xs1tk53] aunque de momento el wiki se mantiene en "google code" hasta que pueda migrarlo al wiki de bitbucket.
Consulta de FiveWeb
Antonio, admiro tu creatividad para solucionar las cosas de forma tan simple... <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Perfecto lo del picture de las fechas! Cuando puedas, me indicas como puedo hacer lo del combobox... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Sin apuros... Gracias MAESTRO! Roberto
Consulta de FiveWeb
Y respecto al COMBOBOX, si me puedes indicar como retornar el dato seleccionado... Gracias! Roberto
Consulta de FiveWeb
Roberto, He tenido que hacer unos cambios en la clase TCombobox. Ahora funciona bien: Aqui tienes la demo: [url:39syxddo]http&#58;//www&#46;fivetechsoft&#46;net/cgi-bin/testcomb[/url:39syxddo] Aqui la documentación en el wiki: [url:39syxddo]http&#58;//code&#46;google&#46;com/p/fiveweb/wiki/testcomb_prg[/url:39syxddo] Tienes que actualizar FiveWeb, descárgalo desde aqui: [url:39syxddo]https&#58;//bitbucket&#46;org/fivetech/fiveweb/downloads[/url:39syxddo]
Consulta de FiveWeb
Roberto, Puedes usar la función ArrTranspose() así: [code=fw:1fxi5rj4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWeb.ch"</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> oDlg, oCbx<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Using a combobox"</span><br /><br />&nbsp; &nbsp;oCbx = TCombobox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>,,, oDlg,;<br />&nbsp; &nbsp;&nbsp;ArrTranspose<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"one"</span>, <span style="color: #ff0000;">"uno"</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"two"</span>, <span style="color: #ff0000;">"dos"</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"three"</span>, <span style="color: #ff0000;">"tres"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"oCbx"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">220</span>, <span style="color: #000000;">220</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> alert<span style="color: #000000;">&#40;</span> oCbx.value <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1fxi5rj4] He actualizado FiveWeb para incluirle la función ArrTranspose(). Puedes descargar la versión más reciente desde aquí: [url:1fxi5rj4]https&#58;//bitbucket&#46;org/fivetech/fiveweb/downloads[/url:1fxi5rj4]
Consulta de FiveWeb
Excelente Maestro! La consulta primera, era como visualizar un vector en en combobox... un vector cargado previamente con datos por ejemplo de una tabla... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Tú cambiaste como devolver el valor seleccionado... Gracias por la paciencia... Ojalá pudiera hacer cambios sin tener que molestar por ésto, pero no entiendo la lógica de FiveWeb, como por ejemplo porque usas el alert() para visualizar el dato y no funciona el msginfo()... no encuentro la lógica... Gracias otra vez...
Consulta de FiveWeb
Roberto, Entiendo que lo que querías era usar los items resultantes de ArrTranspose(). Tal vez no te entendí bien, en cuyo caso te ruego me lo expliques <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> En FiveWeb hay que diferenciar bien, y esto es lo más "sutil" de FiveWeb, los procesos que tienen lugar en el servidor, y los procesos que tienen lugar en el navegador. Si el combobox cambia de valor, cambia en el navegador, y por eso usamos javascript para acceder al valor seleccionado. Por el contrario, si quisiéramos visualizar un valor que está en el servidor entonces usamos código Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Desde la claúsula ACTION usamos paréntesis para seleccionar la acción en el servidor ó en el navegador. Ejemplo de ACTION con paréntesis: [code=fw:amg9j6hg]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; @ <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:amg9j6hg] En este caso queremos que FiveWeb "traduzca" oDlg:End() a HTML y nos lo envíe ya traducido al navegador. Ejemplo de ACTION en el navegador: [code=fw:amg9j6hg]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; @ <span style="color: #000000;">220</span>, <span style="color: #000000;">220</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> alert<span style="color: #000000;">&#40;</span> oCbx.value <span style="color: #000000;">&#41;</span></div>[/code:amg9j6hg] En este caso lo que estamos es ejecutando código javascript, por eso usamos alert() y oCbx.value que es javascript. Es algo simple, pero cuesta entenderlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Consulta de FiveWeb
Simplemente... gracias!
Consulta de Funcky
Hola estimados, Tengo un trial de Funcky 6.0 para xBase++, necesito saber si funciona con Fwh. Saludos desde Nicaragua, C.A.
Consulta de Funcky
Si, funciona, Funcky pra Xbase++ va por OLE, es un componente COM que se puede utilizar perfectamente con FWH
Consulta de Funcky
Gracias Maestro, Tiene algún ejemplo para saber cómo utilizar el control? Saludos
Consulta de Funcky
No es un control, es un Componente COM y se accesa por OLE. En general el manual de funcky es muy explicito. Lee mi articulo: [url:2feaizxq]http&#58;//google&#46;blogspot&#46;com/2005/03/its-time-to-get-funcky-again&#46;html[/url:2feaizxq]
Consulta de Funcky
Gracias René, Leí tu artículo y en realidad resuntó sencillo, eso es lo importante de tener el correo de el que sabe. Si no es mucha molestia, de casualidad tienes algún ejemplo de utilización de List & Label? Saludos.
Consulta de Funcky
Hola René, En realidad creí que al ver tu ejemplo me iba a funcionar, pero no fué así, me aperece el siguiente error: Error description: Error TOleAuto/-1 Unknown error: TOLEAUTO:NEW No tengo ningún archivo Funcky.ocx, sólo Funcky60.dll El ejecutable que descarqué de tu blog funciona perfectamente. Saludos.
Consulta de Funcky
Jairo: 2 cosillas, el EXE esta construido con la version completa de funcky, por lo que si te falla algun componente es que estas tratando de invocar algun elemento de funcky que no esta en la version de evaluacion. Utiliza la clase TOleAUTO nativa de xHarbour, si estas trabajando con Harbour igual tendras que agregar la TOLE por fuera. El componente funcky lo tienes que registrar en tu ordenador para que pueda funcionar. Esto se hace asi: copia estos archivos a la carpeta windows\system32 FUNCky60.DLL, FUNCky60.TLB y FUNCky60.Dep Luego "registra" desde ms-dos el componente tecleando esto: RegSvr32 \Windows\System32\FUNCky60.DLL Y listo , deberas registrar Funcky en cada uno de los computadores donde vayas a ejecutar el programa.
Consulta de Funcky
Hola René Una preguntita sobre el error "Error description: Error TOleAuto/-1 Unknown error: TOLEAUTO:NEW " Yo compilo con xharbour y a mi me sale éste error en algunas aplicaciones, no te entiendo qué quieres decir con utilizar la clase TOleAuto nativa de xHarbour; yo entiendo que al compilar con xHarbour, éste utiliza sus propias clases. Me puedes aclarar ésto a ver si soy capaz de continuar con éste tema ? Saludos Jose Luis
Consulta de Funcky
Probé utilizando FunckyLt.dll y funcionó, con la salvedad de que esa versión es muy limitada. Ahora estoy tratando de probar List & Label 12, lo he intentado utilizando Ole y también Activex, pero no ha funcionado. Alguna sugerencia? Saludos.
Consulta de Funcky
Hola Jairo Un amigo mio compró list & label, y lo dejó por imposible, no pudo ponerlo en marcha, él pretendía general códigos de barras en formato PDF417, que parece ser que list & label los genera, pero se volvió majareta y no lo consiguíó, ya que todo viene en inglés y principalmente en alemán. Saludos Jose Luis
Consulta de Funcky
Ya pude desplegar el diseñador de List & Label con Activex&#058; oActiveX = TActiveX():New( oWnd, "L12.List-Label12_Ctrl_32.1" ) oActiveX&#058;Do("LlDefineLayout", oWnd:hWnd, "Design List", LL_PROJECT_LIST,"simple.lst") Esta muy interesante. Saludos.
Consulta de Funcky
Intento crear una aplicación con éstad dos líneas, y me da el siguiente error: Error description: Error BASE/1003 Variable does not exist: LL_PROJECT_LIST La verdad es que yo nunca he trabajado con activex , si me puedes mandar una parte de codigo para ver como funciona el tema te lo agradezco. Un saludo Jose Luis
Consulta de Funcky
Hola JoseLuis, Incluye la linea #xtranslate LL_PROJECT_LIST => 2, o bien, utiliza directamente el valor. En "C:\Archivos de programa\combit\LL12\Programmable Samples and Declarations\Alaska Xbase++" se encuentra cmbtll12.ch #include "FiveWin.ch" #include "cmbtll12.ch" Global oActiveX, oWnd, hJob, nRet Function Main() Local cEvents := "" LOCAL aField, aType, aLen, aDec, sName LOCAL FldType, FldContent, DateBuffer, lExpr, I:=1, bAsField:=.T. USE ARTICLE NEW GO TOP aField := Array( ARTICLE->(FCount()) ) aType := Array( ARTICLE->(FCount()) ) aLen := Array( ARTICLE->(FCount()) ) aDec := Array( ARTICLE->(FCount()) ) sname := "article.lst" DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" oActiveX = TActiveX():New( oWnd, "L12.List-Label12_Ctrl_32.1" ) oWnd:oClient = oActiveX // To fill the entire window surface //US: Read field info from database AFields( aField, aType, aLen, aDec ) //US: open List & Label job, retrieve job handle hJob := 1 //US: Enable multiple table lines oActiveX&#058;Do( "LlSetOption", LL_OPTION_MULTIPLETABLELINES, 1) //US: clear DLL-internal field buffer oActiveX&#058;Do( "LlDefineFieldStart" ) // US: Define Fields FOR I = 1 to ARTICLE->(Fcount()) DateBuffer = Replicate(chr(0), 255) DO CASE CASE aType[i] == "N" FldType=LL_NUMERIC FldContent=Str( FieldGet(i) ) CASE aType[i] == "D" FldType=LL_DATE //US: Convert to Julian Date //US: Create function tree lExpr = oActiveX&#058;Do("LlExprParse", "CTOD( FieldGet(i) )", .F. ) //US: Evaluate expression oActiveX&#058;Do("LlExprEvaluate", lExpr, @DateBuffer ) //US: Free expression oActiveX&#058;Do("LlExprFree", lExpr ) FldContent = DateBuffer CASE aType[i] == "L" FldType=LL_BOOLEAN if FieldGet(i) = .F. FldContent="FALSE" else FldContent="TRUE" endif CASE aType[i] == "C" FldType=LL_TEXT FldContent=Trim(FieldGet(i)) // US: for article number generate EAN128-barcode if i=1 DO CASE // US: Distinguish between field and variable declaration CASE bAsField==.F. oActiveX&#058;Do("LlDefineVariableExt", "ARTICLENO_EAN128", Trim(FieldGet(i)), LL_BARCODE_EAN128 ) CASE bAsField==.T. oActiveX&#058;Do("LlDefineFieldExt", "ARTICLENO_EAN128", Trim(FieldGet(i)), LL_BARCODE_EAN128 ) END CASE endif CASE aType[i] == "M" FldType=LL_TEXT FldContent=FieldGet(i) END CASE //US: pass data to List & Label DO CASE CASE bAsField==.F. oActiveX&#058;Do("LlDefineVariableExt", aField[i], FldContent, FldType ) CASE bAsField==.T. oActiveX&#058;Do("LlDefineFieldExt",aField[i], FldContent, FldType ) END CASE NEXT I // US: start designer oActiveX&#058;Do("LlSetPrinterDefaultsDir",hJob,"C:\Windows\Temp") oActiveX&#058;Do("LlDefineLayout",oWnd:hWnd,"Designer",LL_PROJECT_LIST, "article.lst") ACTIVATE WINDOW oWnd VALID ( dbCloseArea(),.t. ) Return
Consulta de Funcky
Hola Jairo Lo he probado y es fantástico. Estaba atascado, y me das pistas para continuar Gracias y saludos Joe Luis
Consulta de Funcky
Hola Jairo, he estado probando tu ejemplo y me funciona perfectamente, en tu ejemplo, ¿Sabrías invocar la vista preeliminar directamente, en vez del diseñador?Muchas Gracias.
Consulta de PREVIEW
Hola otra vez: Estoy haciendo un reporte con PREVIEW y cuando entra en el PREVIEW quita el menu que esta en este momento y pone en la primera linea el menu principal, hay alguna manera de quitar este menu. Gracias
Consulta de PREVIEW
Hola de nuevo: Sigo investigando y lo que hace al crearme el PREVIEW es crear una nueva ventana maximizada y le incorpora el menu principal y la barra de botones, me podrias indicar si sabeis como se puede quitar el codigo es: DEFINE FONT oFont1 NAME "LUCIDA CONSOLE" SIZE 0, -12 BOLD DEFINE FONT oFont2 NAME "LUCIDA CONSOLE" SIZE 0, -9 PrinterSetup() if opci14 = 2 REPORT oReporte TITLE "L I S T A D O D E E M P R E S A S" CENTER ; HEADER "Empresa : " + empr, "Nombre : " + trim(momb), " " LEFT ; FOOTER " ", "Fecha : " + dtoc( datita ), "Página: " + STR( oReporte:nPage,10) RIGHT ; FONT oFont1, oFont2 FROM USER else REPORT oReporte TITLE "L I S T A D O D E E M P R E S A S" CENTER ; HEADER "Empresa : " + empr, "Nombre : " + trim(momb), " " LEFT ; FOOTER " ", "Fecha : " + dtoc( datita ), "Página: " + STR( oReporte:nPage,10) RIGHT ; FONT oFont1, oFont2 ; PREVIEW MODAL CAPTION "Listado Empresas" FROM USER endif COLUMN TITLE "Número" DATA numero SIZE 6 FONT 2 COLUMN TITLE "Apellidos, Nombre" DATA apellidos+ ","+ nombre SIZE 53 FONT 2 COLUMN TITLE "N.I.F." DATA cif SIZE 9 FONT 2 COLUMN TITLE "Dirección" DATA cladir + " " + direccion + " " + numdir SIZE 34 FONT 2 COLUMN TITLE "Teléfono" DATA Telefono SIZE 9 FONT 2 COLUMN TITLE "Teléfono" DATA Telefono2 SIZE 9 FONT 2 COLUMN TITLE "Fax" DATA fax SIZE 9 FONT 2 COLUMN TITLE "" DATA "" SIZE 0 FONT 1 END REPORT ACTIVATE REPORT oReporte while !eof() oFont1:End() oFont2:End() opci14 determina si desea vista previa o no. un saludo
Consulta de PREVIEW
Carlos, Puedes quitarle el menu y la barra de botones, modificando el código de source\classes\rpreview.prg
Consulta de RADIO
la Consulta es como hago para que de acuerdo a una condicion se deshabiliten u oculten algunas opciones de un radiobuttom. se puede? Gracias
Consulta de RADIO
Perdón. ya encontré en el foro como hacerlo. no lo había visto. Gracias
Consulta de RADIO
Buen día. Mostrar siempre la solución al problema por favor. [code=fw:33u2ze6y]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> oRadMenu <span style="color: #0000ff;">VAR</span> nOpcRadioTela &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">202</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">205</span>, &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">206</span>, <span style="color: #000000;">207</span>, <span style="color: #000000;">208</span>, <span style="color: #000000;">209</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">212</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">214</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">216</span> <span style="color: #0000ff;">OF</span> oDlgConf <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// ESTA EM: RESOLUC.TXT y RESOTELA.DBF -> 12/04/2021 - Joao.</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// ATIVO POR ENQUANTO...</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"RESOLUÇÃO: 1024 x 768"</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// ATIVO POR ENQUANTO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"RESOLUÇÃO: 1280 x 768"</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">14</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">15</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">16</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// DESABILITA O RADIO</span><br /><br />&nbsp; &nbsp;oRadMenu:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFnt <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:33u2ze6y] Regards, saludos.
Consulta de RADIO
Gracias Joao !!!
Consulta de TImage (Solucionado)
Amigos del foro ; Si alguien pudiera ayudarme Esto es parte de mi codigo [code=fw:bg9qvlgz]<div class="fw" id="{CB}" style="font-family: monospace;">cFoto    := <span style="color: #000000;">&#40;</span>cAliasPer<span style="color: #000000;">&#41;</span>->numemp + <span style="color: #ff0000;">".JPG"</span><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>!file<span style="color: #000000;">&#40;</span>cFoto<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span>cFoto := oApp:<span style="color: #000000;">xDatos</span> + <span style="color: #ff0000;">"Fotos<span style="color: #000000;">\"</span> + "</span>nohayfoto.JPG<span style="color: #ff0000;">"),)<br /><br />   DEFINE WINDOW oWChild mdichild of oApp:oWnd title "</span>Control de Personal<span style="color: #ff0000;">" ;<br />      from 00,00 TO 00,00 nomaximize<br /><br />   DEFINE FONT  fBusca  NAME "</span>Tahoma<span style="color: #ff0000;">" SIZE 0,-12 bold     OF oDlg<br /><br />   DEFINE DIALOG oDlg RESOURCE "</span>DLG_PERSONAL<span style="color: #ff0000;">" OF oWChild TRANSPARENT<br /><br />      oBrw := TXBrowse():New( oDlg )<br />      oBrw :CreateFromResource(500)<br />      oBrw :cAlias := (cAliasPer)<br /><br />      oBrw :nMarqueeStyle       := MARQSTYLE_HIGHLROW<br />      oBrw :nColDividerStyle    := LINESTYLE_LIGHTGRAY<br />      oBrw :nRowDividerStyle    := LINESTYLE_LIGHTGRAY<br />      oBrw :lColDividerComplete := .t.<br />      oBrw :bClrStd    := { || If( oBrw:KeyNo() % 2 == 0, ;<br />                                   { CLR_BLACK, RGB( 224, 236, 255 ) }, ;<br />                                 { CLR_BLACK, RGB( 189, 211, 253 ) } ) }<br />      oBrw :bClrSel       := {|| { nRGB(  0,  0,255), aGradBarSel } }  // para barra de linea selecc cuando el control no tiene el foco<br />      oBrw :bClrSelFocus := { || { CLR_BLACK, aGradBarSelFocus } }     // para barra de linea selecc cuando el control tiene el foco<br /><br />      oBrw :nFreeze             := 1<br />      oBrw :nFooterLines        := 1<br /><br />      oCol := oBrw:AddCol()<br />      oCol:bStrData  := { || (cAliasPer)->numemp }<br />      oCol:cHeader   := "</span>Empleado<span style="color: #ff0000;">"<br />      oCol:nWidth        := 70<br />      oCol:nDataStrAlign := AL_LEFT<br />      oCol:bLClickHeader := { || CambiaIndice( cAliasPer, 1, oBrw, @cSayInd, oDlg ), oBrw:gotop() }<br /><br />      oCol := oBrw:AddCol()<br />      oCol:bStrData := { || (cAliasPer)->nomcom}<br />      oCol:cHeader  := "</span>Nombre<span style="color: #ff0000;">"<br />      oCol:nWidth        := 300<br />      oCol:nDataStrAlign := AL_LEFT<br />      oCol:bLClickHeader := { || CambiaIndice( cAliasPer, 2, oBrw, @cSayInd, oDlg ), oBrw:gotop() }<br /><br />      oBrw:bKeyChar := {|nKey| IIF(nKey=13,f_Empleados(2),) }<br /><br />      oBrw:bChange := {|nKey| (cSay1 := iif(EMPTY((cAliasPer)->fecbaj), "</span>Activo<span style="color: #ff0000;">", "</span>Baja<span style="color: #ff0000;">"), ;<br />                               cSay2 := ALLTRIM((cAliasPer)->puesto), ;<br />                               cSay3 := (cAliasPer)->numemp, ;<br />                               cSay4 := ALLTRIM((cAliasPer)->regfed), ;<br />                               cSay5 := ALLTRIM((cAliasPer)->regims), ;<br />                               cSay6 := PoneFecha( @cSay6, oDlg), ;<br />                               cSay7 := DToC((cAliasPer)->fecbaj), ;<br />                               cFoto := oApp:xDatos + "</span>Fotos\<span style="color: #ff0000;">" + (cAliasPer)->numemp + "</span>.JPG<span style="color: #ff0000;">", ;<br />                               iif(!file(cFoto), (cFoto := oApp:xDatos + "</span>Fotos\<span style="color: #ff0000;">" + "</span>nohayfoto.JPG<span style="color: #ff0000;">"),), ;<br />                               PonFoto(oImage,cFoto,oDlg), ;<br />                               oDlg:Update() ) }<br /><br />      oBrw:bLDblClick:= { || f_Empleados(2) }             //si hacemos doble click sobre una PERSONA la seleccinamos y cargamos sus datos en las viables que necesitamos<br /><br />      oBrw:bSeek := { |c| (cAliasPer)->(DbSeek( Upper(c) )) }<br /><br />   REDEFINE IMAGE oImage VAR cFoto       ID 601 OF oDlg UPDATE ;<br />      ADJUST<br /><br />   ACTIVATE DIALOG oDlg Valid oWChild:End() nowait on init (oninit( oDlg ), PonFoto(oImage,cFoto,oDlg), oImage:LoadImage( ,  cFoto), oBrw:refresh(), oDlg:Update()); oDlg:move(0,0)<br />      oWChild:bgotfocus:={||oDlg:setfocus()}<br /><br />   ACTIVATE WINDOW oWChild ON INIT (oWChild:setsize(oDlg:nwidth,oDlg:nheight), oWChild:Move(20,20)) ;<br />      VALID (DbCerrar( oWChild, cMen, 2 ))<br /><br />RETURN NIL<br /><br />STATIC FUNCTION PonFoto(oImage,cFoto,oDlg)<br />   /*IF !FILE(cFoto)<br />      cFoto := oApp:xDatos + "</span>Fotos\<span style="color: #ff0000;">" + "</span>NOHAYFOTO.JPG<span style="color: #ff0000;">"<br />   ENDIF*/<br />   oImage:LoadImage(,cFoto)<br />   //oImage:Refresh()<br />   //oDlg:Refresh()<br /><br />RETURN NI<br /></span></div>[/code:bg9qvlgz] imagen [url]<a href="http://www.freeimagehosting.net/commercial-photography/"><img src="http://i.imgur.com/hJ8utwY.jpg" alt="commercial photography locations"></a>[/url] No se muestra la imagen al entrar a la opcion, solo hasta que me muevo de registro De antemano muchas gracias
Consulta de TImage (Solucionado)
\samples\SILVIO.PRG Saluod.s
Consulta de TImage (Solucionado)
Karinha Muchas gracias Fijate que quedo solucionado cambiando esta linea ACTIVATE DIALOG oDlg Valid oWChild:End() nowait on init (oninit( oDlg ), PonFoto(oImage,cFoto,oDlg), oImage:LoadImage( , cFoto), oBrw:refresh(), oDlg:Update()); oDlg:move(0,0) Por esta ACTIVATE DIALOG oDlg Valid oWChild:End() nowait on init (oninit( oDlg ), PonFoto(oImage,cFoto,odlg), oBrw:gotop()); oDlg:move(0,0)
Consulta de dialogos para Antonio
Antonio Disculpa la consulta directa, pero no he recibido respuesta ni muchas luces a la siguiente pregunta: He diseñado una aplicacion bastante grande, pero el Cliente al verla se encontro con un problema, El tamaño de la Letra esa muy chica , son dialogos hechos en Workshop (fuentes San Seriaf de 8pts ) y me ha pedido que le agrande las Letras: Eso me significaria que debo de cambiar todos mis Dialogos quizas a un tamaño de 10 o 20 pts. pero obviamente se distorsionan los campos , asi como tambien los gets deberia de cambiarlo.. es decir casi rehacer el diseño... Aqui la consulta : No hay forma de cambiar el tipo de letra y/o tamaño de letra sin que se deforme los dialogos o ventanas.. ??? encontre unas notas en <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21941">viewtopic.php?f=6&t=21941</a><!-- l --> pero la verdad no lo comprendi Podras decirme si es posible ello o debo resignarme a rejustar todo a mano ?? Gracias por tu respuesta Lubin