topic
stringlengths
1
63
text
stringlengths
1
577k
xbrowse + EDIT_LISTBOX
Hola a Todos, pos, sigo con el mismo error, pero detectando algunas cosas mas, si el xbrowse esta en un DIALOG, y ademas del xbrowse hay por ejemplo un boton, ahi se produce el error que luego del edit_listbox, en vez de pasar a la proxima columna del xbrowse, el focus salta al proximo control del dialog. Aqui dejo el codigo que reproduce el error : [code=fw:2dsld962]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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> aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBrw, oBar<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oWnd <span style="color: #0000ff;">size</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">300</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">xbrowse</span> oBrw <span style="color: #0000ff;">of</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; header <span style="color: #ff0000;">'one'</span>,<span style="color: #ff0000;">'two'</span>,<span style="color: #ff0000;">'tipo'</span>, <span style="color: #ff0000;">"cuatro"</span> ;<br />&nbsp; &nbsp; &nbsp; columns <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">4</span> ;<br />&nbsp; &nbsp; &nbsp; colsizes <span style="color: #000000;">50</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">70</span> ;<br />&nbsp; &nbsp; &nbsp; pictures <span style="color: #ff0000;">'999'</span>,<span style="color: #ff0000;">'mmm dd, yyyy'</span>, <span style="color: #ff0000;">"9999.99"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; array aData lines cell fastedit footers<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">224</span>, <span style="color: #000000;">236</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">189</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">253</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bPastEof</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>| nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_DELETE, DelRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<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> := EDIT_GET <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">tipo</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; &nbsp;:= EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListBound</span> &nbsp; := ;<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListTxt</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"NOV"</span>, <span style="color: #ff0000;">"NTO"</span>, <span style="color: #ff0000;">"TOR"</span>, <span style="color: #ff0000;">"VAC"</span>, <span style="color: #ff0000;">"VAQ"</span>, <span style="color: #ff0000;">"TM "</span>, <span style="color: #ff0000;">"TH "</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">cuatro</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nTotal</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lTotal</span> &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">224</span>, <span style="color: #000000;">236</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">189</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">253</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bPastEof</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>| nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_DELETE, DelRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; oWnd:oClient := oBrw</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">60</span>,<span style="color: #000000;">10</span> BUTTONBMP <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"OK"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oWnd <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> <span style="color: #000000;">&#40;</span> MakeBar<span style="color: #000000;">&#40;</span> oWnd, oBrw <span style="color: #000000;">&#41;</span>, oWnd:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> n := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">&#123;</span> n, date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+n, <span style="color: #ff0000;">"NOV"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;n++<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DelRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">nLen</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, oBrw:<span style="color: #000000;">nLen</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> MakeBar<span style="color: #000000;">&#40;</span> oWnd, oBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBar<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">buttonbar</span> oBar <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">32</span> <span style="color: #0000ff;">of</span> oWnd <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">button</span> <span style="color: #0000ff;">of</span> oBar <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">'AddRow'</span> <span style="color: #0000ff;">action</span> AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">button</span> <span style="color: #0000ff;">of</span> oBar <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">'DeleteRow'</span> <span style="color: #0000ff;">action</span> DelRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> oBar<br />&nbsp;<br />&nbsp;</div>[/code:2dsld962] alguna ayuda, please. Gracias
xbrowse + EDIT_LISTBOX
Ariel Este cambio es necesario en: METHOD ShowBtnList( nKey ) CLASS TXBrwColumn IF ::oBrw:oWnd:IsKindOf( "TDIALOG" ) ::oEditLbx:nDlgCode = DLGC_WANTALLKEYS ::oEditLbx:bKeyDown := {|k| ::oEditLbx:nLastKey := k, nil } ELSE ::oEditLbx:bKeyDown := {|k| ::oEditLbx:nLastKey := k, ; If( k == VK_RETURN .and. nAt > 0, xValue := aBound[ nAt ], ),; If( k == VK_RETURN .or. k == VK_ESCAPE, ::PostEdit( xValue, .t. ), ) } ENDIF
xbrowse + EDIT_LISTBOX
Daniel, Gracias por responder, pero el problema persiste, ahora si tu tienes, basado en el mismo ejemplo un boton mas, el foco se va a ese boton fuera del xbrowse, o sea en vez de seguuir en la siguiente columna, pasa el foco al 2do boton. Seguimos esperando... Salu2, Ariel.
xbrowse + EDIT_LISTBOX
Ariel este cambio es requerido en el subtituye este CASE en METHOD KeyChar( nKey, nFlags ) CLASS TXBrowse [code=fw:2a59s068]<div class="fw" id="{CB}" style="font-family: monospace;"><br />      <span style="color: #00C800;">case</span> nKey == VK_RETURN<br />         oCol := ::<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> oCol:<span style="color: #000000;">oEditGet</span> != <span style="color: #00C800;">nil</span><br />            PostMessage<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oEditGet</span>:<span style="color: #000000;">hWnd</span>, WM_KEYDOWN, nKey <span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">//VK_RETURN )</span><br />         elseif oCol:<span style="color: #000000;">lEditable</span> .and. ! oCol:<span style="color: #000000;">hChecked</span> .and. ::<span style="color: #000000;">lEnterKey2Edit</span> .and. ! <span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">nEditType</span> == EDIT_LISTBOX .or. oCol:<span style="color: #000000;">nEditType</span> == EDIT_GET_LISTBOX <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">return</span> oCol:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         elseif oCol:<span style="color: #000000;">nEditType</span> != EDIT_LISTBOX .or. oCol:<span style="color: #000000;">nEditType</span> != EDIT_GET_LISTBOX<br />            <span style="color: #B900B9;">//Simulate Click over button for no lost focus</span><br />            PostMessage<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBtnList</span>:<span style="color: #000000;">hWnd</span>, WM_LBUTTONDOWN, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>   <br />            PostMessage<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBtnList</span>:<span style="color: #000000;">hWnd</span>, WM_LBUTTONUP, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>  <br />         elseif ::<span style="color: #000000;">oTreeItem</span>!=<span style="color: #00C800;">nil</span><br />            <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">oTree</span> != <span style="color: #00C800;">nil</span>,<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Toggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<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><br />         <span style="color: #00C800;">else</span><br />            ::<span style="color: #000000;">GoRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br /> </div>[/code:2a59s068]
xbrowse + SQLRDD BUG
Sr Antonio, utilizando xbrowse + SQLRDD, ao executar um clique simples em uma linha do browse o xbrowse força esta linha para cima( topo ). Isso só acontece com SQLRDD. Teria uma solução?
xbrowse + SQLRDD BUG
Are you using Borland ?
xbrowse + SQLRDD BUG
Obrigado por responder Sr. Antonio, utilizo: xharbour+borland
xbrowse + SQLRDD BUG
Is there a demo version of SqlRdd for Borland ?
xbrowse + SQLRDD BUG
Here, <!-- m --><a class="postlink" href="http://uploaded.net/file/wbq3da3g">http://uploaded.net/file/wbq3da3g</a><!-- m --> For xHarbour and BCC 5.82.
xbrowse + SQLRDD BUG
elvira, thanks
xbrowse + SQLRDD BUG
UP!
xbrowse + SQLRDD BUG
SGS conseguiu resolver esse bug?
xbrowse + SQLRDD BUG
For an RDD to work with XBrowse, the RDD should support OrdKeyNo() and OrdKeyGoto(<n>) also. This is the requirement of XBrowse all along. SQLRDD does not support these two functions. So this RDD is not compatible with XBrowse as it is. However, efforts are made in version 13.03 to provide a limited support for SQLRDD also, but the functionality will not be exactly like other RDDs. WBrowse works with SQLRDD and it is much faster than XBrowse.
xbrowse + SQLRDD BUG
ok, vamos esperar la nueva version 1303 thanks
xbrowse + SQLRDD BUG
Sistem, consegui resolver sim, veja: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=24327&p=138698#p138698">viewtopic.php?f=3&t=24327&p=138698#p138698</a><!-- l -->
xbrowse + SQLRDD BUG
SGS, obrigado ficou perfeito <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xbrowse + SQLRDD BUG
<!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> que bom!
xbrowse + Tdolphin + Mysql
Colegas necesito urgente de su ayuda llevo 2 dias con este problema: tengo esta queyr cViaje:=xServer:Query("SELECT v.*,(SELECT COUNT(*) FROM vendido ve WHERE ve.COD_INTERNO=v.codigo_control) AS npasaje FROM viajes_generados v WHERE MONTH(v.fecha_salida)='"+Str(nMes,2)+"' And YEAR(v.fecha_salida)='"+Str(namo,4)+"' AND v.fecha_salida >='"+dtos(date())+"' ORDER BY v.fecha_salida,v.hora_salida,v.nom_viaje") cviaje:GoTop() @ 30, 10 XBROWSE oLbx FIELDS cViaje:codigo_control,cViaje:cod_viaje,cViaje:nom_viaje ,cViaje:fecha_salida ,cViaje:hora_salida,cViaje:tipo_bus,cViaje:npasaje ,cViaje:patente,cViaje:nomchofer,cViaje:nomauxiliar,cViaje:nomchofer2; HEADERS "Cod.Control" ,"Viaje" , "Nombre del viaje","Fecha"+CRLF+"Salida","1era Hora" ,"Tipo Bus" ,"Pasajes"+CRLF+"Vendidos","Patente" ,"Chofer-1-" ,"Auxliar" ,"Chofer-2" ; FIELDSIZES 70,70,300,80,70,100,70,60,160,160,160; JUSTIFY .f.,.f.,.f.,AL_CENTER, AL_CENTER,AL_CENTER,AL_CENTER; OF oWChld y al presionar el boton refrescar Pantalla: STATIC FUNCTION RefrescarPantalla(oLbx) *---------------------------------- SetDolphin( oLbx, cViaje,.f. ) cViaje:Refresh() oLbx:Refresh(.t.) oLbx:SetFocus() RETURN .T. SALE ERROR: Time from start: 0 hours 0 mins 11 secs Error occurred at: 17-10-2021, 19:12:26 Error description: Error MYSQL/1051 Unknown table 'v' y el error que me muestra la query, pero me la cambia no sale completo : TDOLPHINSRV:SQLQUERY Param 1: C "SELECT v.*, (select count(*) FROM vendido ve WHERE ve.COD_INTERNO=v.codigo_control) AS npasaje ORDER BY v.fecha_salida,v.hora_salida,v.nom_viaje" ojala me puedan ayudar Saludos
xbrowse + Tdolphin + Mysql
yo preparo asi mi Xbrowse con tdolphin aCols := {; {"idpedido","ID",NIL,50,AL_RIGHT},; {"factura_doc","DOC",NIL,40,AL_LEFT },; {"factura_ser","SERIE",NIL,60,AL_LEFT },; {"factura_num","NUMERO",NIL,90,AL_LEFT },; {"factura_fec","FECHA",NIL,75,AL_LEFT},; {"razsoc","CLIENTE",NIL,200,AL_LEFT },; {"moneda","MON",NIL,30,AL_LEFT },; {"neto","IMPORTE DE VENTA","999,999.99",90,AL_RIGHT},; {"efectivo","EFECTIVO","999,999.99",90,AL_RIGHT},; {"tarjeta","TARJETA","999,999.99",90,AL_RIGHT},; {"credito","CREDITO","999,999.99",90,AL_RIGHT},; {"gratuitas","GRATUITA","999,999.99",90,AL_RIGHT},; {{|| ""},"ESTADO",NIL,25,AL_RIGHT}, ; {{|| ""},"CPE",NIL,25,AL_RIGHT} ; } @ 0,0 XBROWSE oBrw OF oWnVta ; DATASOURCE oQry ; COLUMNS aCols ; LINES CELL AUTOSORT WITH OBJECT oBrw :bClrRowFocus := oBrw:bClrSelFocus :nRowHeight := 25 :nHeaderLines := 3 :nHeaderHeight := 60 <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->HeaderFonts := oFont :nFooterHeight := 20 :nFooterLines := 2 :nStretchCol := 6 :lAllowColHiding := .F. :lAllowColSwapping := .F. :lDisplayZeros := .F. :lRecordSelector := .F. :lHScroll := .F. :l2007 := .F. :lFooter := .T. :lDrawBorder := .t. :lAllowColReGroup := .T. :lColDividerComplete := .T. :nRowDividerStyle :=LINESTYLE_BLACK :bClrHeader := {|| { nRGB(000,000,000), nRGB(128,255,128) } } :bClrSel := { || { CLR_BLACK, CLR_HGRAY } } :SetGroupHeader( 'FACTURACION', 2, 5, oFont ) :SetGroupHeader( 'CONDICIONES DE PAGO', 9, 12, oFont ) :SetDolphin( oQry, .F. ) END oBrw:aCols[01]:cOrder = "A" oBrw:aCols[01]:bLClickHeader := {|| SetOrden(oBrw:aCols[01],"doc+0 ASC",oQry )} oBrw:aCols[02]:bLClickHeader := {|| SetOrden(oBrw:aCols[02],"serie+numero ASC",oQry )} oBrw:aCols[03]:bLClickHeader := {|| SetOrden(oBrw:aCols[03],"fecha ASC",oQry )} oBrw:aCols[04]:bLClickHeader := {|| SetOrden(oBrw:aCols[04],"razsoc ASC",oQry )} AEval( oBrw:aCols, { | o | o:nHeadStrAlign := AL_CENTER,o:oDataFont := aFont[1] } ) oBrw:CreateFromCode() oWnVta:oClient := oBrw y para refrescar la consulta uso asi Static Procedure MyRefresh() local oWait WaitOn("Espere, cambiando consulta...",@oWait ) IsConexion() TRY oQry:Refresh() oBrw:MakeTotals() oBrw:Refresh() CATCH oErr END WaitOff( @oWait ) Return prueba si se soluciona o me avisas para hacer una conexion por anydesk y verlo en tu servidor
xbrowse + Tdolphin + Mysql
Solucionado. hice otra query distinta: cViaje:=xServer:Query("SELECT v.*,COUNT(*) AS npasaje FROM viajes_generados v LEFT JOIN vendido d ON v.codigo_control=d.cod_interno WHERE MONTH(v.fecha_salida)='"+Str(nMes,2)+"' And YEAR(v.fecha_salida)='"+Str(namo,4)+"' AND v.fecha_salida >='"+dtos(date())+"' GROUP BY v.codigo_control ORDER BY v.fecha_salida,v.hora_salida,v.nom_viaje") cviaje:GoTop() y funciono gracias carlos por tu atencion .. saludos
xbrowse + dolphin + ultimo fila con mouse = error
Estimados, me esta ocurriendo esto tengo este dialogo, muestra una lista de x registros con xbrowse y un query de dolphin el caso es que cuando me desplazo hasta el ultimo registro usando la ruedita del raton, alcanzo la ultima fila y presiono el boton detalle, no ocurre el evento action del boton, se esta unos segundos como en gris y retorna a su color normal. si me desplazo con las tecla abajo, hasta el ultimo e intento pasar, y presiono el boton, el evento se dispara normalmente. [url=http&#58;//imgur&#46;com/cdLVmpr:19dctfh9][img:19dctfh9]http&#58;//i&#46;imgur&#46;com/cdLVmpr&#46;png[/img:19dctfh9][/url:19dctfh9]
xbrowse bPastEof using VSCROLL
Hello, Using xbrowse , i have problems with bPasteof() when the verical scroll bar is used . This bar can be used to scroll trough the database , and to put the record pointer on the last row. Now we can append with : 1) Pressing Key Down : ok it works 2) Clicking on the bottom from the vertical scroll bar WE BECOME A LOOPING FROM EXECUTING bPAstEof !!!!!!!!!!!! In testxbrw.prg , i changed : STATIC FUNCTION AutoEdit( oWnd ) local oChild, oBrw, oCol local nFor DEFINE WINDOW oChild TITLE "Auto edit browse" MDICHILD OF oWnd oBrw := TXBrowse():New( oWnd ) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL oBrw:nColDividerStyle := LINESTYLE_BLACK oBrw:nRowDividerStyle := LINESTYLE_BLACK oBrw:lColDividerComplete := .t. oBrw:SetRDD() for nFor := 1 to len( oBrw:aCols ) oCol := oBrw:aCols[ nFor ] oCol:nEditType := 1 oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) } next oBrw:CreateFromCode() oChild:oClient := oBrw oBrw:bPastEof() := {||msginfo("APND")} // ADDED !!!!!!!!!!!! ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus() RETURN NIL
xbrowse tratando de usarlo
Holas amigos.. a ver si me dan una mano para implementar el xbrowse Estaba usando un LISTBOX simple y lo cambie para usar el xbrowseprimero era un : REDEFINE LISTBOX oLbx FIELDS XVALOR1, XVALOR2...... ,;y ahora es UN : REDEFINE XBROWSE oLbx FIELDS XVALOR1, XVALOR2....... ,;Ademas he activado el #include "xbrowse.ch" al inicio de mi xxxxxxx.prg... debo de jalar alguna libreria adicional para q funcione al momento de compilar ???utilizo el verse 4.2 PERO ME ESTA SALIENDO ESTE ERROR (OJO con LISTBOX fucniona oki) !!!: Application=========== Path and name: E:\pmysql\LXION\LXION.Exe (32 bits) Size: 2,693,120 bytes Time from start: 0 hours 0 mins 6 secs Error occurred at: 14/11/2008, 14:38:26 Error description: Error FiveWin/3 Cannot create Dialog Box: Resource: MTCA10_S1Stack Calls=========== Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0) Called from: => TDIALOG:ACTIVATE(0) Called from: E:\pmysql\LXION\PRG\mtca10.prg => MTCA10(129) Called from: E:\pmysql\LXION\PRG\lxion.prg => (b)WGES_MENU(558) Called from: => TMENU:COMMAND(0) Called from: => TWINDOW:COMMAND(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => WINRUN(0) Called from: => TWINDOW:ACTIVATE(0) Called from: E:\pmysql\LXION\PRG\lxion.prg => MAIN(371)Variables in use================ Procedure Type Value ========================== CREATEDLGERROR Param 1: O Class: TDIALOG Local 1: C "MTCA10_S1" Local 2: C " " TDIALOG:ACTIVATE Param 1: U Param 2: U Param 3: U Param 4: L .T. Param 5: U Param 6: L .T. Param 7: U Param 8: U Param 9: U Param 10: L .F. Local 1: O Class: TDIALOG Local 2: N 329454 Local 3: U Local 4: U MTCA10 Param 1: O Class: KDAT_SYS Local 1: O Class: TDIALOG Local 2: O Class: TXBROWSE Local 3: O Class: TCURSOR Local 4: O Class: TFONT Local 5: O Class: TSAY Local 6: C "FILE DE TIPO DE CAMBIO" Local 7: C "Mantenimiento de File de Tipo de Cambio" Local 8: O Class: TMSCONNECT Local 9: C "GNSYS_KEYFARM" Local 10: O Class: TMSDATABASE Local 11: C "MTCAMBIO" Local 12: O Class: TMSQUERY Local 13: U Local 14: N 0 Local 15: N 1 Local 16: N 12 Local 17: C "SELECT * FROM MTCAMBIO ORDER BY FE_TC" Local 18: C "SELECT * FROM MTCAMBIO ORDER BY FE_TC" Local 19: U Local 20: C " " Local 21: N 0 (b)WGES_MENU Param 1: O Class: TMENUITEMClasses in use:=============== 1 ERROR 2 HBCLASS 3 HBOBJECT 4 KDAT_SYS 5 TSQLVIRTUAL 6 TMSERROR 7 TEAGLE1 8 TMSCONNECT 9 TWINDOW 10 TDIALOG 11 TBRUSH 12 TCONTROL 13 TBITMAP 14 TIMAGE 15 TMSDATABASE 16 TMSSTATEMENT 17 TMSCOLUMNCONTAINER 18 TMSQUERY 19 TMSTABLE 20 TMSCOMMAND 21 TCOMBOBOX 22 TGET 23 GET 24 TCLIPGET 25 TBUTTON 26 TFONT 27 TMENU 28 TMENUITEM 29 TICON 30 TBAR 31 TRECT 32 TBTNBMP 33 TMSGBAR 34 TMSGITEM 35 TTIMER 36 TCURSOR 37 TSAY 38 TXBROWSE 39 TXBRWCOLUMN 40 TREG32Memory Analysis=============== 159 Static variables Dynamic memory consume: Actual Value: 0 bytes Highest Value: 0 bytes
xbrowse tratando de usarlo
revisa el recurso, talvez no tienes declarado el browse como TXBROWSE, el xbrowse debes crearlo por medio de un "custom control",en el nombre de la clase del "custom control" debes poner "TXBROWSE"
xbrowse tratando de usarlo
Hola Mcfox Seguro que si, eso no lo he hecho,,, (con orgullo soy un novato de xbrowse!!! ) lo aplicare en este instantee.. y les voy comentando la implementacion .. Gracias muyLubin[quote="mcfox":3mplid5s]revisa el recurso, talvez no tienes declarado el browse como TXBROWSE, el xbrowse debes crearlo por medio de un "custom control", en el nombre de la clase del "custom control" debes poner "TXBROWSE"[/quote:3mplid5s]
xbrowse tratando de usarlo
Hola Mcfox Tenias razon.. con ello Levanto correcto el browse Ahoraa se me presento otro problema.. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Me muestra los registross. PEROOOOOO.....1. Al apuntar con el Cursor algun registro diferente de donde esta el foco, le hago click para activarlo pero nada.. debo usar el teclado con las flechas para llegar al nuevo registro ...Gracias muyLubin[quote="mcfox":2be3fe0y]revisa el recurso, talvez no tienes declarado el browse como TXBROWSE, el xbrowse debes crearlo por medio de un "custom control", en el nombre de la clase del "custom control" debes poner "TXBROWSE"[/quote:2be3fe0y][/quote]
xbrowse tratando de usarlo
publica el codigo de creacion del browse
xbrowse tratando de usarlo
[quote="mcfox":2b72dg8k]publica el codigo de creacion del browse[/quote:2b72dg8k]Aqui esta el codigo... las funciones LeeCampo(oXX,cXXX) retorna un valor de la tabla..activa.. ) DEFINE CURSOR oDedo RESOURCE "Dedo"DEFINE FONT S_oTit1Font NAME "Roman" SIZE 10, 20DEFINE DIALOG oDlg RESOURCE "MTCA10_S1" TITLE "{ "+ PROCNAME()+" } " + s_cCaption REDEFINE SAY S_oTit1Text PROMPT S_cTit1Text ID 601 OF oDlg FONT S_oTit1Font*** REDEFINE LISTBOX oLbx FIELDS STR(oTABLA:RECNO(),4,0) ,; antess.. lo usaba REDEFINE XBROWSE oLbx FIELDS FDATE(LeeCampo(oTabla,"FE_TC")),; STR(LeeCampo(oTabla,"VAL_TC"),10,4),; STR(LeeCampo(oTabla,"VCO_TC"),10,4),; STR(LeeCampo(oTabla,"EUV_TC"),10,4),; STR(LeeCampo(oTabla,"EUC_TC"),10,4); HEADERS "Fecha","C.Venta $","C.Compra$ ", "C.Venta Eur.","C.Compra Eur." ; CURSOR oDedo; FIELDSIZES 80,60,60,60,60 AUTOSORT ; ON DBLCLICK MTCA10PRO( "E",oSYS_DAT,oLbx,oCon,oDBaseCia,oTabla,cNmTabla) ; ID 172 OF oDlg mysetBrowse(oLbx,oTabla) oLbx:bKeyDown := {|nKey| MTCA10_KEY( nKey,oSYS_DAT, oLbx,oDlg,oCon,oDBaseCia,oTabla,cNmTabla )} REDEFINE BITMAP RESOURCE "BC_NUEVO" ID 811 OF oDlg ON CLICK MTCA10PRO( "N",oSYS_DAT,oLbx,oCon,oDBaseCia,oTabla,cNmTabla) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_EDITAR" ID 812 OF oDlg ON CLICK MTCA10PRO( "E",oSYS_DAT,oLbx,oCon,oDBaseCia,oTabla,cNmTabla) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_BORRAR" ID 813 OF oDlg ON CLICK MTCA10PRO( "B",oSYS_DAT,oLbx,oCon,oDBaseCia,oTabla,cNmTabla) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_VER" ID 814 OF oDlg ON CLICK MTCA10PRO( "V",oSYS_DAT,oLbx,oCon,oDBaseCia,oTabla,cNmTabla) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_UBICA" ID 815 OF oDlg && ON CLICK MTCA10_UBI(oLbx) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_REPORTE" ID 816 OF oDlg ON CLICK MTCA10REP(oTabla) CURSOR oDedo REDEFINE BITMAP RESOURCE "BC_SALIR" ID 817 OF oDlg ON CLICK oDlg:End() CURSOR oDedoACTIVATE DIALOG oDlg CENTERED
xbrowse tratando de usarlo
mysetBrowse(oLbx,oTabla) que tienes dentro de esta funcion??oTabla que tipo de dato tiene es un objeto DBF o un recordset u otro objeto?usas SetDbf() o SetAdo(), te podria sugerir pasar los datos a un array o una estructura y trabajar desde alli, por lo que veo creo que usas eagle1, nunca lo he usado, talvez si otro colega tenga una ejemplo de como usar eagle con xbrowse seria de ayuda... pienso que podrias tener el error en la forma como seteas el origen de la data del browse
xbrowse tratando de usarlo
la funciion mysetbrowse es una funcion de de la clase eagle1 para manejo de mysql y es seguro que el problema radica en el seteo del objeto del recordset para la tablas de mysql con Eagle1.[quote="mcfox":399xvf1m]mysetBrowse(oLbx,oTabla) que tienes dentro de esta funcion?? oTabla que tipo de dato tiene es un objeto DBF o un recordset u otro objeto? usas SetDbf() o SetAdo(), te podria sugerir pasar los datos a un array o una estructura y trabajar desde alli, por lo que veo creo que usas eagle1, nunca lo he usado, talvez si otro colega tenga una ejemplo de como usar eagle con xbrowse seria de ayuda... pienso que podrias tener el error en la forma como seteas el origen de la data del browse[/quote:399xvf1m]
xbrowse tratando de usarlo
intenta esto... tube que leer un un poco de eagle para dar con esta posible solucion... espero te sea de utilidad[code:9ooucjxr] define window oWnd title "prueba eagle" oBrw&#58;=TxBrowse&#40;&#41;&#58;New&#40;oWnd&#41; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROW oBrw&#58;nColDividerStyle &#58;= LINESTYLE_LIGHTGRAY oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_LIGHTGRAY oBrw&#58;lColDividerComplete &#58;= &#40;&#46;F&#46;&#41; oBrw&#58;nHeaderHeight &#58;= 25 oBrw&#58;nRowHeight &#58;= 22 oBrw&#58;nDataLines &#58;= 1 oBrw&#58;lHScroll &#58;= &#40;&#46;F&#46;&#41; aCol&#91; 1&#93; &#58;= oBrw&#58;AddCol&#40;&#41; aCol&#91; 1&#93;&#58;bStrData &#58;= &#123; ||oTb&#58;FieldGet&#40;1&#41; &#125; aCol&#91; 1&#93;&#58;cHeader &#58;= "campo1" aCol&#91; 1&#93;&#58;nHeadStrAlign &#58;= AL_LEFT aCol&#91; 1&#93;&#58;nDataStrAlign &#58;= AL_LEFT aCol&#91; 1&#93;&#58;nWidth &#58;= 100 aCol&#91; 2&#93; &#58;= oBrw&#58;AddCol&#40;&#41; aCol&#91; 2&#93;&#58;bStrData &#58;= &#123; ||oTb&#58;FieldGet&#40;2&#41; &#125; aCol&#91; 2&#93;&#58;cHeader &#58;= "campo2" aCol&#91; 2&#93;&#58;nHeadStrAlign &#58;= AL_LEFT aCol&#91; 2&#93;&#58;nDataStrAlign &#58;= AL_LEFT aCol&#91; 2&#93;&#58;nWidth &#58;= 210 oBrw&#58;CreateFromCode&#40;&#41; SetEagle&#40;oBrw,oTb&#41; oWnd&#58;oClient = oBrw activate window oWnd [/code:9ooucjxr] la rutina SetEagle es casi una fotocopia del metodo SetAdo() de la xbrowse() [code:9ooucjxr] procedure SetEagle&#40; oBrw, oTb &#41; oBrw&#58;cAlias &#58;= "" oBrw&#58;bGoTop &#58;= &#123;|| If&#40; oTb&#58;RecCount&#40;&#41; > 0, oTb&#58;First&#40;&#41;, nil &#41; &#125; oBrw&#58;bGoBottom &#58;= &#123;|| If&#40; oTb&#58;RecCount&#40;&#41; > 0, oTb&#58;Last&#40;&#41;, nil &#41; &#125; oBrw&#58;bSkip &#58;= &#123;| n | oTb&#58;Skipper&#40; If&#40; n==nil, 1, n &#41; &#41; &#125; oBrw&#58;bBof &#58;= &#123;|| oTb&#58;Bof&#40;&#41; &#125; oBrw&#58;bEof &#58;= &#123;|| oTb&#58;Eof&#40;&#41; &#125; oBrw&#58;bBookMark &#58;= &#123;| n | If&#40; n == nil,; If&#40; oTb&#58;RecCount&#40;&#41; > 0, oTb&#58;Recno&#40;&#41;, 0 &#41;, ; If&#40; oTb&#58;RecCount&#40;&#41; > 0, oTb&#58;GoTo&#40; n &#41;, 0 &#41; &#41; &#125; oBrw&#58;bKeyNo &#58;= &#123;| | RecNo&#40;&#41; &#125; oBrw&#58;bKeyCount &#58;= &#123;|| oTb&#58;RecCount&#40;&#41; &#125; oBrw&#58;refresh&#40;&#41; return return [/code:9ooucjxr]
xbrowse - SQLRDD bOnPostEdit
SQLRDD: oColuna:nEditType := EDIT_GET oColuna:bOnPostEdit := {|oCol, xVal, nKey| MSGINFO(XVAL)} using SQLRDD xVal not returns the last edited value!
xbrowse - SQLRDD bOnPostEdit
UP
xbrowse - SQLRDD error
FWH1308 R_3: define dialog oDialog resource 'BROWSEINFOADICIONAIS' redefine xbrowse oBrowse id 4000 of oDialog datasource 'tabiad' ... Application =========== Path and name: C:\BASE\getpdv.exe (32 bits) Size: ********* bytes Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6406) FiveWin Version: FWHX 13.07 Windows version: 5.1, Build 2600 Service Pack 3 Time from start: 0 hours 0 mins 32 secs Error occurred at: 27/09/13, 11:30:13 Error description: Error BASE/1066 Argument error: conditional Args: [ 1] = U Stack Calls =========== Called from: W:\new\fivewin\xbrowse.prg => TXBRWCOLUMN:VALUE( 9223 ) Called from: W:\new\fivewin\xbrowse.prg => TXBRWCOLUMN:ADJUST( 9050 ) Called from: W:\new\fivewin\xbrowse.prg => TXBROWSE:ADJUST( 1063 ) Called from: W:\new\fivewin\xbrowse.prg => TXBROWSE:INITIATE( 957 ) Called from: => __OBJSENDMSG( 0 ) Called from: => HB_EXECFROMARRAY( 0 ) Called from: .\source\function\HARBOUR.PRG => OSEND( 287 ) Called from: => HB_EXECFROMARRAY( 0 ) Called from: .\source\function\HARBOUR.PRG => ASEND( 265 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 631 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 876 ) Called from: => DIALOGBOX( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 274 ) Called from: W:\new\tabelainformacoesadicionaisfwh.prg => BROWSEINFORMACOESADICIONAIS( 35 ) Called from: W:\new\tabelainformacoesadicionais.prg => TABELAINFORMACOESADICIONAIS( 33 )
xbrowse - SQLRDD error
here the error: ::oBrw:lReadOnly and here erro: static function SetColFromRDD( oCol, uData ) if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly oCol:bOnPostEdit := { || nil } else ...
xbrowse - SQLRDD error
1. Are you using FWH 13.07 ( as seen in error.log ) or 13.08 R_3 as mentioned in the first line of the posting? 2. Either in 13.07 or 13.08, line numbers 9050 or 9223 do not contain any code that relates to the kind of error shown in the log. ( where nil is used as logical ) 3. Are you using modified version of xbrowse? I am asking because the code in the line numbers in the original versions do not correspond to the error. 4. [quote:v9kde75k]if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly[/quote:v9kde75k] There is no chance of oCol:lReadOnly not being logical in the original version of the code.
xbrowse - SQLRDD error
nageswaragunupudi, I use fwh1308 3R with xharbour 1.2.1 [b:vnythuul]1. Are you using FWH 13.07 ( as seen in error.log ) or 13.08 R_3 as mentioned in the first line of the posting?[/b:vnythuul] FWH13.08 3R - for some reason this Fivewin presenting FWH1307 (test behavior FWH\SAMPLES) [b:vnythuul]2. Either in 13.07 or 13.08, line numbers 9050 or 9223 do not contain any code that relates to the kind of error shown in the log. ( where nil is used as logical )[/b:vnythuul] erro: ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) ) METHOD SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows ) CLASS TXBrowse ... ::lReadOnly := ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) ) ... erro: ::oBrw:lReadOnly METHOD Value( uNew ) CLASS TXBrwColumn local uVal if ! ::oBrw:lReadOnly .and. ! ::lReadOnly .and. ; ... erro: DBINFO( DBI_ISREADONLY ) static function SetColFromRDD( oCol, uData ) ... if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly oCol:bOnPostEdit := { || nil } else oCol:bOnPostEdit := { |o,x,n| If( n != VK_ESCAPE .and. !eq( o:Value, x, .t., .t. ) .and. o:oBrw:Lock(), ; o:Value := x, nil ) } endif ... [b:vnythuul]3. Are you using modified version of xbrowse? I am asking because the code in the line numbers in the original versions do not correspond to the error. [/b:vnythuul] yes, I had to change some small details [b:vnythuul]4. if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly [/b:vnythuul] DBINFO( DBI_ISREADONLY ) [b:vnythuul]There is no chance of oCol:lReadOnly not being logical in the original version of the code.[/b:vnythuul] is DBINFO( DBI_ISREADONLY ) -- the problem seems to be caused by: DBINFO (DBI_ISREADONLY) - remember I am using xHarbour 1.2.1
xbrowse - SQLRDD error
For my information, please check and let me know this. After opening the file through SQLRDD Please insert this line and let me know the result you are getting with your version. ? DBINFO( DBI_READONLY ), VALTYPE( DBINFO( DBI_READONLY ) When I checked with SQLRDD also this is returning a logical value. I have checked xbrowse 13.08 with SQLRDD also and I and I am not getting any errors. Please try to use unmodified version of xbrowse and check the results.
xbrowse - SQLRDD error
Sr. Nages, ? VALTYPE( DBINFO( DBI_ISREADONLY )) RETURN: U
xbrowse - SQLRDD error
UP!
xbrowse - SQLRDD error
[quote="SGS":xjx47a91]Sr. Nages, ? VALTYPE( DBINFO( DBI_ISREADONLY )) RETURN: U[/quote:xjx47a91] In the present version valtype returns 'L' In your case, please locate the line [code=fw:xjx47a91]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; ::<span style="color: #000000;">lReadOnly</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbInfo<span style="color: #000000;">&#40;</span> DBI_ISREADONLY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:xjx47a91] in the METHOD SetRdd(...) Modify this line as [code=fw:xjx47a91]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; ::<span style="color: #000000;">lReadOnly</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbInfo<span style="color: #000000;">&#40;</span> DBI_ISREADONLY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == .t. <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:xjx47a91]
xbrowse - SQLRDD error
Sr. Nages, and here: static function SetColFromRDD( oCol, uData ) if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly oCol:bOnPostEdit := { || nil } else
xbrowse - SQLRDD error
Yes Please change this as: [code=fw:2g572sfd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> DBINFO<span style="color: #000000;">&#40;</span> DBI_ISREADONLY <span style="color: #000000;">&#41;</span> == .t. .or. oCol:<span style="color: #000000;">lReadOnly</span><br />&nbsp;</div>[/code:2g572sfd]
xbrowse - SQLRDD error
thanks <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xbrowse - SetArray
Now, SetArray method resets all columns already defined if any ( ::aCols := {} ). If we use the new command set provided for xbrowse like this : [code:3ddinwzh] function xbrindialog&#40; alin &#41; local odlg, obrw define dialog odlg size 640,440 pixel @ 10,10 xbrowse obrw ; fields str&#40;alin&#91;obrw&#58;narrayat&#93;&#91;1&#93;,2&#41;, ; alin&#91;obrw&#58;narrayat&#93;&#91;2&#93;, ; alin&#91;obrw&#58;narrayat&#93;&#91;3&#93; ; headers 'cod','description','cd' ; size 300,200 pixel of odlg // at this stage the columns are arleady defined obrw&#58;setarray&#40;alin&#41; // now setarray erases all the column defs obrw&#58;createfromcode&#40;&#41; activate dialog odlg centered return nil [/code:3ddinwzh] If the following change is made in SetArray method to automatically define the columns only if the columns are not already defined, the above code works as expected. The suggested change is [code:3ddinwzh] if empty&#40; &#58;&#58;acols &#41; // NEW &#58;&#58;aCols &#58;= &#123;&#125; for nFor &#58;= 1 to len&#40; aData&#91; 1 &#93; &#41; < &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; code &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; > next endif // NEW [/code:3ddinwzh] With this change the above code works well
xbrowse - SetBackGround problema
Utilizando SetBackGround para adicionar uma imagem de fundo, ocorre de algumas linhas do browse ficarem de cor diferente. veja: [url=http&#58;//imageshack&#46;us/photo/my-images/851/xbr&#46;jpg/:2jas6ln2][img:2jas6ln2]http&#58;//img851&#46;imageshack&#46;us/img851/6262/xbr&#46;jpg[/img:2jas6ln2][/url:2jas6ln2]
xbrowse - SetBackGround problema
Hola [url:2ajwxjgj]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=115863#p115863[/url:2ajwxjgj]
xbrowse - SetBackGround problema
Obrigado Daniel.
xbrowse - SetGroupHeader - Remove
is it possible to remove a SetGroupHeader previously defined in a browse?
xbrowse - SetGroupHeader - Remove
Set oCol:cGrpHdr := nil for all columns in the group
xbrowse - SetGroupHeader - Remove
Thanks Maestro <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xbrowse - Tooltip
Dear Mr. Rao, It seems to me that bTooltip from xBrowse always selects the highlighted row. Is there a way to make it take the row your mouse hovers the pointer over? Best regard, Otto
xbrowse - Tooltip
Mister Otto, look messenger, pls. Regards, saludos.
xbrowse - Tooltip
[quote="Otto":1np7efei]Dear Mr. Rao, It seems to me that bTooltip from xBrowse always selects the highlighted row. Is there a way to make it take the row your mouse hovers the pointer over? Best regard, Otto[/quote:1np7efei] You are right about oCol:bToolTip. Please do not use bToolTip. Instead use oCol:bCellTooltip and you get what exactly you want.
xbrowse - Tooltip
Dear Joao, dear Mr. Rao, Thank you for your help. Best regards, Otto [img:3288f5ue]https&#58;//mybergland&#46;com/fwforum/tooltip2&#46;gif[/img:3288f5ue]
xbrowse - Tooltip
Wow. Good look. Regards, saludos.
xbrowse - Tooltip
Dear Mr. Rao, can you please show me how to make this with AEVAL(). [code=fw:1tgaw846]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span> aDirSub <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nIdx2 := <span style="color: #000000;">3</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aDirSub<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c+= aDirSub<span style="color: #000000;">&#91;</span>nIdx2,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + CRLF <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span></div>[/code:1tgaw846] Best regards, Otto
xbrowse - Tooltip
[code=fw:2uk9w0dr]<div class="fw" id="{CB}" style="font-family: monospace;">AEval<span style="color: #000000;">&#40;</span> aDirSub, <span style="color: #000000;">&#123;</span> |aFile| c += aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> + CRLF <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span></div>[/code:2uk9w0dr]
xbrowse - Tooltip
Dear Mr. Rao, Your source is always like a work of art. Thank you very much. It is working fine. Best regards, Otto
xbrowse - data nDataType
In the constructor method ( New ) of xbrowse, nDataType is assigned a value of DATATYPE_RDD. Even the methods SetArray or SetADO do not change the nDataType. Therefore the nDataType always remains to be DATATYPE_RDD. The Initiate method of xBrowse executes SetRDD, because nDataType is DATATYPE_RDD, though SetArray or SetADO is already used. Execution of SetRDD in such cases is not necessary and seems logically not so appropriate, though SetRDD does not disturb the existing assignments of codeblocks. The relevant part of the Initiate method is given below [code:320gyipd] do case case &#58;&#58;nDataType == DATATYPE_RDD &#58;&#58;SetRDD&#40;&#41; otherwise MsgStop&#40;"Data type not supported", "TXBrowse class"&#41; end case [/code:320gyipd] I may be wrong, but it is possible that this was the code written in the initial stages of development before methods like SetArray / SetAdo were incorporated. Programmers can use xBrowse even for other data sources like TData / TDatabase or any data source for that matter. Keeping this in view, it is suggested for consideration that the above lines in the initiate method may be changed as : [code:320gyipd] if &#58;&#58;nDataType == DATATYPE_RDD &#58;&#58;SetRDD&#40;&#41; endif [/code:320gyipd] The defines for DATATYPE_RDD and DATATYPE_ARRAY already exist in the xbrowse.prg. New defines : #define DATATYPE_ADO 2 #define DATATYPE_USER 9 can be added and SetArray can assign ::nDataType := DATAYPE_ARRAY and SetAdo can assign ::nDataType := DATATYPE_ADO. This will also help the application program to retrieve the value of ::nDataType for meaningful use as may be appropriate.
xbrowse - data nDataType
Hi NageswaraRao,thanks for the great job you are doing in the Class tXbrowse. About the DATA nDataType, personally I find not mutch usefull, but you have reason, the methods SetArray and SetAdo must initialize it. Personally, I thing the SetRdd is not necesarty to be called in the method Inititate, we usually (me allways) call the SetRDD,SetAdo or SetArray, before calling the CreateFrom... method. Any way [code:2w1wr3f1] if &#58;&#58;nDataType == DATATYPE_RDD &#58;&#58;SetRDD&#40;&#41; endif [/code:2w1wr3f1] is more correct than the current.
xbrowse - delcol method
It appears the following commented lines are redundant and can be removed from the source code. [code:cjtykynp] METHOD DelCol&#40; nPos &#41; CLASS TXBrowse // local oCol // no purpose local nFor // oCol &#58;= TXBrwColumn&#40;&#41;&#58;New&#40; Self &#41; // no purpose < &#46;&#46;&#46; rest of the code &#46;&#46;&#46; > return nil [/code:cjtykynp]
xbrowse - delcol method
Modified, thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xbrowse - footers
Footers do not appear, as expected, if we write oBrw:lFooter := .t. oBrw:aCols[n]:bFooter := {|| "footertext" } unless we specify cFooter, that too not empty, atleast for one column. To make bFooters work, without having to specify non empty cfooter to atleast one column, following changes are to be made. The changes are also necessary to allocate correct width for bfooters column object's FooterHeight method [code:2qlr59vb] // if !Empty&#40; &#58;&#58;cFooter &#41; &#46;and&#46; &#58;&#58;oFooterFont != nil // existing code if &#40; iif&#40; &#58;&#58;bFooter == nil, &#58;&#58;cFooter, Eval&#40; &#58;&#58;bFooter &#41; &#41; &#41; != nil &#46;and&#46; &#58;&#58;oFooterFont != nil // new code [/code:2qlr59vb] column object's FooterWidth method [code:2qlr59vb] // cText &#58;= &#58;&#58;cFooter // existing code cText &#58;= If&#40; &#58;&#58;bFooter == nil, &#58;&#58;cFooter, Eval&#40; &#58;&#58;bFooter &#41; &#41; // new code &#46;&#46;&#46; &#46;&#46;&#46; // if !Empty&#40; cText &#41; // old code if cText != nil // new code [/code:2qlr59vb]
xbrowse - formato de columna numérica
Necesito poner en una columna un campo de una dbf que tiene valores numéricos con tres decimales, pero los quiero representar con "." para los miles y "," para los decimales. Hasta ahora lo hacía con un transform, pero quiero hacerlo sin usar transform. Ahora lo hago así: [code=fw:1h7zyb7y]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oTbr;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDS iif<span style="color: #000000;">&#40;</span>TB_MAQ->AUTOMATICA,<span style="color: #ff0000;">'Automática'</span>,<span style="color: #ff0000;">'Manual'</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>TB_MAQ->NUMCIERRE,<span style="color: #ff0000;">'@E 999,999.999'</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...<br />&nbsp;</div>[/code:1h7zyb7y] Quisiera saber si hay alguna manera de forma e hacer esto para que el valor no pierda su característica de ser un número, ya que al pasar previamnete por un transform lo convierte en caracter y esto implica gestión de cadenas en el EDIT correspondiente en el browse. Pero me gustaría hacerlo así (con la representación del número como sale usando el transform): [code=fw:1h7zyb7y]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oTbr;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDS iif<span style="color: #000000;">&#40;</span>TB_MAQ->AUTOMATICA,<span style="color: #ff0000;">'Automática'</span>,<span style="color: #ff0000;">'Manual'</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TB_MAQ->NUMCIERRE,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<br />&nbsp;</div>[/code:1h7zyb7y]
xbrowse - formato de columna numérica
Please NEVER use FIELDS clause. Use COLUMNS clause. [code=fw:68yqsfqs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oTbr <span style="color: #0000ff;">ID</span> <nID> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp;DATASOURCE <span style="color: #ff0000;">"TB_MAQ"</span> ;<br />&nbsp; &nbsp;COLUMNS <span style="color: #ff0000;">"AUTOMATICA"</span>, <span style="color: #ff0000;">"NUMCIERRE"</span> ;<br />&nbsp; &nbsp;PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"@E 999,999.999"</span> <br />&nbsp; &nbsp;<br />WITH OBJECT oTbr<br />&nbsp; &nbsp;:<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;">SetCheck</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, .t., <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Automatica"</span>, <span style="color: #ff0000;">"Manual"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br />END<br />&nbsp;</div>[/code:68yqsfqs]
xbrowse - formato de columna numérica
[quote="cnavarro":2q5qnwbz]Ponle antes del activate dialog el oBrw:CreateFromResource() y prueba[/quote:2q5qnwbz] Lo intente antes de postear porque me tira este error [quote:2q5qnwbz] Error description: Error FiveWin/2 Duplicated Id: No: 101 Stack Calls =========== Called from: .\source\classes\DIALOG.PRG => TDIALOG:DEFCONTROL( 366 ) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:CREATEFROMRESOURCE( 1208 ) Called from: Source\stock.prg => TAPP:PRUEBA( 74 ) Called from: Source\stock.prg => MAIN( 251 )[/quote:2q5qnwbz]
xbrowse - formato de columna numérica
estimado, esto esta bien? [code=fw:vdf74579]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"DLGMENU"</span><br />   <br />   ::<span style="color: #000000;">oBrw</span> := 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> ::<span style="color: #000000;">oDlg</span> <span style="color: #000000;">&#41;</span><br />      WITH ::<span style="color: #000000;">oBrw</span><br />    &nbsp; &nbsp; &nbsp;  :<span style="color: #000000;">datasource</span> := oQry<br />&nbsp; &nbsp;   ENDWITH<br />   <br />   ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">CENTERED</span><br /> </div>[/code:vdf74579]
xbrowse - formato de columna numérica
[quote="goosfancito":14atpib9]estimado, esto esta bien? [code=fw:14atpib9]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"DLGMENU"</span><br />   <br />   ::<span style="color: #000000;">oBrw</span> := 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> ::<span style="color: #000000;">oDlg</span> <span style="color: #000000;">&#41;</span><br />      WITH ::<span style="color: #000000;">oBrw</span><br />           :<span style="color: #000000;">datasource</span> := oQry<br />      ENDWITH<br />   <br />   ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">CENTERED</span><br /> </div>[/code:14atpib9][/quote:14atpib9] No please. Please use only the command syntax I posted above.
xbrowse - formato de columna numérica
Por favor podrias decirme como seria? esto no me estaría funcionando: [code=fw:l8htmjdz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> prueba<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TApp<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cSql, oQry<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">TEXT</span> into cSql<br />&nbsp; &nbsp;<span style="color: #0000ff;">Select</span> ;<br />&nbsp; &nbsp;a.idfactura AS c2, ;<br />&nbsp; &nbsp;a.fecha AS c3, ;<br />&nbsp; &nbsp;a.idcontacto AS c4,<br />&nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> tbfacturados AS a<br />&nbsp; &nbsp;ENDTEXT<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oQry := ::<span style="color: #000000;">oCnx</span>:<span style="color: #000000;">QUERY</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"DLGMENU"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xbrowse</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oDlg</span>;<br />&nbsp; &nbsp; &nbsp; datasource <span style="color: #ff0000;">"oQry"</span>;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"c2"</span>, <span style="color: #ff0000;">"c3"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:l8htmjdz]
xbrowse - formato de columna numérica
Ponle antes del activate dialog el oBrw:CreateFromResource() y prueba
xbrowse - formato de columna numérica
y el createfromresource sin el id ?
xbrowse - formato de columna numérica
[quote="cnavarro":3lyzh9rf]Ponle antes del activate dialog el oBrw:CreateFromResource() y prueba[/quote:3lyzh9rf] No. Please do not use this. This is built-in the command itself. NOT CORRECT [code=fw:3lyzh9rf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp;datasource <span style="color: #ff0000;">"oQry"</span>;<br />&nbsp;</div>[/code:3lyzh9rf] How do you think xbrowse know what is the datasource? CORRECT: [code=fw:3lyzh9rf]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; datasource oQry ;<br />&nbsp;</div>[/code:3lyzh9rf]
xbrowse - fwh 11.5 - disable Horizontal Scroll Bar
FranciscoA, Funcionou, fantastico!!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Muito Obrigado
xbrowse - fwh 11.5 - disable Horizontal Scroll Bar
Sr.Antonio, Daniel, oBrw:lVScroll :=.f. <-- Não funciona, como resolver? ex: fwh\samples\testxbrw.prg STATIC FUNCTION NewDialog( oWnd ) local oDlg, oBrw DEFINE DIALOG oDlg RESOURCE "TEST" OF oWnd title "opaaaaaaaa" oBrw := TXBrowse():New( oWnd ) REDEFINE XBROWSE oBrw ID 101 ; HEADERS "An array", "test" ; OF oDlg ; ARRAY { { "first", "row" }, { "second", "row" } } AUTOCOLS ; COLORS CLR_WHITE, CLR_BLUE [b:9fucwun4] oBrw:lHScroll :=.f. <---NAO FUNCIONA[/b:9fucwun4] ACTIVATE DIALOG oDlg ; ON INIT ( oBrw:SetColor( CLR_WHITE, CLR_BLUE ) ) RETURN NIL
xbrowse - fwh 11.5 - disable Horizontal Scroll Bar
Creo que lo puedes resolver (con PellesC), cambiando en Propiedades así: Solo presentar Scroll vertical: Window Styles: 0x50A10000 Saludos.
xbrowse - inline editing
Dear Mr. Rao, is there a way to open die combobox with larger high to show more items. Thank you in advance Otto [img:2fvf8522]https&#58;//mybergland&#46;com/FWForum/xbrowseinline&#46;jpg[/img:2fvf8522]
xbrowse - inline editing
Sorry.
xbrowse - inline editing
Dear Mr. Rao, is it possible to define Listbox object for editing as a member of the parent window of xBrowse and set height. Thank you in advance Otto
xbrowse - inline editing
Suggest you create a dialog with listbox and trigger it with EDIT_BUTTON I will soon post a small sample
xbrowse - inline editing
Dear Mr. Rao, can you please help me to understand why oDlgParent:nTop is 0 if I use ACTIVATE DIALOG oDlg CENTERED and why it does not change if I move the DIALOG. What command do I need to refresh the values. Thank you in advance Otto [code=fw:ktmdrijl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oDlg, oBrw<br />   <span style="color: #00C800;">LOCAL</span> aPlatzhalter := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   aadd<span style="color: #000000;">&#40;</span>aPlatzhalter ,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"[NAME]"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <br />   aadd<span style="color: #000000;">&#40;</span>aPlatzhalter ,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Vorname"</span>,<span style="color: #ff0000;">"[VORNAME]"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <br />   aadd<span style="color: #000000;">&#40;</span>aPlatzhalter ,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Ort"</span>,<span style="color: #ff0000;">"[ORT]"</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;">DIALOG</span> oDlg ;<br />      <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">600</span>;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">780</span>, <span style="color: #000000;">400</span> ;<br />      <span style="color: #0000ff;">PIXEL</span>                                     <span style="color: #B900B9;">//TRUEPIXEL</span><br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> ;<br />      <span style="color: #0000ff;">XBROWSE</span> oBrw ;<br />      <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>, <span style="color: #000000;">-20</span> ;<br />      DATASOURCE aPlatzhalter ;<br />      HEADERS <span style="color: #ff0000;">"Beschreibung"</span>, <span style="color: #ff0000;">"Platzhalter"</span> ;<br />      COLSIZES <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span> ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> ;<br />      CELL ;<br />      LINES ;<br />      NOBORDER<br /><br />   WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />   :<span style="color: #000000;">nEditType</span>     := EDIT_BUTTON<br />   :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"OPEN"</span> <span style="color: #000000;">&#41;</span><br />   :<span style="color: #000000;">nBtnBmp</span>       := <span style="color: #000000;">1</span><br />   :<span style="color: #000000;">bEditBlock</span>    := <span style="color: #000000;">&#123;</span> || showCombo<span style="color: #000000;">&#40;</span> oBrw, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />END<br /><br />WITH OBJECT oBrw<br />   :<span style="color: #000000;">nRowHeight</span>          := <span style="color: #000000;">60</span><br />   :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />END<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> showCombo<span style="color: #000000;">&#40;</span> oBrw ,oDlgParent<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, cCombo := <span style="color: #ff0000;">"2"</span><br />   <span style="color: #00C800;">local</span> aItems := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">"2"</span>, <span style="color: #ff0000;">"3"</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">local</span> aRect    := GetClientRect<span style="color: #000000;">&#40;</span> oDlgParent:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aPoint := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> nCol := <span style="color: #000000;">100</span><br />   *----------------------------------------------------------<br />   <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">&#40;</span> oDlgParent <span style="color: #000000;">&#41;</span><br />   nRow := <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nRowSel</span> * oBrw:<span style="color: #000000;">nRowHeight</span> <span style="color: #000000;">&#41;</span> + oBrw:<span style="color: #000000;">HeaderHeight</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span><br />   aPoint      := ClientToClient<span style="color: #000000;">&#40;</span> oDlgParent:<span style="color: #000000;">hWnd</span>, oBrw:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">&#123;</span> nRow, nCol <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">&#40;</span> aPoint <span style="color: #000000;">&#41;</span><br />   nRow := <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nRowSel</span> * oBrw:<span style="color: #000000;">nRowHeight</span> <span style="color: #000000;">&#41;</span> + oBrw:<span style="color: #000000;">HeaderHeight</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> + str<span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">FROM</span> nRow, <span style="color: #000000;">300</span> ;<br />      <span style="color: #0000ff;">TO</span> nRow + <span style="color: #000000;">100</span>, <span style="color: #000000;">400</span> + <span style="color: #000000;">6</span> ;<br />      <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlgParent<br /><br />   @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> cCombo <span style="color: #0000ff;">ITEMS</span> aItems <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">100</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />*----------------------------------------------------------<br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ClientToClient<span style="color: #000000;">&#40;</span> hFrom, hDest, aPoint, lInWnd <span style="color: #000000;">&#41;</span><br /><br />   aPoint   := Client2Screen<span style="color: #000000;">&#40;</span> hFrom, aPoint <span style="color: #000000;">&#41;</span><br />   lInWnd   := <span style="color: #000000;">&#40;</span> WindowFromPoint<span style="color: #000000;">&#40;</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == hDest <span style="color: #000000;">&#41;</span><br />   aPoint   := Screen2Client<span style="color: #000000;">&#40;</span> hDest, aPoint <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> aPoint<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Screen2Client<span style="color: #000000;">&#40;</span> hWnd, aPoint <span style="color: #000000;">&#41;</span><br /><br />   aPoint := ScreenToClient<span style="color: #000000;">&#40;</span> hWnd, aPoint <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> > 0x8000<br />      aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> -= 0xFFFF<br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">if</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> > 0x8000<br />      aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> -= 0xFFFF<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aPoint<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Client2Screen<span style="color: #000000;">&#40;</span> hWnd, aPoint <span style="color: #000000;">&#41;</span><br /><br />   aPoint   := ClientToScreen<span style="color: #000000;">&#40;</span> hWnd, aPoint <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> > 0x8000<br />      aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> -= 0xFFFF<br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">if</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> > 0x8000<br />      aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> -= 0xFFFF<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aPoint<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /><br /> </div>[/code:ktmdrijl]
xbrowse - inline editing
Please try this sample: [code=fw:2qb6ino1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />   <span style="color: #00C800;">local</span> aData := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />   AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |u,i| aData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span> i, Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, NTOCMONTH<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">40</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg DATASOURCE aData ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> ;<br />      CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw<br />      WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />         :<span style="color: #000000;">nEditType</span>     := EDIT_BUTTON<br />         :<span style="color: #000000;">bEditBlock</span>    := <span style="color: #000000;">&#123;</span> | nRow, nCol, oCol, nKey | MyBtnDialog<span style="color: #000000;">&#40;</span> nRow, nCol, oCol, nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      END<br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> MyBtnDialog<span style="color: #000000;">&#40;</span> nRow, nCol, oCol, nKey <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cRet<br />   <span style="color: #00C800;">local</span> oDlg, oLbx, oFont, aItems := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cItem<br /><br />   AEval<span style="color: #000000;">&#40;</span> aItems, <span style="color: #000000;">&#123;</span> |u,i| aItems<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := NTOCMONTH<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   cItem    := oCol:<span style="color: #000000;">Value</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"VERDANA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">220</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">LISTBOX</span> oLbx <span style="color: #0000ff;">VAR</span> cItem <span style="color: #0000ff;">ITEMS</span> aItems ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">185</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><br />   @ <span style="color: #000000;">190</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"OK"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> cRet := cItem, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">190</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"CANCEL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oCol:<span style="color: #000000;">AnchorToCell</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> cRet<br /> </div>[/code:2qb6ino1] Use the method [b:2qb6ino1]oCol:AnchorToCell( oDlg ) [/b:2qb6ino1]to correctly position the dialog. [url=https&#58;//imageshack&#46;com/i/pm7nKfvRp:2qb6ino1][img:2qb6ino1]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/922/7nKfvR&#46;png[/img:2qb6ino1][/url:2qb6ino1]
xbrowse - inline editing
Dear Mr. Rao, thank you I will try. But would you be so kind to tell me what I am missing with oDlgParent:nTop is 0 if I use ACTIVATE DIALOG oDlg CENTERED and why it does not change if I move the DIALOG. Thank you in advance Otto
xbrowse - inline editing
[quote="Otto":2tbbl3iw]Dear Mr. Rao, thank you I will try. But would you be so kind to tell me what I am missing with oDlgParent:nTop is 0 if I use ACTIVATE DIALOG oDlg CENTERED and why it does not change if I move the DIALOG. Thank you in advance Otto[/quote:2tbbl3iw] nTop and nLeft of a dialog are always relative to the screen. Even if we specify a parent window/dialog, still these coordinates are relative to screen and not relative to the parent window/dialog. So, you need to convert "nRow" to screen coordinates. Here is an amended version of the ShowCombo function. [code=fw:2tbbl3iw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> showCombo<span style="color: #000000;">&#40;</span> oBrw ,oDlgParent<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, cCombo := <span style="color: #ff0000;">"2"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aItems := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">"2"</span>, <span style="color: #ff0000;">"3"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">0</span><br /><span style="color: #B900B9;">// &nbsp; local aRect &nbsp; &nbsp;:= GetClientRect( oDlgParent:hWnd )</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aPoint := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #B900B9;">// &nbsp; local nCol := 100</span><br />&nbsp; &nbsp;*----------------------------------------------------------<br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;xbrowse( oDlgParent )<br />&nbsp; &nbsp;nRow := ( oBrw:nRowSel * oBrw:nRowHeight ) + oBrw:HeaderHeight( .t. ) - 1<br />&nbsp; &nbsp;aPoint &nbsp; &nbsp; &nbsp;:= ClientToClient( oDlgParent:hWnd, oBrw:hWnd, { nRow, nCol } )<br />&nbsp; &nbsp;xbrowse( aPoint )<br />*/</span><br />&nbsp; &nbsp;nRow := <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nRowSel</span> * oBrw:<span style="color: #000000;">nRowHeight</span> <span style="color: #000000;">&#41;</span> + oBrw:<span style="color: #000000;">HeaderHeight</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;aPoint := ClientToScreen<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">&#123;</span> nRow, oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nDisplayCol</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;DEFINE DIALOG oDlg ;<br />&nbsp; &nbsp; &nbsp; TITLE "Test" + str(nRow) ;<br />&nbsp; &nbsp; &nbsp; FROM nRow, 300 ;<br />&nbsp; &nbsp; &nbsp; TO nRow + 100, 400 + 6 ;<br />&nbsp; &nbsp; &nbsp; PIXEL ;<br />&nbsp; &nbsp; &nbsp; STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;<br />&nbsp; &nbsp; &nbsp; OF oDlgParent<br />*/</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">220</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> cCombo <span style="color: #0000ff;">ITEMS</span> aItems <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</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:2tbbl3iw]
xbrowse - inline editing
Dear Mr. Rao, thank you. I mean why is ? oDlgParent:nTop if I send the DIALOG oDlg to the function always 0. Best regards Otto
xbrowse - inline editing
[quote="Otto":k0srsxmm]Dear Mr. Rao, thank you. I mean why is ? oDlgParent:nTop if I send the DIALOG oDlg to the function always 0. Best regards Otto[/quote:k0srsxmm] First call oDlgParent:CoorsUpdate() and then check nTop, nLeft, nBottom, nRight
xbrowse - isrtf()
Amigos, Me sucede lo siguiente. Resulta que tengo una tabla con las columnas, codigo char(10), nombre char (59). Y al adicionar filas que inicien con el TEXTO "RTF" al mostrarlo en el xbrowse, simplemente sale una leyenda <RitchText>. Como funciona la funcion isrtf()? Solo pasa cuando el texto "RTF" está al inicio del campo. Alguna ayuda?
xbrowse - nRecSelColor
Acho que: oBrw:nRecSelColor := nRGB(211, 227, 247) fica bem mais amigavel que a cor DEFAULT atualmente utilizada. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xbrowse - reconocimientos del 1° caracter de codigo barra
Amigos... Tengo un xbrowse y quisiera analizar el 1° carácter que escriben para una búsqueda incremental.... <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> La idea es que cuando escriban el primer carácter o el 1° carácter de una lectura de código barra coloque o sea # ejecutar una función..... se podrá ? <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> muchas gracias David [code=fw:3iu43i8c]<div class="fw" id="{CB}" style="font-family: monospace;">  DbSelectArea<span style="color: #000000;">&#40;</span>MAEDOCU<span style="color: #000000;">&#41;</span><br />    <br />  @ <span style="color: #000000;">1.000</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oLbxDocu ;<br />              FIELDS <span style="color: #000000;">&#40;</span>MAEDOCU<span style="color: #000000;">&#41;</span>->DETALLE ,;<br />                     <span style="color: #000000;">&#40;</span>MAEDOCU<span style="color: #000000;">&#41;</span>->IDENDOC ,;<br />                     <span style="color: #000000;">&#40;</span>MAEDOCU<span style="color: #000000;">&#41;</span>->CDDOCNO ;  <br />              HEADERS <span style="color: #ff0000;">'Nombre'</span> ,;<br />                      <span style="color: #ff0000;">'Identificacion'</span> ,;<br />                      <span style="color: #ff0000;">'Doc.de Ref.'</span> ;<br />              SIZES <span style="color: #000000;">450</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">80</span> ;<br />                  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">349</span>,<span style="color: #000000;">170</span> ;<br />                  <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">&#40;</span><span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Ops_Selc=<span style="color: #000000;">0</span>,<span style="color: #000000;">&#40;</span>lSelec:=.t.,oDlgDocuVige:<span style="color: #000000;">End</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;">&#41;</span> ;<br />              <span style="color: #0000ff;">ALIAS</span> MAEDOCU ;<br />              AUTOSORT CELL LINES NOBORDER ;<br />              <span style="color: #0000ff;">OF</span> oDlgDocuVige <br /><br />  oLbxDocu:<span style="color: #000000;">nRowDividerStyle</span> = LINESTYLE_NOLINES<br />  oLbxDocu:<span style="color: #000000;">nColDividerStyle</span> = LINESTYLE_BLACK<br />  oLbxDocu:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br />*  oLbxDocu:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />  oLbxDocu:<span style="color: #000000;">lHScroll</span> := .F.<br />*  oLbxDocu:<span style="color: #000000;">lVScroll</span> := .F.<br /><br />  WITH OBJECT oLbxDocu<br />      :<span style="color: #000000;">lIncrFilter</span>      := .t.<br />      :<span style="color: #000000;">lSeekWild</span>        := .t.<br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  END<br /><br />  @ <span style="color: #000000;">18</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> oLbxDocu:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oLbxDocu:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">Of</span> oDlgDocuVige ;<br />                           <span style="color: #0000ff;">COLOR</span> CLR_BLACK,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">207</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">244</span><span style="color: #000000;">&#41;</span>  </div>[/code:3iu43i8c]
xbrowse - reconocimientos del 1° caracter de codigo barra
<!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
xbrowse - reconocimientos del 1° caracter de codigo barra
Estimados Alguna sugerencia de como hacerlo ?? muchas gracias David
xbrowse - reconocimientos del 1° caracter de codigo barra
Ola Tente assim: oBrw:bKeyDown := {|nKey| TeclaPress(nkey) } oBrw:bChange := {|| TeclaPress(0) }
xbrowse - reconocimientos del 1° caracter de codigo barra
Muchas gracias, por tu ayuda..... el tema es que debo tener cargada toda la cadena de caracteres que me lee el código barra, y acá solo me analiza un carácter digitado. la idea es que en la cadena de caracteres del codigo barra, el primer carácter es "_" y después viene 10 caracteres numéricos, y estando dentro del xbrowse si leen dicho código barra y al tenes el primer carácter "_" salgo a buscar los datos numéricos posteriores al "_"... Seria una forma de búsqueda..... Muchas gracias David
xbrowse -> html
How converte a table xbrowse into html ?
xbrowse -> html
Export to Excel with oBrw:ToExcel() and then save as html file
xbrowse -> html
and how ? I wish create it from fwh app Menuitem "Save as Excel" ACTION oGrid:ToExcel() Menuitem "Save as Html" ACTION ???
xbrowse -> html
Menuitem "Save as Html" ACTION oGrid:ToHTML() in FWH 15.05 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xbrowse -> html
I'm creating allready it this evening
xbrowse -Unselect line
Hi. Is there a way to open an xbrowsed array with NO record selected? Thank you, Reinaldo.
xbrowse -Unselect line
Hi Reynaldo. If I Understand... One way to mimic what you ask, is putting the same xBrowse's background color to the selector rod. Thus, the selector bar is not visible. (But surely there is a designated register) Eg: For xBrowse's White background: oBrw:bClrStd := {|| { nRGB( 0, 0, 0), nRGB(255,255,255) }} oBrw:bClrSel := oBrw:bClrStd oBrw:bClrSelFocus := oBrw:bClrStd Regards.