topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse y SetArray(aArray) (SOLUCIONADO)
Estimados El ejemplo que propone Daniel sale una columna fantasma "Col1", a mi una columna "A" como se soluciona esto?
xBrowse y SetArray(aArray) (SOLUCIONADO)
una consulta, como puedo sumar una columna del xbrowse en el footer
xBrowse y SetOrder()
Holas.. Como poder mostrar el Bitmap asociado en el header al iniciar el xBrowse. Ahora se activa solo cuando presiono sobre el Header oBrw:aCols[x]:bLClickHeader:={|| oBrw:aCols[x]:SetOrder()} Quiero mostrarlo apenas se construya el xBrowse, no solo cuando se presiona sobre el header para activar el SORT. Alguna idea... Gracias
xBrowse y SetOrder()
The code [code=fw:3bq75rvw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span>:=<span style="color: #000000;">&#123;</span>|| oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:3bq75rvw] is not necessary and this is redundant. It is enough if we assign value to oCol:cSortOrder (OrderTag/Index name). If oCol:cSortOrder is assginged a value, xBrowse automatically calls the oCol:SetOrder() method when the user clicks on header and after sorting the column, also evaluates oCol:bLClickHeader. When XBrowse starts, if the database is already sorted, the bitmap on the header of the sorted column is automatically shown, even without clicking on the header. ( There was a bug in some earlier versions, but in all recent versions this is shown correctly) Can you inform the FWH version you are using?
xBrowse y SetOrder()
Nageswaragunupudi You are absolutely rigth... this piece of code was a "legacy" from and old program. I took it off, assign oBrw:aCols[x]:SetOrder(xValue) and everything is working fine. Thanks... From Chile Adolfo
xBrowse y SetOrder()
Rao: Could you send me your email address I have a question. Send to <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->. It has to do with code you posted which seems to have disapered. Re: a dat file. Thank you in advance.
xBrowse y SetOrder()
Not correct: [code=fw:1p9afu9e]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span>xValue<span style="color: #000000;">&#41;</span></div>[/code:1p9afu9e] Correct: [code=fw:1p9afu9e]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cSortOrder</span> := <OrderTagName></div>[/code:1p9afu9e] Actually in the recent versions of xBrowse, we need not take the trouble of assigning oCol:cSortOrder := <TagName>. If we construct XBROWSE with the command syntax with COLUMNS clause, XBrowse itself takes the trouble of scanning all index expressions and finding the appropriate Tag Name for each column. I advise using XBrowse's advanced capabilities to our best advantage.
xBrowse y SetOrder()
nageswaragunupudI I don't use the Columns Clause, since I'm using it in a generic browse controller, so, I pass parameters to it, in this case a Recordset, Columns Names, Pictures, Columns sizes etc etc One of this parameter is the Recordset order or an Array of Orders to activate or not the posibility of using it to do softseeks, direct seeks or filters within the Browse. Any way, I found the solution, now I have the BITMAP at the moment of building the xBrowse. Thanks again
xBrowse y SetOrder()
Como obtengo el valor del header
xBrowse y SetOrder()
Prueba con esto? [code=fw:13f3a366]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>nColumna<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span></div>[/code:13f3a366]
xBrowse y SetOrder()
No esto no soluciono mi problema, me explico mejor , quiero saber cual es la columna activa por la cual esta ordenado el xbrowse
xBrowse y SetOrder()
[code=fw:1tmxvc0r]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cHeader</span></div>[/code:1tmxvc0r]
xBrowse y SetOrder()
Gracias Nageswaragunupudi se me resolvio mi problema
xBrowse y SetOrder()
una pregunta como puedo bloquear el tamaño de una fila por ejemplo las columna las bloqueos con olbx:acols[1]:lallowsizing:=.f. pero como lo hago con las filas gracias
xBrowse y SetOrder()
oLbx:lAllowRowSizing := .f.
xBrowse y SetOrder()
ok, funciono a la perfeccion, gracias
xBrowse y TArray sample ?
¿Alguien ha utilizado aquí Tarray clase para mostrar una variedad de xBrowse?Cualquier muestra?Yo entiendo que el uso conjunto Tarray hace muy fácil la gestión deAny sample xBrowse with TArray ?.Anser
xBrowse y TDatabase
Hola, Estoy tratando que un xBrowse, en el que hojeo una DBF usando la clase TDatabase, ordene por la columna en la que clickeo sobre su Header. hago: [code=fw:2gy4xcb9]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">SetoDbf</span><span style="color: #000000;">&#40;</span> oDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"CODIGO"</span>,<span style="color: #ff0000;">"NOMBRE"</span>,<span style="color: #ff0000;">"ELEMENTO"</span><span style="color: #000000;">&#125;</span> , .t., .f. <span style="color: #000000;">&#41;</span></div>[/code:2gy4xcb9] y al clickear sobre los headers correspondientes sale el indicador que se presionó pero no ordena por esa columna. Calculo que me está faltando indicarle los TAGS del orden pero no sé como hacerlo. Pido una ayuda por favor. Gracias. Rolando <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
xBrowse y TDatabase
Ya le encontré la vuelta. Gracias de todos modos. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse y TDatabase - reforma
Buen día, Comparto un problema que sucede cuando intento cerrar un dialog que contiene un xBrowse. El Problema se dá si se cierra el dialog cuando se está editando un campo dentro de la xBrowse como puede verse en el video que subí a SoftLatinoxBase: [url:2dwt7rur]http&#58;//softlatinoxbase&#46;idomyweb&#46;com/foro/viewtopic&#46;php?f=2&t=37&p=58&sid=b192f6fb2cfaa50d1549a7a65c1d6a23#p58[/url:2dwt7rur] No se si el problema es por mi código que muestro a continuación: [code=fw:2dwt7rur]<div class="fw" id="{CB}" style="font-family: monospace;">oCol            := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>        := <span style="color: #ff0000;">"ELEMENTO"</span><br />oCol:<span style="color: #000000;">bStrData</span>       := <span style="color: #000000;">&#123;</span> || oDbf:<span style="color: #000000;">ELEMENTO</span> <span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">nHeadStrAlign</span>  := AL_CENTER<br />oCol:<span style="color: #000000;">nDataStrAlign</span>  := AL_LEFT<br />oCol:<span style="color: #000000;">nWidth</span>         := <span style="color: #000000;">140</span>                          <br />oCol:<span style="color: #000000;">cSortOrder</span>    := <span style="color: #ff0000;">"GRELENOM"</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> := EDIT_GET          <br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>|oCol, xVal, nKey| iif<span style="color: #000000;">&#40;</span> nKey != VK_ESCAPE, ;<br />                            <span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">ELEMENTO</span>:=xVal , oDbf:<span style="color: #000000;">save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> , <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"@!"</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTooltip</span>:=<span style="color: #ff0000;">"Clickear una vez con el izquierdo para ordenar por ELEMENTO"</span></div>[/code:2dwt7rur] Pero lo solucioné reformando apenas el "METHOD _FieldPut( nPos, uValue ) CLASS TDataBase" [code=fw:2dwt7rur]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> _FieldPut<span style="color: #000000;">&#40;</span> nPos, uValue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDataBase<br /><br /><span style="color: #00C800;">local</span> lLocked  := .f.<br /><span style="color: #00C800;">local</span> lCalcCol := <span style="color: #000000;">&#40;</span> nPos > <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nArea</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> FCount<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 /><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBuffer</span><br />   <span style="color: #00C800;">if</span> lCalcCol<br />      <br /><span style="color: #B900B9;">//   ( ::nArea )->( Eval( ::aStruct[ nPos ][ DBS_BLOCK ], Self, uValue ) )</span><br />      <br />   <span style="color: #00C800;">try</span>                                        <span style="color: #B900B9;">//   </span><br />     <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nArea</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aStruct</span><span style="color: #000000;">&#91;</span> nPos <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> DBS_BLOCK <span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">Self</span>, uValue <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">// by RolandoCerella 07092013</span><br />   catch                                                                        <span style="color: #B900B9;">// evita que de error al cerrar</span><br />     <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>                                                                 <span style="color: #B900B9;">// el dialog estando en edición</span><br />   end                                                                          <span style="color: #B900B9;">// de un campo</span><br /> <br />      <br />   <span style="color: #00C800;">else</span><br />      ::<span style="color: #000000;">aBuffer</span><span style="color: #000000;">&#91;</span> nPos <span style="color: #000000;">&#93;</span> := uValue<br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">else</span><br />   <br />   ...</div>[/code:2dwt7rur] Espero sea de utilidad. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse y TDatabase - reforma
Esa es una mala idea. Te explico: has encerrado la escritura del valor del campo en la DBF en un [color=#FF0000:11e1e9me][size=150:11e1e9me]try catch[/size:11e1e9me][/color:11e1e9me] por lo que si algún día eso diera un error diferente simplemente se saldría del programa sin avisos ni nada lo cual será un crebadero de cabeza. La solución es que antes cerrar el dialog cierres el objeto TDataBase: oDbf:Close() Posiblemente tendrás que destruir antes el Browse que hace referencia al objeto TDataBase, creo que deberías poner esto: oBrw:Destroy() oDbf:Close() Espero que sea de tu utilidad <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
xBrowse y TDatabase - reforma
xmanuel, Gracias por responder. [i:1waj6hlo]Ya hice antes la prueba colocando lo que mencionas en el valid, pero hace lo mismo[/i:1waj6hlo] <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Además, te comento que debí implementar una función para cerrar la oDbf porque si "clickeo" sobre la "X" para cerrar el dialog cuando se está ejecutando un kinetic scroll, también dá error (ver post [url:1waj6hlo]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=18866&p=99018&hilit=kinetic#p99018[/url:1waj6hlo]) Comento además que [b:1waj6hlo]estos dialogs en los que dá problemas son NOWAIT, [u:1waj6hlo]en los dialogs que no son NOWAIT, lo que tu comentas cierra bien el dialog[/u:1waj6hlo][/b:1waj6hlo]. De todos modos y, a mi modesto entender, no creo que esta reforma dé tanto problema. A los sumo no guarda el cambio en el campo, pero sólo lo hace si hay un error y, [b:1waj6hlo]si lo dejo como está, tampoco guarda el cambio y la aplicación se cierra, lo cual sí es muy molesto[/b:1waj6hlo]. A lo agregado, se le podría implementar un [code=fw:1waj6hlo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"No se guardaron los datos cambiados, se cerró el diálogo estando en edición"</span>,<span style="color: #ff0000;">"ATENCION"</span><span style="color: #000000;">&#41;</span></div>[/code:1waj6hlo] y con esto quedaría un aviso del error. Si se te ocurre otra solución ([b:1waj6hlo]usando dialogs NOWAIT[/b:1waj6hlo]), por favor hazla conocer. Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse y TDatabase - reforma
Jajaja sigo pensando que esa solución no me gusta <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> pero bueno cada uno sabe lo que tiene que hacer... Tampoco me gusta que para eso se use la clausula VALID, ya que debería ser solo para la validación de expresiones logicas. Antonio debería incluir una clausla ON CLOSE en la clase TWindows y TDialog que procese el mensaje de windows WM_CLOSE aunque se use el aspa de la ventana o un botón para salir. El evento onClose de la ventana es el que tiene que procesar eso y el que puede enviar un método ::Close() o no para que la ventana se cierre o no pero nunca una clausula VALID que, para mi gusto lo que tiene que hacer es asegurar que el valor introducido o seleccionado de un cotrol visible es correcto o no. Seguro que Antonio toma nota... mientras tanto prueba: oBrw:CancelEdit() oDbf:Close()
xBrowse y TDatabase - reforma
La clausula ON CLOSE, como bien dices, No Existe. Hasta ahora, en dialogos NOWAIT siempre procedí finalizando objetos y demás dentro del valid (no sé de otra forma para hacerlo). Por otra parte, lo que sugieres: oBrw:CancelEdit() oDbf:Close() Tampoco da resultado. se sigue cerrando dando un error. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse y WorkShop
Estoy probando cambiar en una aplicación un wBrowse por xBrowse, creado desde Resource. Me da error al abrir el diálogo. En WorkShop, puedo elegir entre Twbrowse y TcBrowse.- ¿Necesito un nuevo control para usar WorkShop y xBrowse?.- Aunque sé que Pelles es mejor, prefiero continuar con WS.
xBrowse y WorkShop
Manuel: Debes usar TXbrowse como nombre del control en lugar de TWBrowse. Saludos
xBrowse y WorkShop
Armando, Muchas gracias. Ya está solucionado con tu ayuda.
xBrowse y array vacio
He notado que si un control xBrowse muestra un array vacio los métodos del ratón no funcionan. Hay alguna manera que estos se ejecuten ?, Mis herramientas son fwh 12.04, harbour y Bcc. Gracias.
xBrowse y array vacio
+1
xBrowse y array vacio
y si proporcionas un ejemplo, para poder hacer una prueba? saludos..
xBrowse y array vacio
Gracias por contestar, aqui el ejemplo [code=fw:39w4tkoj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">Local</span> oDlg<br />&nbsp; &nbsp; <span style="color: #00C800;">Local</span> oBrw<br />&nbsp; &nbsp; <span style="color: #00C800;">Local</span> aDatos := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">From</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">Pixel</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xBrowse</span> oBrw Array aDatos <span style="color: #0000ff;">Size</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">Of</span> oDlg&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; With Object oBrw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'mensaje 1'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRClicked</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'mensaje 2'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">Dialog</span> oDlg <br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> <span style="color: #000000;">0</span><br />&nbsp;</div>[/code:39w4tkoj] Saludos
xBrowse y array vacio
Horacio, bLDClickData,; // codeblock to be evaluated when left double [b:2ds0x78g]clicking on the data[/b:2ds0x78g] bRClickData // codeblock to be evaluated when right [b:2ds0x78g]clicking on the data[/b:2ds0x78g] Yo entiendo que si no hay data (ningun item en el browse), no se evalua. Saludos.
xBrowse y array vacio
[quote="FranciscoA":3jg8yxjm]Horacio, Yo entiendo que si no hay data (ningun item en el browse), no se evalua. Saludos.[/quote:3jg8yxjm] Francisco, Yo creo que no ha de ser asi Los eventos y mensajes de un control han de funcionar independientemente de su contenido Saludos
xBrowse y array vacio
Gracias Francisco y Cristóbal por respoder, estoy de acuerdo con Cristóbal. El control debe poder ejecutar sus métodos independientemente de los datos. En mi caso los uso para llamar a una tabla con datos para llenar esta última y también un menú contextual. Sin embargo los métodos del teclado funcionan aún sin datos. Hay alguna manera de activar los métodos del ratón ? Muchísimas gracias. Saludos
xBrowse y array vacio
Only way is to modify xbrowse.prg . Methods RButtonDown, LButtonUp and LDblClick. At the end of these methods forward the call to Super: example return Super:RButtonDown( nRow, nCol, nKeyFlags )
xBrowse y bRclick
Hola Necesito hacer que si presiono el botón derecho del mouse sobre una columna, se abra un menú de opciones pero no logro capturar este evento. Algo así como [code=fw:23euzqqh]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bRclick</span>:=<span style="color: #000000;">&#123;</span>|| MiFuncion<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:23euzqqh] ¿Cómo puedo hacerlo?. Gracias. Rolis
xBrowse y bRclick
Rolis, te dejo un ejemplo: [code=fw:3dj15ej4]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />&nbsp; obrw:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | menuayutec<span style="color: #000000;">&#40;</span>nrow, ncol, obrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3dj15ej4] Espero que sea esto lo que buscas. Un saludo José Luis
xBrowse y bRclick
José Luis, No es justo lo que necesito, pero me diste una idea para lograrlo. Lo que necesito es que mi función se ejecute cuando haga Rclick sobre la columna 1 del xBrowse. Logré hacerlo así: [code=fw:1ffrub2s]<div class="fw" id="{CB}" style="font-family: monospace;">obrw:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>nCol><span style="color: #000000;">25</span> .and. nCol<<span style="color: #000000;">175</span> , MiFuncion<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:1ffrub2s] Muchas gracias por responder. Saludos. Rolis
xBrowse y bRclick
Hola <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Yo lo tengo a si <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> [code=fw:2y8h1bc9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />oApp:<span style="color: #000000;">oBrwX01</span>:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | ShowPopup<span style="color: #000000;">&#40;</span> nRow, nCol, oApp:<span style="color: #000000;">oBrwX01</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ShowPopup<span style="color: #000000;">&#40;</span> nRow, nCol, oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oPopup, oFont<br /><br />   <span style="color: #0000ff;">MENU</span> oPopup <span style="color: #0000ff;">POPUP</span><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Tipo de letra."</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">SelFont</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Consulta rapida."</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Reporte rapido."</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oPopup <span style="color: #0000ff;">OF</span> oBrw <span style="color: #00C800;">AT</span> nRow, nCol<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:2y8h1bc9]
xBrowse y bRclick
Simpler way: [code=fw:31ocebvb]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bPopUp</span> := <span style="color: #000000;">&#123;</span> |oCol| MyPopUp<span style="color: #000000;">&#40;</span> oCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />.....<br />......<br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MyPopUp<span style="color: #000000;">&#40;</span> oCol <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oPop<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oPop <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2007</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">'Right Align'</span> <span style="color: #0000ff;">ACTION</span> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp;,,,,,<br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oPop<br /><br /><br />&nbsp;</div>[/code:31ocebvb] or [code=fw:31ocebvb]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bPopUp</span> := <span style="color: #000000;">&#123;</span> |o| MyPopUp<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:31ocebvb] There is no need to use bRClicked.
xBrowse y color (Solucionado parcialmente)
Al entrar en un diálogo con un xBrowse pinto las lineas de diversos colores según el valor de un campo. Lo hace correcto. Sin embargo, quiero cambiar el pintado de toda la linea al pintado de una sóla columna según un CHECKBOX. El ON CHANGE del CHECKBOX no me funciona. Pongo aquí el código por si pudiérais ayudarme. [code=fw:1c0sem3c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Local</span> lColorLinea := .T.<br /><span style="color: #00C800;">Local</span> oColorLinea<br /><span style="color: #B900B9;">////</span><br />........................<br />....................................<br />  <span style="color: #00C800;">IF</span> LColorLinea<br />     <span style="color: #B900B9;">//</span><br />     oBrw:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK, <span style="color: #000000;">&#40;</span>IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"A"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                   IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"B"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                   IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"C"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                   IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"D"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">130</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">250</span><span style="color: #000000;">&#41;</span>,;<br />                                   IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"E"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,CLR_WHITE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>,;<br />  <span style="color: #00C800;">ELSE</span><br />     <span style="color: #B900B9;">//</span><br />     oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK, <span style="color: #000000;">&#40;</span>IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"A"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                              IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"B"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                              IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"C"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                              IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"D"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">130</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">250</span><span style="color: #000000;">&#41;</span>,;<br />                                              IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"E"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,CLR_WHITE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />  <span style="color: #00C800;">ENDIF</span><br />  <span style="color: #B900B9;">//</span><br /><br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oColorLinea  <span style="color: #0000ff;">VAR</span> LColorLinea  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">513</span> <span style="color: #0000ff;">OF</span> oDlg;<br />           <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span>IIF<span style="color: #000000;">&#40;</span>LColorLinea, oBrw:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK, <span style="color: #000000;">&#40;</span>IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"A"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"B"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"C"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"D"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">130</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">250</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"E"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,CLR_WHITE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>,;<br />                              rw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK, <span style="color: #000000;">&#40;</span>IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"A"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"B"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"C"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"D"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">130</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">250</span><span style="color: #000000;">&#41;</span>,;<br />                                                                     IIF<span style="color: #000000;">&#40;</span>DATOS->Letra=<span style="color: #ff0000;">"E"</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,CLR_WHITE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />                                                                     oBrw:<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 /><br /><br /> </div>[/code:1c0sem3c]
xBrowse y color (Solucionado parcialmente)
Disculpad mi insistencia, pero no será que una vez activado el xBrowse, [b:lkzdnqrl]oBrw:bClrStd [/b:lkzdnqrl]ya no se puede cambiar ? ¿Le ha ocurrido a alguien?
xBrowse y color (Solucionado parcialmente)
La primera parte la he solucionado con [b:352m8vg4]oBrw:bClrStds [/b:352m8vg4] <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21571">viewtopic.php?f=3&t=21571</a><!-- l -->
xBrowse y columnas con colores degradados
Hola FiveWinners. Estoy convirtiendo los browse de TsBrowse a xBrowse, en TsBrowse tengo columnas con colores degradados y NO encuentro como hacerlo lo mismo con xBrowse. Alguien tendra un ejemplo de como indicarle a xBrowse que cada columna tiene un color diferente pero degradado ? Gracias por la ayuda. Saludos
xBrowse y cuenta corriente
Estimados amigos: Estoy tratando de hacer un programa para llevar las cuentas corrientes bancarias y deseo saber si es posible mostrar la cuenta en un xBrowse como los listados bancarios, donde muestra el saldo día a día. Muchas gracias Saludos Ruben Fernandez. Intenté llevando el saldo dia a dia con un Do While al ingresar un movimiento, para actualizar los saldos, pero me parece una barbaridad recorrer la BD cada vez que se ingresa un movimiento.
xBrowse y cuenta corriente
[quote="RuFerSo":1avmps7h]Estimados amigos: Estoy tratando de hacer un programa para llevar las cuentas corrientes bancarias y deseo saber si es posible mostrar la cuenta en un xBrowse como los listados bancarios, donde muestra el saldo día a día. Muchas gracias Saludos Ruben Fernandez. Intenté llevando el saldo dia a dia con un Do While al ingresar un movimiento, para actualizar los saldos, pero me parece una barbaridad recorrer la BD cada vez que se ingresa un movimiento.[/quote:1avmps7h] Hola Ruben Fernandez, tengo hecho algo parecido , a lo que mencionas,pero esta inconcluso por falta de tiempo, y ahora lo que necesito es una rutina para mostrar mi catalogo de cuentas en forma de arbol, expandir y disminuir , y claro que si se puede mostrar, asi como tambien, de fechas postfechadas o en transito, como le llames, pero esta inconcluso. Saludos y buen dia. Atte: Adrian C. C.
xBrowse y cuenta corriente
Hola Adrián, creo que el foro vi algo parecido a lo que necesitas, para lo que necesito yo, creo que el generar los saldos cada vez que ingrese un movimiento, es lo que me queda, vere si no queda muy lento. Saludos y Gracias Ruben Fernandez
xBrowse y cuenta corriente
hola buen dia cada ves que guardes un movmiiento no hay que generar todos los saldos solamente la parte que cambia por ejemplo factura 1506 cliente hellen fecha 14/02/2012 importe 1000 caa vez que grabes un registro append blank replace factu->factura with factura replace factu->cliente with cliente replace factu->fecha with fecha replace factu->importe with importe tienes que tener otras bases de datos que tenga los acomulados por ejemplo acumulado de totales por dia base acumdia fecha ----->indexado por fecha importe entonces abajo donde guardas los datos de la factura , tienes que hace la busqueda del dia select acumdia acumdia->(dbseek(fecha)) if found() // si lo encuentra quiere decir que ya ay importes del dia acumdia->(dbrlock()) acumdia->importe with acumdia->importe+importe acumdia->(dbunlock()) else // si no lo encuentra quiere decir ay que agregar la estadistica acumdia->(dbappend()) acumdia->importe with acumdia->importe+importe acumdia->(dbunlock()) Endif entocnes acumdia llevara el control del total de x dia ,,, y asi no reprocesas cada vez que pidas la suma de x dias ,,, solamente te posicionaes en la fecha y tomas el total si requieres acumulados por año tiens que tener otra base de datos base----> acumaño indexado por año acumaño->(dbseek(str(year(fecha)))) if found() // si lo encuentra quiere decir que ya ay importes del año acumaño->(dbrlock()) acumaño->importe with acumdia->importe+importe acumaño->(dbunlock()) else // si no lo encuentra quiere decir ay que agregar la estadistica acumaño->(dbappend()) acumaño->importe with acumdia->importe+importe acumaño->(dbunlock()) Endif por cada estadisticas tienes que tener una base de datos si requieres los saldos por cliente tienes que tener una base de datos que lleve la estadistica y asi sucesivamente saludos
xBrowse y cuenta corriente
[quote="RuFerSo":1of8qns5]Hola Adrián, creo que el foro vi algo parecido a lo que necesitas, para lo que necesito yo, creo que el generar los saldos cada vez que ingrese un movimiento, es lo que me queda, vere si no queda muy lento. Saludos y Gracias Ruben Fernandez[/quote:1of8qns5] Gracias Ruben, por la info, pero solo encuentro, las rutinas para menus, y con checkbox, pero nada parecido a una rutina de catalogo de cuentas, y lo que comenta el compañero, es asi como yo lo tengo , una base de datos con movimientos y en la otra con acumulados de saldos, de cada cuenta bancaria y en el browse, mostrar tus saldos, de cada cuenta bancaria, yo uso ListBox, de Hernan Ceccarelli, tengo pensado en migrar a XBrowse, pero como repito, no se me ha dado tiempo, solo son detalles, que ando modificando mi sistema. Saludos y buen dia Ruben. Atte: Adrian C. C.
xBrowse y cuenta corriente
Hola benjiben143, esa solución me gusta, no lo habia visto de esa manera, muchas gracias. Gracias de nuevo, excelente. Saludos Ruben Fernandez
xBrowse y grupos..
Amigos... Algun ejemplo de xBrowse y grupos.... algo vi en su momento pero no puedo encontrar el post. Quiero agrupar ciertos datos en un xBrowse, ya sean un array y un Query de la tDolphin. SI alguien tiene un ejemplo basico, yo lo descompongo en lo que realmente necesito. Entiendo que tambien se pueden mostrar los subtotales de las columnas que llevan la clausula TOTAL, o no? Eso.. gracias de antemano
xBrowse y grupos..
Adolfo, [url] <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=18963&p=99421&hilit=merge#p99421">viewtopic.php?f=3&t=18963&p=99421&hilit=merge#p99421</a><!-- l --> [/url] espero te sirva. salu2, Ariel.
xBrowse y grupos..
Gracias Airel Lo habia visto, para pocas ocurrencias de un solo valor esta bien, pero tengo mas ocurrencias de las que caben en pantalla, por eso lo de agrupar los datos segun una o dos columnas, ademas que necesito mostrar subtotales por cada item de grupo. Alguna otra idea por ahi. Gracias de antemano
xBrowse y grupos..
Has probado un tree? -Alberta SubTotal Sandy Importe Hans Importe .... +AllSton SubTotal -Alpine SubTotal Holger Importe Edwar Importe ...
xBrowse y grupos..
Adolfo, Esto tal vez te sirva: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=23627&p=126958#p126958">viewtopic.php?f=3&t=23627&p=126958#p126958</a><!-- l -->
xBrowse y imagenes
Muy buenas foro, teneis un ejemplo para insertar imagenes en un xBrowse, yo tengo varios pero no encuentro el define TYPE_IMAGE Un Saludo.
xBrowse y imagenes
Softruz, que versión usas?. Según WhatsNew, TYPE_IMAGE comienza a usarse a partir de la versión de Marzo/2009: * New: new EDIT_TYPE value for TXBROWSE cells: TYPE_IMAGE it is used for new DATA bStrImage String data codeblock (returns a string with imagen name) Saludos.
xBrowse y imagenes
Muchas gracias, estaba utilzando la versión 901 pero en la 906 si está. Gracias por todo.
xBrowse y texto Hotkey (SOLUCIONADO)
Buenos Dias Amigos del Foro: tengo una Database con el campo NOMBRE donde aparece el texto "Procter & Gamble" xBrowse lo muestra como "Procter _Gamble" deduzco que intenta hacer un hotkey leyendo el signo & pero el campo es un texto simple que debe leerse como tal. Que debo hacer para desactivar ésta característica y presentar el texto tal como es? Muchas gracias por su atención Julio César Gómez Cortéz Godryc Experiencias Lima Perú
xBrowse y texto Hotkey (SOLUCIONADO)
Please let us know which version of FWH you are using. The text is displayed correctly in the recent versions.
xBrowse y texto Hotkey (SOLUCIONADO)
ok nageswaragunupudi thanks for your response. I was using the 6.12 version of fwh wich is very old.
xBrowse y texto Hotkey (SOLUCIONADO)
I do not have the sources of 6.12. I can not tell you the exact lines to make the modification. But I try to guide you. In xbrowse.prg, search for METHOD DefStyle( ... ) In the method you may see a line of code which looks something like nStyle := nOr( DT_MODIFYSTRING,....) Please add DT_NOPREFIX also in that nOr ( ... )
xBrowse y texto Hotkey (SOLUCIONADO)
Hyderabad, again, thanks ... I tried your solution, and it works well. Solutionated !
xBrowse – memofields
Is there a row stretch depending on the amount of text and lines possible for memofields? Thanks in advance Otto
xBrowse – memofields
Here is a screenshot from the application I would like to program. It would be fine if [i:xppzjj7i]RowHeight [/i:xppzjj7i] would be set automatically depending on the rows of test inside the memofield. Best regards, Otto Best regards, Otto [img:xppzjj7i]http&#58;//www&#46;atzwanger-software&#46;com/fw/lookup&#46;jpg[/img:xppzjj7i]
xBrowse – memofields
Otto, with MlCount () you can count the lines of a memofield dependig on its lenght [quote:zuhi445l]MLCount( <cString> , ; [<nLineLen>] , ; [<nTabSize>] , ; [<lWrap>] , ; [<lLongLines>] ) --> nLineCount [/quote:zuhi445l] Try[code=fw:zuhi445l]<div class="fw" id="{CB}" style="font-family: monospace;">nRowHeight := MlCount <span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span></div>[/code:zuhi445l]
xBrowse – memofields
Thank you Stefan, I think nRowHeight is part of paint method and can only be set for all rows not for a unique row as I want. This would be possible if nRowHeight would be part of PaintData. Best regards, Otto
xBrowse – memofields
Otto, I tried to do this a long time ago with TWBrowse and found it to be very difficult. One problem is with the display of the browse. Each time the screen is drawn you have to figure out if there is enough room to display each record depending on the number of rows that will be required to display the amount of text in the memo field. Or, you have to display as many lines of the memo as will fit, and then display one more line when the browse is scrolled up. Of course these things can be solved, but there will still be a tremendous calculation overhead when displaying the browse which will cause a slowdown in the display speed. I don't believe this capability is built into the XBrowse either. Regards, James
xBrowse – memofields
Hello James, thank you. But if you look into paint method you will see that immediately after the DATAPAINT method nRowPos++ follows. I will try what happens if I switch the nRowPos calculation into DATAPAINT. Sure it will be necessary to limit the amount of text. Best regards, Otto
xBrowse – memofields
Mr. Otto This is possible. Step 1. Find the longest memoline. Step 2. Find the height in pixels required to accommodate this line with the help of this code: [code=fw:2mqg3c2w]<div class="fw" id="{CB}" style="font-family: monospace;">nHeight := DrawTextEx<span style="color: #000000;">&#40;</span> hDC, cLine, aRect, nOr<span style="color: #000000;">&#40;</span> DT_CALCRECT, DT_WORDBREAK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:2mqg3c2w] hDC is oBrw's DC cLine is the longest line. aRect := { 0,0,oBrw:nHeight,oCol:nWidth } Step 3. Now set this height as oBrw:nDataHeight A little trial and error may be needed at your end.
xBrowse – memofields
Rao, Unfortunately, he wants EACH record to have a height based on the length of the memo of that record. This would be a nice feature if there is a lot of variability in the length of the memos. But as I pointed out in my previous message, this could cause a significant calculation overhead which may make it too slow to be acceptable. Regards, James
xBrowse – memofields
Mr James XBrowse (or any other browse I know) can not have different heights for different rows, unlike column widths. I understood, rightly or wrongly, that Mr. Otto wanted to set rowheight of the browse in such a way that the longest memoline is fit snugly. Many times, I too felt the need to have varying rowheights for different rows like Excel, but it needs major changes in xbrowse. At many places the logic of xbrowse depends on fixed number of rows and rowheight (unless the window is resized). Hope someday xbrowse will provide this facility too.
xBrowse – memofields
Hi Otto and all others, yes, there are a lot of situation where you need to browse additional text. Here one example: In an order we want to show additional parts of [color=#0000FF:yg9dx4hj]some[/color:yg9dx4hj] positions and/or text, the user can toggle (show or not to show) the additional parts: Browse ‘order positions’ with additional parts and text: [img:yg9dx4hj]http&#58;//img87&#46;imageshack&#46;us/img87/5248/orderwithadditionalpart&#46;jpg[/img:yg9dx4hj] Browse ‘order positions’ without additional parts only with text: [img:yg9dx4hj]http&#58;//img87&#46;imageshack&#46;us/img87/1288/orderwithoutadditionalp&#46;jpg[/img:yg9dx4hj] (The screen shots are from our DOS-styled app, not yet migrated to FiveWin <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> ) In addition to the fixed height of the rows – as Mr. Rao explained - there is another limitation of the commonly known browses: For each row in the browse you need a record in the leading table (Alias). With other words: As far as I know, it’s [color=#FF0000:yg9dx4hj]not[/color:yg9dx4hj] possible to alter the leading table, you [color=#FF0000:yg9dx4hj]can’t[/color:yg9dx4hj] do something like this: Row 1: table1->Field1… n Row 2: table1->Field1…n … Row n: [color=#FF0000:yg9dx4hj]table2->[/color:yg9dx4hj]Field1…n … Row n+k: table1->Field1…n … So all informations you want to browse, must have a (leading) record in the leading table. This applies also to memo text (fields): So, if you want to show (browse) the content of a memo text (field), you have to break down the content in a corresponding amount of records, that’s all! To show how flexible and effective this approach is, let’s take a look at the following table: [list:yg9dx4hj]Name C/32 – Name of anything Sort N/2 – Sort number of all records belonging to <Name> P01 C/32 – The first parameter/property/etc. you want to store for <Name> P02 C/32 – The second parameter/property/etc. you want to store for <Name> … Pnn C/32 – The nn-th parameter/property/etc. you want to store for <Name>[/list:u:yg9dx4hj] Assuming that the fields <P01> … <Pnn> have very variable different lengths, e.g. from “” up to [color=#0000FF:yg9dx4hj]3168[/color:yg9dx4hj] (99 * 32) characters, the corresponding browse can looks like : [img:yg9dx4hj]http&#58;//img140&#46;imageshack&#46;us/img140/8466/variablefieldlenght&#46;jpg[/img:yg9dx4hj] Of course you can build a browse method to toggle between “show only first records of each <Name>”/”Show all records” as shown in the example ‘order positions’ and you can even simulate ‘[color=#0000FF:yg9dx4hj]variable field length[/color:yg9dx4hj]’ with DBF-tables! Conclusion: There is no need to deal with memo fields. Quite contrary to: You have some big advantages, e.g. browsing, full text search, etc. Of course, you have some more expenditure by handling (Get - Show/Edit - Store) the additional fields and so on, but for me the advantages are convincingly.
xBrowse – memofields
[quote:3h46p79r]So all informations you want to browse, must have a (leading) record in the leading table. This applies also to memo text (fields): So, if you want to show (browse) the content of a memo text (field), you have to break down the content in a corresponding amount of records, that’s all! [/quote:3h46p79r] This is not necessary for xbrowse. XBrowse can display long text content wrapped in the column depending on the height and width of the row. So, memofields ( even photos ) can be displayed in the cells with multiple rows within the cell. The only problem is that different rows can not have different row-heights.
xBrowse – memofields
Dear Mr. Rao, yes, you are right. Sorry, if my explanation are misleading. I'm loving the tremendous features of xBrowse and I admit that I havn't utilised all of them yet <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Of course you can display fields, pictures, memo fields or other informations from other tables in the columns, but you cannot browse informations without having a record - might be comletely empty - in the 'leading' table! Can you confirm? My intention was and still is to introduce a method to display long text (continuous text) without using memo fields and with a normal row height!
xBrowse – memofields
Hello Frank, hello Mr. Rao, Therefore I asked in another post if ColDividerStyle/RowDividerStyle could be selected for each row and col. [quote:2gg4g6pi]Do you think it is possible to move the drawing of the dividers from the Paint to the PaintData method?[/quote:2gg4g6pi] This way one could read all data which you want show into an array and you can draw the dividers individually. You could split memofields this way into different lines. This way I could simulate different row heights. Best regards, Otto
xBrowse – memofields
Frose, [quote:6ukognow]Of course you can display fields, pictures, memo fields or other informations from other tables in the columns, but you cannot browse informations without having a record - might be comletely empty - in the 'leading' table![/quote:6ukognow] You could just put all the data into an array and then browse that. Regards, James
xBrowse – memofields
Otto, [quote:309ug7i8]Therefore I asked in another post if ColDividerStyle/RowDividerStyle could be selected for each row and col.[/quote:309ug7i8] Instead you could try turning off the separators and using different background colors. You could alternate the colors but sometimes more than one row would be the same color making it look like there was a taller single row. Regards, James
xBrowse – memofields
Oh yes, the result can look like: [img:13v2lpu4]http&#58;//img171&#46;imageshack&#46;us/img171/8869/memotext&#46;jpg[/img:13v2lpu4]
xBrowse – memofields
Frank, Hey, that looks great! Will you show us how you did the codeblock for the colors? Regards, James
xBrowse – memofields
Hello James, hello Frank, thank you. I will try to use bold font for the first row of a "database" record. Best regards, Otto
xBrowse – memofields
James, here is a working sample: [code=fw:v1fla4hv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> COLOR_ORANGE RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">135</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#define</span> COLOR_BLUE   RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">156</span>, <span style="color: #000000;">169</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oWnd<br />   <span style="color: #00C800;">LOCAL</span> oBrw<br />   <span style="color: #00C800;">LOCAL</span> oCol<br />   <span style="color: #00C800;">LOCAL</span> aDaten := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #B900B9;">// Fill array</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">01</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Freilebende        "</span>, <span style="color: #ff0000;">"Nun sind           "</span>, <span style="color: #ff0000;">"Wenn ich mit Xao im "</span>, <span style="color: #ff0000;">"Anfhren sollte man  "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">02</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Gummib„rchen       "</span>, <span style="color: #ff0000;">"Gummib„rchen       "</span>, <span style="color: #ff0000;">"Kino bin, red ich   "</span>, <span style="color: #ff0000;">"auch noch: manche    "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">03</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"gibt es nicht. Man "</span>, <span style="color: #ff0000;">"weder wabbelig     "</span>, <span style="color: #ff0000;">"ihm so lange ein,   "</span>, <span style="color: #ff0000;">"m”gen die Grnen am  "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">04</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"kauft sie in       "</span>, <span style="color: #ff0000;">"noch z„h; sie      "</span>, <span style="color: #ff0000;">"daá das die besten  "</span>, <span style="color: #ff0000;">"liebsten, manche     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">05</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Packungen an der   "</span>, <span style="color: #ff0000;">"stehen genau an der"</span>, <span style="color: #ff0000;">"sind, bis er sie    "</span>, <span style="color: #ff0000;">"die Gelben. Ich mag  "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">06</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Kinokasse. Dieser  "</span>, <span style="color: #ff0000;">"Grenze. Auch das   "</span>, <span style="color: #ff0000;">"alle isst. Sie      "</span>, <span style="color: #ff0000;">"am liebsten die      "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">07</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Kauf ist der Beginn"</span>, <span style="color: #ff0000;">"macht sie spannend."</span>, <span style="color: #ff0000;">"schmecken           "</span>, <span style="color: #ff0000;">"Roten. Sie glhen    "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">08</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"einer fast         "</span>, <span style="color: #ff0000;">"Gummib„rchen sind  "</span>, <span style="color: #ff0000;">"scheusslich und     "</span>, <span style="color: #ff0000;">"richtig rot, und     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">09</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"erotischen und sehr"</span>, <span style="color: #ff0000;">"auf eine           "</span>, <span style="color: #ff0000;">"fhlen sich         "</span>, <span style="color: #ff0000;">"ihr                  "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"ambivalenten       "</span>, <span style="color: #ff0000;">"aufreizende Art    "</span>, <span style="color: #ff0000;">"scheusslich an.     "</span>, <span style="color: #ff0000;">"Himbeergeschmack     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">11</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Beziehung          "</span>, <span style="color: #ff0000;">"weich. Und da sie  "</span>, <span style="color: #ff0000;">"Dagegen das sch”ne, "</span>, <span style="color: #ff0000;">"f„hrt wie Napalm     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Gummib„rchen-      "</span>, <span style="color: #ff0000;">"weich sind, kann   "</span>, <span style="color: #ff0000;">"herk”mmliche Gu     "</span>, <span style="color: #ff0000;">"ber die             "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">13</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"Mensch.            "</span>, <span style="color: #ff0000;">"man sie auch       "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"Geschmacksknospen.   "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">14</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"ziehen. Ich mache  "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"Eine meiner          "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">15</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"das sehr gerne. Ich"</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"Lieblingsphantasien  "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">16</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"sitze im dunklen   "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">", wo es um           "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">17</span>, <span style="color: #ff0000;">"One  "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"Kino und ziehe     "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"Gummib„rc            "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">18</span>, <span style="color: #ff0000;">"Two  "</span>, <span style="color: #ff0000;">"This               "</span>, <span style="color: #ff0000;">"Is a               "</span>, <span style="color: #ff0000;">"short               "</span>, <span style="color: #ff0000;">"text                 "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_BLUE   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">19</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"In dichter und     "</span>, <span style="color: #ff0000;">"Nie wieder         "</span>, <span style="color: #ff0000;">"Schon zu  Hause     "</span>, <span style="color: #ff0000;">"Und wieder und       "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">20</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"geraffter Form     "</span>, <span style="color: #ff0000;">"Gummib„rchen, denke"</span>, <span style="color: #ff0000;">"beunruhigen  mich   "</span>, <span style="color: #ff0000;">"wieder geht es mir   "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">21</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"spiegelt sich im   "</span>, <span style="color: #ff0000;">"ich jedesmal. In   "</span>, <span style="color: #ff0000;">"wieder Gerchte     "</span>, <span style="color: #ff0000;">"durch den Kopf:      "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">22</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"Verh„ltnis zum     "</span>, <span style="color: #ff0000;">"der Zwischenzeit   "</span>, <span style="color: #ff0000;">"ber einen          "</span>, <span style="color: #ff0000;">"Gummib„rchen sind    "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">23</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"Gummib„rchen eine  "</span>, <span style="color: #ff0000;">"l„chle ich dann    "</span>, <span style="color: #ff0000;">"Marktvorstoá der    "</span>, <span style="color: #ff0000;">"Spitze.              "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">24</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"menschliche Love-  "</span>, <span style="color: #ff0000;">"ber den           "</span>, <span style="color: #ff0000;">"Japaner mit         "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">25</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"Affair wider.      "</span>, <span style="color: #ff0000;">"Absolutheitsanspruc"</span>, <span style="color: #ff0000;">"Gummireis oder      "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">26</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"h den diese Momente"</span>, <span style="color: #ff0000;">"Gummischweinen.     "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">27</span>, <span style="color: #ff0000;">"Four "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"erheben.           "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">28</span>, <span style="color: #ff0000;">"Five "</span>, <span style="color: #ff0000;">"This               "</span>, <span style="color: #ff0000;">"Is a               "</span>, <span style="color: #ff0000;">"short               "</span>, <span style="color: #ff0000;">"text                 "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_BLUE   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">29</span>, <span style="color: #ff0000;">"Six  "</span>, <span style="color: #ff0000;">"Empty              "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">30</span>, <span style="color: #ff0000;">"Seven"</span>, <span style="color: #ff0000;">"Here is a little   "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_BLUE   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   AAdd<span style="color: #000000;">&#40;</span> aDaten, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">31</span>, <span style="color: #ff0000;">"Seven"</span>, <span style="color: #ff0000;">"bit more text      "</span>, <span style="color: #ff0000;">"                   "</span>, <span style="color: #ff0000;">"                    "</span>, <span style="color: #ff0000;">"                     "</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_BLUE   <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">//</span><br />   AEval<span style="color: #000000;">&#40;</span> aDaten,    <span style="color: #000000;">&#123;</span> | x, n | aDaten<span style="color: #000000;">&#91;</span> n , <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := HB_OemToAnsi<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                aDaten<span style="color: #000000;">&#91;</span> n , <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> := HB_OemToAnsi<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                aDaten<span style="color: #000000;">&#91;</span> n , <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> := HB_OemToAnsi<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                aDaten<span style="color: #000000;">&#91;</span> n , <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> := HB_OemToAnsi<span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <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 /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"xBrowse with alternating row color"</span><br /><br />   oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">// Column 1</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"Recno"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">1</span><br />   <span style="color: #B900B9;">// Column 2</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"Name"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">2</span><br />   oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || IIf<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nArrayAt</span> == <span style="color: #000000;">1</span>, ;<br />                          aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, ;<br />                          IIf<span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> RTrim<span style="color: #000000;">&#40;</span> aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == Upper<span style="color: #000000;">&#40;</span> RTrim<span style="color: #000000;">&#40;</span> aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span> - <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                          <span style="color: #ff0000;">""</span>, ;<br />                          aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #B900B9;">// Column 3</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"P01"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">3</span><br />   <span style="color: #B900B9;">// Column 4</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"P02"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">4</span><br />   <span style="color: #B900B9;">// Column 5</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"P03"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">5</span><br />   <span style="color: #B900B9;">// Column 6</span><br />   oCol           := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"P04"</span><br />   oCol:<span style="color: #000000;">nArrayCol</span> := <span style="color: #000000;">6</span><br />   <br />   <span style="color: #B900B9;">// set color</span><br />   oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span><br />   <br />   oBrw:<span style="color: #000000;">nRowDividerStyle</span> = LINESTYLE_NOLINES<br />   oBrw:<span style="color: #000000;">nColDividerStyle</span> = LINESTYLE_NOLINES<br /><br />   oBrw:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /><br />   oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aDaten <span style="color: #000000;">&#41;</span><br /><br />   oBrw:<span style="color: #000000;">lRecordSelector</span> := .T.<br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oWnd:<span style="color: #000000;">oClient</span> := oBrw<br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:v1fla4hv] For the first approach, I've defined a new 'bSkip', trying to set the colors dynamically, but it doesn't work correctly! Just try it and you'll see what I mean: [code=fw:v1fla4hv]<div class="fw" id="{CB}" style="font-family: monospace;">   oBrw:<span style="color: #000000;">bSkip</span>  := <span style="color: #000000;">&#123;</span> | nSkip, nOld | ;<br />                    IIf<span style="color: #000000;">&#40;</span> nSkip == <span style="color: #00C800;">nil</span>, nSkip := <span style="color: #000000;">1</span>, <span style="color: #000000;">&#41;</span>, ;<br />                    nOld := oBrw:<span style="color: #000000;">nArrayAt</span>, ;<br />                    oBrw:<span style="color: #000000;">nArrayAt</span> += nSkip, ;<br />                    oBrw:<span style="color: #000000;">nArrayAt</span> := <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                    Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bOnSkip</span>, oBrw <span style="color: #000000;">&#41;</span>, ;<br />                    lClrFlag := IIf<span style="color: #000000;">&#40;</span> aDaten<span style="color: #000000;">&#91;</span> nOld, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> == aDaten<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, lClrFlag, !lClrFlag <span style="color: #000000;">&#41;</span>, ;<br />                    oBrw:<span style="color: #000000;">nArrayAt</span> - nOld <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || IIf<span style="color: #000000;">&#40;</span> lClrFlag, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_ORANGE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, COLOR_BLUE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:v1fla4hv] Perhaps you or someone else have a good idea to determine the color of the rows with 'bSkip'?
xBrowse's bEditBlock
[code=fw:c7o80n2r]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> COL_PC <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| picklist<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"profit"</span>, <span style="color: #ff0000;">"cntr"</span>, <span style="color: #00C800;">self</span>, LN_CNTR<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> COL_PC <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">&#123;</span>|oGet, oCol| IsValidPC<span style="color: #000000;">&#40;</span>oGet, <span style="color: #00C800;">self</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:c7o80n2r] Is it possible to make the edit field to enter edit state after :bEditBlock has been evaluated? The idea is to force user to press Enter/Tab to go to the next field thus firing :bEditValid
xBrowse() Dialog size
I was looking at the xBrowse / xBrowser() function and was seeking a way to set the dialog size. By default it is pretty small, and looking at the source code, I don't see how I can pass a fixed size. I will be creating a dynamic document using arrays, and it's perfect for displaying it, except the dialog is tiny. The source code keeps cutting the size of the width and height. Is there a way to pass values in this function to set the size, or do I just need to create a different viewer using the class. Tim
xBrowse() Dialog size
Like this ? [code=fw:137ryjhj]<div class="fw" id="{CB}" style="font-family: monospace;">XBROWSER aPics <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"DOWNLOADED IMAGES"</span> COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> SETUP <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FileName"</span>, <span style="color: #ff0000;">"Image"</span> <span style="color: #000000;">&#125;</span>, ;<br />   oBrw:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">200</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">300</span>, ;<br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cDataType</span> := <span style="color: #ff0000;">'F'</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataBmpAlign</span> := AL_CENTER <span style="color: #000000;">&#41;</span><br /><br />XBROWSER aPics <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"WEB IMAGES"</span> SETUP <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">200</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">300</span>, ;<br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cDataType</span> := <span style="color: #ff0000;">'F'</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataBmpAlign</span> := AL_CENTER <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:137ryjhj] I had this info from Mr. Rao in this topic : [url:137ryjhj]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=33746[/url:137ryjhj]
xBrowse() Dialog size
Unfortunately that will not work. nRowHeight is the size of the cell, not the dialog. Think of this as a browse with many lines. I want to open the dialog in a larger mode than the default ( 1000 wide x 700 high ), but each row is the standard size. The user only sees 3 lines of data in the default ... and I want them to see far more ... there will likely be about 30 in the report. Tim
xBrowse() Dialog size
[code=fw:sx4vo6k8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> test<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, aData := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Sunday"</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"Monday"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;XBROWSER aData SETUP <span style="color: #000000;">&#40;</span> oDlg := oBrw:<span style="color: #000000;">oWnd</span>, oDlg:<span style="color: #000000;">bStart</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">1000</span>,<span style="color: #000000;">700</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:sx4vo6k8]
xBrowse() Problem with FWH9.11 on SQL Alias
Hello Mr. Antonio, [b:151enh3f][color=#0000FF:151enh3f]Before 9.11[/color:151enh3f][/b:151enh3f] this is working perfectly [code=fw:151enh3f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />   <span style="color: #B900B9;">//simplified...</span><br /><br />    dbSelectArea<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">IF</span> AdsCreateSQLStatement<span style="color: #000000;">&#40;</span> cAlias, ADS_CDX, hADS <span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #00C800;">IF</span> ADSExecuteSQLDirect<span style="color: #000000;">&#40;</span> cSQL <span style="color: #000000;">&#41;</span><br /><br />           <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span><br /><br />       END<br /><br />   END<br /> </div>[/code:151enh3f] [b:151enh3f][color=#FF0000:151enh3f]with FWH9.11[/color:151enh3f] has error[/b:151enh3f] [img:151enh3f]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/xbrowseError&#46;jpg[/img:151enh3f]
xBrowse() Problem with FWH9.11 on SQL Alias
Frances, Fixed. We are uploading a new FWH 9.11 build right now, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse() Problem with FWH9.11 on SQL Alias
[quote="Antonio Linares":190sa5mx]Frances, Fixed. We are uploading a new FWH 9.11 build right now, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:190sa5mx] Thank you Sir for the fixed. Regards, Frances
xBrowse() en una sola linea
Saludos, soy nuevo en el uso del xBrowse y estoy tratando de usarlo en una sola línea, al estilo antiguo, tipo DBedit(), se puede ?? Por ejemplo tengo un arreglo y su titulo, hasta aquí me funciona Ok : xBrowse ( aUsers, "Empresas a las que tiene acceso" ) Ahora aUsers{} tiene 2 columnas, como puedo hacer para asignarles un nombre/titulo a la columna ??, lo hice asi : (pero me bota error) : xBrowse ( aUsers, "Empresas a las que tiene acceso", {"Codigo", "Nombre"} ) Que mas características puedo asignar en una sola línea, título, ancho, color, Etc. Busque en xBrowse.ch pero no me quedo claro ....., gracias por su atención ...
xBrowse() en una sola linea
Enrique, La function XBrowse, segun mi version, esta limitada a: function XBrowse( uData, cTitle, lAutoSort, bSetUp, aCols, bSelect, lExcel, lFastEdit ) Sin embargo, puedes hacer algo como esto: [code=fw:1niy8ifj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> MyXBrowse<span style="color: #000000;">&#40;</span> uData, cTitle, aTitCols, lAutoSort, bSetUp, aCols, bSelect, lExcel, lFastEdit <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> &nbsp;uData &nbsp; &nbsp;:= <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTitle &nbsp; := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span>, uData, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'O'</span>, uData:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">'XBROWSE'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lAutoSort:= .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bSetUp &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lExcel &nbsp; := .t. ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTitCols:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//AQUI</span><br />&nbsp;</div>[/code:1niy8ifj] Y despues de estas lineas: if lAutoSort @ nHt - 28, 10 say 'Search For :' size 30,10 pixel of oDlg @ nHt - 28, 45 say oBrw:oSeek prompt oBrw:cSeek ; size nWd-115,10 pixel update of oDlg ; color CLR_RED,CLR_YELLOW ATail( oDlg:aControls ):Cargo := 115 @ nHt - 28,nWd - 60 checkbox oBrw:lSeekWild prompt 'WildSeek' ; size 50, 10 pixel of oDlg ; on change ( oBrw:Seek(), oBrw:SetFocus() ) ATail( oDlg:aControls ):Cargo := -60 endif [code=fw:1niy8ifj]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span>aTitCols<span style="color: #000000;">&#41;</span><br />     AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,n| o:<span style="color: #000000;">cHeader</span> := aTitCols<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>, o:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">endif</span><br /> </div>[/code:1niy8ifj] Entonces ya podrias hacer: [code=fw:1niy8ifj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">xBrowse</span> <span style="color: #000000;">&#40;</span> aUsers, <span style="color: #ff0000;">"Empresas a las que tiene acceso"</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Codigo"</span>, <span style="color: #ff0000;">"Nombre"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:1niy8ifj] Espero te sirva. Saludos.
xBrowse() en una sola linea
Ahora bien, recuerda que existe el comando XBROWSE que es muy poderoso y facil de usar: @1,1 XBROWSE oBrw OF oDlg ARRAY HEADERS SIZE LINES AUTOSORT FASTEDIT etc. Saludos.
xBrowse() en una sola linea
Francisco, GRACIAS, creo que me voy a probar por comando como sugieres ...
xBrowse() en una sola linea
Aqui tienes un ejemplo: [code=fw:jduxu06l]<div class="fw" id="{CB}" style="font-family: monospace;">dbUseArea<span style="color: #000000;">&#40;</span>.t.,,cPath+<span style="color: #ff0000;">"<span style="color: #000000;">\U</span>suarios"</span>,<span style="color: #ff0000;">"Usuarios"</span>,.t.<span style="color: #000000;">&#41;</span><br />cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"USUARCTRL"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"USUARIOS"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FONT</span> oFont TRANSPARENT<br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">118</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ALIAS</span> cAlias ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLUMNS <span style="color: #ff0000;">"Nombre"</span>,<span style="color: #ff0000;">"Administ"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADERS <span style="color: #ff0000;">"Nombre de usuario"</span>,<span style="color: #ff0000;">"Tipo de acceso"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FOOTERS LINES CELL<br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nEditType</span> := <span style="color: #000000;">0</span> ,; &nbsp; <span style="color: #B900B9;">//No editables</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">//texto encab/col centrado</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp;:= MARQSTYLE_HIGHLROW &nbsp;<span style="color: #B900B9;">//_HIGHLROWMS</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span>:=LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowDividerStyle</span>:=LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp;END<br />&nbsp;</div>[/code:jduxu06l] Saludos.
xBrowse() function adapted
Metro style like I slightly adapted function xBrowse() to fit better to “Metro like style”. Please see old new. Best regards, Otto [img:24xc82a1]http&#58;//www&#46;atzwanger-software&#46;com/fw/xbrwfunc&#46;jpg[/img:24xc82a1] [img:24xc82a1]http&#58;//www&#46;atzwanger-software&#46;com/fw/xbrwfuncold&#46;jpg[/img:24xc82a1]
xBrowse() function adapted
Looking nice Otto
xBrowse() function adapted
Otto, Maybe you could add an lMetroStyle flag to the original code so Metro style could be turned on for Metro apps. If you do this then perhaps Antonio will include it in the standard code and it won't break any existing apps. Regards, James
xBrowse(Fwh808) no aceita Clausula ( Desc )
Si uso el cláusula DESC, ao movimentar las setas direcionais del teclado el xBrowse perde la ordem del registro.[code:140h3v03] SqlInfo&#58;="SELECT * FROM tabatu WHERE codatu = "+Any2Sql&#40;busca&#41;+" ORDER BY sql_rowid DESC" Use SQL SqlInfo Alias "TMPINFO" NEW INTO xBanco TMPINFO->&#40;DBGoTop&#40;&#41;&#41; [/code:140h3v03] [code:140h3v03] DEFINE DIALOG oDlgInfo &#46;&#46;&#46;&#46; @ 002,002 XBROWSE oBrw PIXEL SIZE 487,256 FONT fBold1 OF oDLgInfo ALIAS "TMPINFO" oBrw&#58;SetColor&#40; PRETO, GetSysColor&#40; 16 &#41; &#41; oBrw&#58;l2007 &#58;= &#46;T&#46; oBrw&#58;lAllowRowSizing &#58;= &#46;f&#46; // Nao move as Linhas &#40;nao sei&#41; oBrw&#58;lHScroll &#58;= &#46;F&#46; // Barra rolagem Horizontal oBrw&#58;lVScroll &#58;= &#46;T&#46; // Barra rolagem vertical oBrw&#58;lRecordSelector &#58;= &#46;T&#46; // Barra aponta registro lateral esquerda; oBrw&#58;nRecSelColor &#58;= RGB&#40;205,220,255&#41; // cor da barra lateral pontador de linha oBrw&#58;lAllowColSwapping &#58;= &#46;f&#46; // Click no header &#40;&#46;f&#46;&#41;Trava oBrw&#58;nDataLines &#58;= 2 oBrw&#58;lColDividerComplete &#58;= &#46;T&#46; // linha divisoria de colunas mesmo com tabela vazia&#46; oBrw&#58;bClrStd &#58;= &#123;|| &#123; AZUL,GetSysColor&#40;15&#41; &#125; &#125; // cor da celula sem focu oBrw&#58;bClrSel &#58;= &#123;|| &#123; AZUL,GetSysColor&#40;15&#41; &#125; &#125; // cor da celula sem focu oBrw&#58;bClrSelFocus &#58;= &#123;|| &#123; PRETO,RGB&#40;205,220,255&#41;&#125; &#125; // cor da celula em focu oBrw&#58;bClrRowFocus &#58;= &#123;|| &#123; PRETO,RGB&#40;205,220,255&#41;&#125; &#125; // cor da celula em focu oBrw&#58;nColDividerStyle &#58;= 4 // cor da divisao de coluna LINESTYLE_LIGHTGRAY oBrw&#58;nRowDividerStyle &#58;= 4 // cor da divisao da linha LINESTYLE_LIGHTGRAY oBrw&#58;nMarqueeStyle &#58;= 5 // tipo de linha selecionada MARQSTYLE_HIGHLROW oBrw&#58;nRowHeight &#58;= 36 oBrw&#58;lHeader &#58;= &#46;T&#46; // se vai mostrar header cabeçalho&#41; oBrw&#58;nHeaderLines &#58;= 2&#46;5 oBrw&#58;nHeaderHeight &#58;= 40 oBrw&#58;bClrHeader &#58;= &#123;|| &#123;cGetW, &#125;&#125; // cor do reader oBrw&#58;lFooter &#58;= &#46;F&#46; // se vai mostrar footer &#40;rodape&#41; //oBrw&#58;nFreeze &#58;= 0 // quantas colunas fixas oCol&#58;=oBrw&#58;AddCol&#40;&#41; oCol&#58;cHeader &#58;="Data Horário"+CRLF+"Atualizado por&#58;" oCol&#58;bStrData&#58;= &#123;|| DToC&#40;TMPINFO->datatu&#41;+" "+TMPINFO->hrsatu+CRLF+TMPINFO->usoatu &#125; oBrw&#58;aCols&#91;1&#93;&#58;nWidth &#58;= 160 oCol&#58;=oBrw&#58;AddCol&#40;&#41; oCol&#58;cHeader &#58;="Módulo Origem"+CRLF+"Campo Atualizado" oCol&#58;bStrData&#58;= &#123;||TMPINFO->modatu+CRLF+TMPINFO->cpoatu&#125; oBrw&#58;aCols&#91;2&#93;&#58;nWidth &#58;= 200 oCol&#58;=oBrw&#58;AddCol&#40;&#41; oCol&#58;cHeader &#58;="Atualizado"+CRLF+"Anterior" oCol&#58;bStrData&#58;= &#123;||TMPINFO->altatu+CRLF+TMPINFO->antatu&#125; oBrw&#58;aCols&#91;3&#93;&#58;nWidth &#58;= IF&#40;oBrw&#58;lRecordSelector,542,562&#41; // so mostrar quando selecionada //oBrw&#58;aCols&#91;3&#93;&#58;bClrStd &#58;= &#123;|| &#123; IF&#40;Empty&#40;TMPINFO->usoatu&#41;,PRETO,GetSysColor&#40;15&#41;&#41;,GetSysColor&#40;15&#41; &#125; &#125; oCol&#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;AddResource&#40;"REDO16"&#41; oCol&#58;AddResource&#40;"RELOAD16"&#41; oCol&#58;bBmpData &#58;=&#123;||IF&#40;Empty&#40;TMPINFO->antatu&#41;,1,2&#41;&#125; oCol&#58;cHeader &#58;= "Sta"+CRLF+"tus" oBrw&#58;aCols&#91;4&#93;&#58;nWidth &#58;= 25 //oBrw&#58;aCols&#91;4&#93;&#58;bClrStd &#58;= &#123;|| &#123; PRETO,RGB&#40;205,220,255&#41; &#125;&#125; // cor da celula sem focu WITH OBJECT oBrw&#58;aCols&#91;3&#93; // NR DA COLUNA QUE QUERO MODIFICAR &#58;bPaintText&#58;=&#123; |oCol, hDC, cText, aCoord| DrawText&#40; oCol, hDC, cText, aCoord, fBold1I &#41; &#125; END // oBrw&#58;SetBackGround&#40; oQual &#41; oBrw&#58;CreateFromCode&#40;&#41; oBrw&#58;SetRDD&#40;&#41; ACTIVATE DIALOG oDlgInfo&#46;&#46;&#46;&#46;&#46; [/code:140h3v03] Ao iniciar el modulo, los registros estao Correctos: <!-- m --><a class="postlink" href="http://www.technet.com.br/~jackson/sbsarq/bmps/xbrw1.JPG">http://www.technet.com.br/~jackson/sbsa ... /xbrw1.JPG</a><!-- m --> Mas, si yo mover alguna seta direcional del teclado, el browse fica asi: <!-- m --><a class="postlink" href="http://www.technet.com.br/~jackson/sbsarq/bmps/xbrw2.JPG">http://www.technet.com.br/~jackson/sbsa ... /xbrw2.JPG</a><!-- m --> Si yo no usar la cláusula DESC, el browse funciona perfeitamente. - Outra Situaçao estranha; estava testando el browse desta forma : Aqui uso uno Browse() antes del xBrowse, ao fechar el Browse(), es ADD uno registro vazio em my Banco de Dados. [code:140h3v03] SqlInfo&#58;="SELECT * FROM tabatu WHERE codatu = "+Any2Sql&#40;busca&#41;+" ORDER BY sql_rowid DESC" Use SQL SqlInfo Alias "TMPINFO" NEW INTO xBanco TMPINFO->&#40;DBGoTop&#40;&#41;&#41; BROWSE&#40;&#41; [/code:140h3v03] [code:140h3v03] DEFINE DIALOG oDlgInfo &#46;&#46;&#46;&#46; @ 002,002 XBROWSE oBrw PIXEL SIZE 487,256 FONT fBold1 OF oDLgInfo ALIAS "TMPINFO" &#46; &#46; &#46; oBrw&#58;CreateFromCode&#40;&#41; oBrw&#58;SetRDD&#40;&#41; [/code:140h3v03]<!-- m --><a class="postlink" href="http://www.technet.com.br/~jackson/sbsarq/bmps/xbrw3.JPG">http://www.technet.com.br/~jackson/sbsa ... /xbrw3.JPG</a><!-- m -->Será alguno Bug del versao FWh808 ???Saluds, Ale
xBrowse(editable) + obj with WS_TABFOCUS
In a editable xBrowse if no other elements have the WS_TABFOCUS attribute, if I press ENTER the cell change to edit mode, but if any other OBJ have the WS_TABFOCUS when I press enter ENTER the focus change to this OBJ. PS.: Version 8.02 with 8.04 xBrowse.