topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse to Excel how to bring ON TOP ?
Hi Uwe, I don't know if this will help but.... This is per the Microsoft Knowledge Base article #886217: (Fix the New Program Window so that an Office program will automatically come to the front when launched.) To resolve this issue, modify the value of the ForegroundLockTimeout registry entry in Registry Editor. To do this, follow these steps: 1 Click the Start Orb, click Run, type regedit in the Open box, and then click OK. 2 In Registry Editor, locate and then click the following registry subkey: HKEY_CURRENT_USER\Control Panel\Desktop 3 In the right pane, locate and then double-click ForegroundLockTimeout. 4 Under Base, click Decimal, type 0 in the Value data box, and then click OK. Note The default decimal value for the ForegroundLockTimeout registry entry is set as 200000. 5 Quit Registry Editor. 6 Restart your computer. *This must be done for each User Account on the system.
xBrowse to Excel how to bring ON TOP ?
Hello Jeff, Thank You very much. I will test it. In METHOD To Excel there is a BringWindowToTop, but doesn't work in my situation. [color=#0000FF:35wgk788]METHOD ToExcel( bProgress, nGroupBy, aCols ) CLASS TXBrowse ... ... oExcel:ScreenUpdating := .t. oExcel:visible := .T. ShowWindow( oExcel:hWnd, 3 )[/color:35wgk788] [color=#FF0000:35wgk788]BringWindowToTop( oExcel:hWnd )[/color:35wgk788] [color=#0000FF:35wgk788]return oSheet[/color:35wgk788] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse to Excel how to bring ON TOP ?
Jeff, the key didn't exist in my registry. I added the values, but there is no difference. Tested with sample : [img:39b5kusd]http&#58;//www&#46;pflegeplus&#46;com/pictures/testexcel1&#46;jpg[/img:39b5kusd] Best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xBrowse to Excel how to bring ON TOP ?
Uwe Try oExcel:Visible := .T. without all the rest , it should be enough Richard
xBrowse to Excel how to bring ON TOP ?
Richard, In class TXBrowse [b:3o1kkfgr]METHOD ToExcel( bProgress, nGroupBy, aCols )[/b:3o1kkfgr] ToTop is included, but Excel moves behind the window or dialog defined in class TXbrowse [b:3o1kkfgr]oExcel:ScreenUpdating := .t. oExcel:visible := .T. ShowWindow( oExcel:hWnd, 3 )[/b:3o1kkfgr] [color=#0000FF:3o1kkfgr][b:3o1kkfgr]BringWindowToTop( oExcel:hWnd )[/b:3o1kkfgr][/color:3o1kkfgr] Best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xBrowse to Excel how to bring ON TOP ?
I have the same problem with excel, try this, working for me oBrw:ToExcel() SysRefresh() // Add this line BringWindowToTop( FindWindow( 0, "Microsoft Excel - Libro1" ) ) // Add this line, traslate to english ( "Microsoft Excel - Book1" or something like this ) Best Regards
xBrowse to Excel how to bring ON TOP ?
I use this [code=fw:17qh4u66]<div class="fw" id="{CB}" style="font-family: monospace;"><br />  .<br />  .<br />SetFocusAfter<span style="color: #000000;">&#40;</span>FindWindow<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"XLMAIN"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//---------------------------------------------------</span><br /><span style="color: #00C800;">function</span> SetFocusAfter<span style="color: #000000;">&#40;</span>hWnd<span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">local</span> oTimer<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">timer</span> oTimer <span style="color: #0000ff;">interval</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">of</span> oWnd    ;<br />   <span style="color: #0000ff;">action</span> <span style="color: #000000;">&#40;</span>BringWindowToTop<span style="color: #000000;">&#40;</span>hWnd<span style="color: #000000;">&#41;</span>, oTimer:<span style="color: #000000;">DeActivate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">timer</span> oTimer<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:17qh4u66]
xBrowse to Excel how to bring ON TOP ?
Thank You very much for the response. I tested the function and Excel moves to TOP. It is still funny : 1. Excel opens on TOP 2. Excel moves to BACK 3. Excel moves to TOP again @ 245, 240 BTNBMP oBtn2 OF oDlg ; SIZE 50, 25 PIXEL; NOBORDER ; PROMPT "&Excel " ; ACTION ( IIF( oFld:nOption = 1, oBrw1:ToExcel(), oBrw2:ToExcel() ), ; // ASC or VKEYS [color=#0000FF:33vj2blz] [b:33vj2blz] SETFOCUSAFTER( FINDWINDOW( "XLMAIN", 0 ) )[/b:33vj2blz][/color:33vj2blz] ) ; FILENAME c_path1 + "Excel.Bmp" ; FONT oFont2 2007 ; LEFT oBtn2:lTransparent := .t. oBtn2:cToolTip = { "Export " + CRLF + "to EXCEL","EXPORT", 1, CLR_BLACK, 14089979 } oBtn2:SetColor( 0, ) Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse under the WEB
Hi, Can I use Mercury to implement something similar to xBrowse under the WEB ?
xBrowse under the WEB
Mercury is a MVC (model view controller) library for mod_harbour Using mod_harbour and a GUI API like bootstrap you can create browses for the web. Using a MVC you optimize your mod_harbour productivity using the model view controller paradigm.
xBrowse under the WEB
Thank You Antonio. Are there any examples that describe creating tables that are similar in functionality to xBrowse ?
xBrowse under the WEB
datatable API live demos: [url:8elu8xfb]https&#58;//www&#46;modharbour&#46;org/modharbour_samples/datatable/[/url:8elu8xfb] datatable examples source code: [url:8elu8xfb]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/tree/master/samples/datatable[/url:8elu8xfb]
xBrowse using SetAlign provokes an error
Hi, if I use SetAlign with FW10.09 in following way: [code=fw:2d6v4q63]<div class="fw" id="{CB}" style="font-family: monospace;">            oLB:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> AL_RIGHT <span style="color: #000000;">&#41;</span><br />            oLB:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> AL_RIGHT <span style="color: #000000;">&#41;</span><br /> </div>[/code:2d6v4q63] with oLB being my xBrowse, I get following error: [quote:2d6v4q63]Application =========== Path and name: D:\cto_win\eho40\eho.exe (32 bits) Size: 6,246,912 bytes Time from start: 0 hours 0 mins 1 secs Error occurred at: 04.11.2010, 17:29:40 Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls =========== Called from: => EVAL(0) Called from: .\source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE(383) Called from: => TXBROWSE:KEYCOUNT(0) Called from: .\source\classes\xbrowse.prg => TXBROWSE:REFRESH(1127) Called from: .\source\classes\xbrowse.prg => TXBRWCOLUMN:SETALIGN(8416) Called from: AD_MAIN.prg => E_ADRESSEN(221) Called from: EHO.prg => STARTADRESSEN(1257) Called from: EHO.prg => (b)EHO_INIT(923) Called from: .\source\classes\WINDOW.PRG => TWINDOW:KEYDOWN(2546) Called from: .\source\classes\MDICLIEN.PRG => TMDICLIENT:KEYDOWN(243) Called from: => TMDICLIENT:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(3394) Called from: => WINRUN(0) Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(978) Called from: EHO.prg => MAIN(680)[/quote:2d6v4q63] If I remove the oBrw:Refresh() from SetAlign (in xBrowse.prg), the error disappears: [code=fw:2d6v4q63]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SetAlign<span style="color: #000000;">&#40;</span> nAlign <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrwColumn<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> nAlign <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'N'</span><br />      nAlign      := MinMax<span style="color: #000000;">&#40;</span> nAlign, <span style="color: #000000;">0</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> nAlign != ::<span style="color: #000000;">nDataStrAlign</span><br />         ::<span style="color: #000000;">nDataStrAlign</span>      := nAlign<br />         ::<span style="color: #000000;">nDataStyle</span>         := ::<span style="color: #000000;">DefStyle</span><span style="color: #000000;">&#40;</span> nAlign, ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nDataLines</span> == <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #B900B9;">//::oBrw:Refresh() <= I removed this line</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Self</span><br /> </div>[/code:2d6v4q63] Is there a bug in this method or am I doing something wrong?
xBrowse using SetAlign provokes an error
Try putting a sysrefresh() in front of the ::oBrw:refresh(). Regards, James
xBrowse using SetAlign provokes an error
[quote="James Bott":2kzgxggd]Try putting a sysrefresh() in front of the ::oBrw:refresh().[/quote:2kzgxggd] Same error still exists...
xBrowse using SetAlign provokes an error
Gilbert, Can you put together a small sample program showing the problem? James
xBrowse using SetAlign provokes an error
1. SetAlign() method is intended to be used for changing alignment during runtime. Recommended way to set alignment of columns, during initial definition of xbrowse, is by oCol:nDataStrAlign := <nAlign>. 2. From the error code, it is understood that data source is not yet specified ( in command mode ALIAS, ARRAY, RECORDSET, etc or in oops style, SetRDD, SetArray, etc ) before defining columns and properties. That is the reason bKeyCount is undefined when SetAlign is called. Recommended way is to set the data source before defining columns. 3. As our friend suggested it would be nice if u post a self contained example.
xBrowse using SetAlign provokes an error
Rao, [quote="nageswaragunupudi":24kb55ch]1. SetAlign() method is intended to be used for changing alignment during runtime. Recommended way to set alignment of columns, during initial definition of xbrowse, is by oCol:nDataStrAlign := <nAlign>.[/quote:24kb55ch] Thanks, this works [quote="nageswaragunupudi":24kb55ch] 2. From the error code, it is understood that data source is not yet specified ( in command mode ALIAS, ARRAY, RECORDSET, etc or in oops style, SetRDD, SetArray, etc ) before defining columns and properties. That is the reason bKeyCount is undefined when SetAlign is called. Recommended way is to set the data source before defining columns. [/quote:24kb55ch] Right, this was the problem [quote="nageswaragunupudi":24kb55ch] 3. As our friend suggested it would be nice if u post a self contained example.[/quote:24kb55ch] as the problem is solved and because it was my fault: is an example still eligible?
xBrowse using SetAlign provokes an error
Glad that the problem is solved.
xBrowse using SetAlign provokes an error
[quote:12ahgphu]as the problem is solved and because it was my fault: is an example still eligible?[/quote:12ahgphu] Maybe a small sample showing how you got it working would help others avoid the same problem you had. Regards, James
xBrowse valid works correctly?
There are a couple of issues that I am having a problem with. 1. Pressing escape should revert cell back to the value prior to editing. 2. While editing you can select other cells while still editing field. You should not be able to select another cell or row while the edit is still invoked. 3. Is there any way to goto the next editable cell? 4. While editing cell with a valid, enter something that the valid function returns false so the cell cannot save. Then alt-tab to another application, then return to window with edited cell. The focus is no longer on the cell even though the cell thinks it is still in edit mode. All the test were done with mallorca.prg in the samples folder. Thanks, Gale
xBrowse valid works correctly?
Gale, Yes, we are aware of those issues and we plan to solve/implement them asap, thanks
xBrowse validar e atualizar célula?
Antonio, usando a xbrowse não estou conseguindo atualizar o conteudo de uma célula, ex: obRW:aCols[1]:bOnPostEdit := {|o,x| aprod[ obRW:nArrayAt,1] := x } obRW:aCols[1]:bStrData := { || trans(aprod[ obRW:nArrayAt,1],'999') } obRW:aCols[1]:bEditValue:= { || aprod[ obRW:nArrayAt,1] } obRW:aCols[1]:nEditType := EDIT_GET obRW:aCols[1]:bEditValid := {|oGet| Seekproduto(oget) } STATIC Function Seekproduto(oget) local ubuffer:= oGet:Value() if ! existe_prods(ubuffer) // aqui preciso atualizar o valor de ubuffer, como fazer? // algo assim oget:=0 return (.f.) endif return(.t.)
xBrowse validar e atualizar célula?
Olá, Tente isto: [code:1k2ka1lc] STATIC Function Seekproduto&#40;oget&#41; local ubuffer&#58;= oGet&#58;Value&#40;&#41; if ! existe_prods&#40;ubuffer&#41; oGet&#58;varput&#40; 0 &#41; oGet&#58;refresh&#40;&#41; return &#40;&#46;f&#46;&#41; endif return&#40;&#46;t&#46;&#41; [/code:1k2ka1lc] Abraços, Rossine.
xBrowse validar e atualizar célula?
Revisa fwh\samples\mallorca.prg Que ha sido modificado y probado a fondo en FWH 8.01, por lo que es distinto y funciona distinto del que se incluye en FWH 7.12
xBrowse validar e atualizar célula?
GRATO
xBrowse with ADO
Mr Nages, I have a xBrowse I need switching Recordset dynamically ,and the table and fields of the recordset are not identical. I solved in this way Open new Recset oNewRs FOR i := len(oBrwLis:aCols) to 1 STEP - 1 oBrw:DelCol(i) NEXT oBrw:SetADO( oNewRs ) oRsOld:Close() oBrw:GoTop() oBrw:Refresh() Is correct use oBrw:SetADO( oNewRs ) or can cause side effects ? I have another question In the xBrowse I have logical columns : COL_1 , COL_2,... I do not understand why this works [code=fw:2ntw44th]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FOR</span> nX := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span> <br />    WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>nX<span style="color: #000000;">&#93;</span><br />        :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />        :<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">""</span>   <span style="color: #000000;">&#125;</span><br />        <span style="color: #00C800;">IF</span> :<span style="color: #000000;">cExpr</span> == <span style="color: #ff0000;">"COL_1"</span><br />           :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>  oBrw:<span style="color: #000000;">oRs</span>:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"COL_1"</span> <span style="color: #000000;">&#41;</span> :<span style="color: #000000;">Value</span>   == <span style="color: #000000;">-1</span> ,.T.,.F.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />        <span style="color: #00C800;">ENDIF</span>  <br />        <span style="color: #00C800;">IF</span> :<span style="color: #000000;">cExpr</span> == <span style="color: #ff0000;">"COL_2"</span><br />          :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>  oBrw:<span style="color: #000000;">oRs</span>:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"COL_2"</span> <span style="color: #000000;">&#41;</span> :<span style="color: #000000;">Value</span>   == <span style="color: #000000;">-1</span> ,.T.,.F.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />        <span style="color: #00C800;">ENDIF</span>  <br />    END<br /><span style="color: #00C800;">NEXT</span>  </div>[/code:2ntw44th] and this dosn't work [code=fw:2ntw44th]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FOR</span> nX := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span> <br />    WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>nX<span style="color: #000000;">&#93;</span><br />        :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />        :<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">""</span>   <span style="color: #000000;">&#125;</span><br />        <br />        :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>  oBrw:<span style="color: #000000;">oRs</span>:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span>:<span style="color: #000000;">cExpr</span><span style="color: #000000;">&#41;</span> :<span style="color: #000000;">Value</span>   == <span style="color: #000000;">-1</span> ,.T.,.F.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />        <br />        <br />    END<br /><span style="color: #00C800;">NEXT</span>  </div>[/code:2ntw44th] Thanks in anticipation Maurizio <!-- m --><a class="postlink" href="http://www.nipeservice.com">http://www.nipeservice.com</a><!-- m -->
xBrowse with ADO
You can simply assign new RecSet object if the field structures are identical. XBrowse is designed for this, provided you do not directly use the recset object in your code. But xbrowse is not designed to handle replacing RecSet with totally a different field structure. I personally prefer is to create new Browse and switch the browses. This is what I do in my own applications. However you may try the approach you proposed with these modifications: 1. delete all columns as in your code. then oBrw:lAdjusted := .f. // new oBrw:SetADO( oRsNew ) // You may use last param aFldNames if you want specific fields // Here you insert other code like changing bEditValue, SetCheck() etc. Finally, oBrw:Adjust() // new I like your feedback. About setcheck(): First change the bEditValue to return logical value, set oCol:cDataType := 'L' and then call SetCheck() You do not touch bStrData ( difference from older versions) WITH OBJECT oCol :bEditValue := { ............} :cDataType := 'L' :SetCheck() END The reason for your second code not working is that you can not use loop based variables in building a codeblock within a loop. Instead try: :bEditValue := { |x,o| oBrw:oRs:Fields(o:cExpr) :Value == -1 } Still this makes the column readonly. Make it read/write by :bEditValue := { |x,o| If( x == nil, oBrw:oRs:Fields(o:cExpr):Value == -1, ; oBrw:oRs:Fields(o:cExpr):Value := If( x, -1, 0 ) ) }
xBrowse with ADO
Thanks Mr Nages, I followed your advice and it works. I checked the memory usage and I noted that memory increase. I created this sample using a classic xbrowse with DBF (I know it is exaggerated) . [code=fw:2rgdtakm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br /><span style="color: #00C800;">Static</span> oBrw,oDlg <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCol<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n := RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">157</span>, <span style="color: #000000;">248</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;XbrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #0000ff;">ALIAS</span> CUST<br /><br />&nbsp; &nbsp;<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;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">640</span>,<span style="color: #000000;">440</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'XBrowse Gradient Rows FWH 9.12'</span><br /><br />&nbsp; DoBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bStart</span> := <span style="color: #000000;">&#123;</span>|| BuildTimer<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /><br />&nbsp; &nbsp;CLOSE CUST<br />&nbsp; &nbsp;<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: #B900B9;">//-------------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> DoBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">'FIRST'</span>, <span style="color: #ff0000;">'HIREDATE'</span>, <span style="color: #ff0000;">'MARRIED'</span>, <span style="color: #ff0000;">'SALARY'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'CUST'</span> LINES NOBORDER<br /><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">4</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> BuildTimer<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">local</span> oTimer<br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oTimer <span style="color: #0000ff;">INTERVAL</span> <span style="color: #000000;">50</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oTimer:<span style="color: #000000;">deactivate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:= <span style="color: #00C800;">nil</span>,DoBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTimer:<span style="color: #0000ff;">activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTimer<br />&nbsp;<br />&nbsp;<br />&nbsp;<span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span></div>[/code:2rgdtakm] The program crash after 30/60 minutes (depends to PC memory) with Unrecoverable error 9006: hb_xgrab can't allocate memory . Fivewin dosn't return any messagge , harbour get hb_out.log [code=fw:2rgdtakm]<div class="fw" id="{CB}" style="font-family: monospace;">Application Internal Error - C:\FWH_09\samples\xb.exe<br />Terminated <span style="color: #00C800;">at</span>: <span style="color: #000000;">2014</span><span style="color: #000000;">-12</span><span style="color: #000000;">-01</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">47</span>:<span style="color: #000000;">28</span><br />Unrecoverable error <span style="color: #000000;">9006</span>: <span style="color: #000000;">hb_xgrab</span> can<span style="color: #ff0000;">'t allocate memory<br />Called from __CLSINST(0)<br />Called from HBCLASS:INSTANCE(0) in ../../../tclass.prg<br />Called from TXBROWSE(128) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\X</span>BROWSE.PRG<br />Called from (b)TXBROWS(13245) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\X</span>BROWSE.PRG<br />Called from TXBROWS(13255) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\X</span>BROWSE.PRG<br />Called from XBROWSENEW(12788) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\X</span>BROWSE.PRG<br />Called from DOBROWSE(37) in XB.prg<br />Called from (b)BUILDTIMER(60) in XB.prg<br />Called from TIMEREVENT(73) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\T</span>IMER.PRG<br />Called from (b)TWINDOW(644) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\W</span>INDOW.PRG<br />Called from TDIALOG:TIMER(0) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\W</span>INDOW.PRG<br />Called from TWINDOW:HANDLEEVENT(0)<br />Called from TDIALOG:HANDLEEVENT(903) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>IALOG.PRG<br />Called from DIALOGBOXINDIRECT(0)<br />Called from TDIALOG:ACTIVATE(283) in .<span style="color: #000000;">\s</span>ource<span style="color: #000000;">\c</span>lasses<span style="color: #000000;">\D</span>IALOG.PRG<br />Called from MAIN(23) in XB.prg<br />------------------------------------------------------------------------<br /></span></div>[/code:2rgdtakm] I use : FWH_09 , Harbour , BCC Regards Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
xBrowse with ADO
Each time DoBrowse() is executed, the new oBrw is added to oDlg:aControls array and this array keeps bloating till memory gets exhausted. Please try inserting oDlg:aControls := {} before defining browse in DoBrowse()
xBrowse with ADO
Hello I try oDlg:aControls := {} same problem , I verified the len(oDlg:aControls) and remain the same . Regards Maurizio
xBrowse with ADS
Antonio, i have simple xBrowse, from version Fivewin 8.04, i have at error very stupid, using ADS;( And yes, I put REQUEST ADS...etc...etc.. )FUNCTION Exclusiones() Local oDlg, oDbf, oBrw, oTdbf, oDbKSegOri USE TEST NEW SHARED DATABASE oDbKSegOri DEFINE DIALOG oDlg NAME "EXCLUIR" TITLE "Exclusion del kiosko" oBrw := TXBrowse():New( oDlg ) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrw:CreateFromResource( 101 ) oBrw:SetRDD() oBrw:aCols[ 1 ]:cHeader = "CODIGO" oBrw:aCols[ 2 ]:cHeader = "TIPO" oBrw:bClrStd := {|| { CLR_BLACK, ChoiseColor( oDbKSegOri:TIPO ) } } ACTIVATE DIALOG oDlg CENTER oTDbf:Close()RETURN NILSTATIC FUNCTION ChoiseColor( cTipo ) Local uColor := CLR_WHITE do case case cTipo = "A" uColor := CLR_HRED case cTipo = "H" uColor := CLR_HGREEN case cTipo = "O" uColor := CLR_YELLOW case cTipo = "S" uColor := CLR_HBLUE end caseRETURN uColorBut I found error if I move column , i have this error;Application=========== Path and name: C:\ULYWIN\HOTELS\hotels32.exe (32 bits) Size: 4,720,640 bytes Time from start: 0 hours 0 mins 7 secs Error occurred at: 07/07/08, 10:38:39 Error description: Error BASE/1004 Class: 'NIL' has no exported method: NLEN Args: [ 1] = U Stack Calls=========== Called from: => NLEN(0) Called from: xbrowse.prg => (b)TXBROWSE:SETRDD(2523) Called from: xbrowse.prg => TXBROWSE:REFRESH(696) Called from: xbrowse.prg => TXBRWCOLUMN:RESIZEEND(4317) Called from: xbrowse.prg => TXBROWSE:LBUTTONUP(2244)Well, I see exist this DATA nLen, but, i not find where is the problemn...
xBrowse with ADS
Rafa,It was fixed in FWH 8.05. Please add these extra parameters in method Refresh() call to Eval():nKeyNo = Eval( ::bKeyNo,,Self )Si usas un objeto database, entonces has de usar oXBrowse:SetoDbf( oDbf [, aFldNames] )
xBrowse with ADS
[quote="Antonio Linares":3j9phw8j]Rafa, It was fixed in FWH 8.05. Please add these extra parameters in method Refresh() call to Eval(): nKeyNo = Eval( ::bKeyNo,,Self ) Si usas un objeto database, entonces has de usar oXBrowse:SetoDbf( oDbf [, aFldNames] )[/quote:3j9phw8j]Thanks Antonio, but in this version Fivewin , i found another bug.Please, users Fivewin of version 8.04, replace method PageUp() if Eval( ::bkeyno ) < ::nRowSel Eval( ::bKeyNo, ::nRowSel ) endifby if Eval( ::bkeyno,,Self ) < ::nRowSel Eval( ::bKeyNo, ::nRowSel, Self ) endif
xBrowse with ADS
Rafa,Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Dear Antonio and friends!I liked very much this style of selected row on xBrowse!It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect! Why don't? Please, someone have a tip for me?The xBrowse with MARQSTYLE_HIGHLROWRC into SAMPLES of fivewin:[img:3et5medi]http&#58;//lh3&#46;ggpht&#46;com/ferreira&#46;together/SKbJfhniHsI/AAAAAAAAAJ8/3vYY60aCRYA/s400/xbr1&#46;JPG[/img:3et5medi]My xBrowse with MARQSTYLE_HIGHLROWRC:[img:3et5medi]http&#58;//lh4&#46;ggpht&#46;com/ferreira&#46;together/SKbJfpmbd0I/AAAAAAAAAKE/qGhz5-ZA63o/s400/xbr2&#46;JPG[/img:3et5medi]
xBrowse with MARQSTYLE_HIGHLROWRC?
Hello Júlio,in the moment, i'm busy with creatingsome more pages for the xbrowse-Tools ( styles, backgrounds....)The 2. page is prepared for style- and background-testing.In the future you can test all styles, brushes, bitmaps, fonts..with preview.Style-testing i have done in my old tools already.I still have to add the functions to the new Tools.The needed source is created together with the preview.Maybe i have the time this weekend, to include it.The Tool-release will be => 1c.[img:1cs6wxbr]http&#58;//www&#46;pflegeplus&#46;com/pictures/xbrtools14&#46;jpg[/img:1cs6wxbr]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Thanks Uwe, but I like to use this style into my application with Fivewin 8.06.
xBrowse with MARQSTYLE_HIGHLROWRC?
Hello,No problem, only Gradients for Header and Footer you cannotuse in FWH 8.06The Line-preview, you can use in FWH 8.06 as well.There is no change.The source you can copy and past from the field < background and styles >. You can mix all settings, until you think it is ok.I will finish this part. Background and Brushes comes later.Tomorrow the new Release < 1c > will be in the forum.The picture shows the setting for your hightlight cell.Setting for Cell-Highlight ( Browser-pos. 3 )oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL ----------------------------------------------------------Setting for Row-Highlight oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWRC -------------------------------------------------------------[img:2pi7lgv3]http&#58;//www&#46;pflegeplus&#46;com/pictures/xbrtools16&#46;jpg[/img:2pi7lgv3]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Mr JC> liked very much this style of selected row on xBrowse! It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect!>Answer to your question is in the testxbrw3.prg source itself.[code:2dt7hhf3] oBrw&#58;bClrRowFocus &#58;= &#123; || &#123; CLR_BLACK, RGB&#40;185,220,255&#41; &#125; &#125; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROWMS [/code:2dt7hhf3]I do not know if this was implemented in version 8.05. You may try the above code and try.You will learn more from studying the source code of testxbrw3.prg ( The way I learnt )
xBrowse with MARQSTYLE_HIGHLROWRC?
Dear Uwe,Your "visual" tools are great, bur instead of building a different one for different controls, why don't you try to build a generic "object inspector" for all of them ?I mean: one "object inspector" that will work with all sort of controls.Please have a look to this thread <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --><!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?t=12187">http://forums.fivetechsoft.com/viewtopic.php?t=12187</a><!-- m -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Dear Antonio,A few month ago, as i started with tools,there was a try, to create a tool for all controls.Many things came together like project-handling and more.I think, when the controls are tested in visual-design, the next step could be, putting everything together.I will keep it in mind.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Uwe,Here you have an early prototype so you can check it:test.prg[code:1hsyte4c] #include "FiveWin&#46;ch" #include "XBrowse&#46;ch" function Main&#40;&#41; local oWnd, oBrw, aData &#58;= &#123; &#123; PadR&#40; "One", 10 &#41;, PadR&#40; "Two", 10 &#41;, PadR&#40; "Three", 10 &#41; &#125;,; &#123; "Four", "Five", "Six" &#125; &#125; DEFINE WINDOW oWnd TITLE "XBrowse" @ 0, 0 XBROWSE oBrw ARRAY aData AUTOCOLS // FOOTERS oBrw&#58;aCols&#91; 1 &#93;&#58;cHeader = "Header1" oBrw&#58;aCols&#91; 2 &#93;&#58;cHeader = "Header2" oBrw&#58;aCols&#91; 3 &#93;&#58;cHeader = "Header3" // oBrw&#58;aCols&#91; 1 &#93;&#58;cFooter = "Header1" // oBrw&#58;aCols&#91; 2 &#93;&#58;cFooter = "Header2" // oBrw&#58;aCols&#91; 3 &#93;&#58;cFooter = "Header3" oWnd&#58;oClient = oBrw ACTIVATE WINDOW oWnd ; ON INIT Inspect&#40; oBrw &#41; return nil function Inspect&#40; oControl &#41; local oWnd, oBrw local aData &#58;= &#123; &#123; "Marquee", "SolidCell", EDIT_LISTBOX,; &#123; "NoMarquee", "DotedCell", "SolidCell", "HighLCell", "HightLRowRC", "HighLRow", "HighLRowMS" &#125;,; &#123; | oCol, uVal, nKey | If&#40; nKey != VK_ESCAPE, &#40; aData&#91; oBrw&#58;nArrayAt &#93;&#91; 2 &#93; &#58;= uVal, uVal &#58;= AScan&#40; oCol&#58;aEditListTxt, uVal &#41; - 1, oControl&#58;nMarqueeStyle &#58;= uVal, oControl&#58;Refresh&#40;&#41; &#41;,&#41; &#125; &#125;,; &#123; "Columns", "<objects>", EDIT_LISTBOX, GenColumnsList&#40; oControl &#41;,; &#123; | oCol, uVal, nKey | If&#40; nKey != VK_ESCAPE, SelColumn&#40; oBrw, oControl, uVal &#41;,&#41; &#125; &#125; &#125; DEFINE WINDOW oWnd TITLE "Object inspector" FROM 10, 10 TO 40, 48 oWnd&#58;ToolWindow&#40;&#41; @ 0, 0 XBROWSE oBrw ARRAY aData COLUMNS 1, 2 COLSIZES 100, 140 ; ON CHANGE SetEditType&#40; oBrw, aData &#41; oBrw&#58;nMarqueeStyle = MARQSTYLE_HIGHLROW // oBrw&#58;lFastEdit = &#46;T&#46; only compatible with MARQSTYLE_HIGHLCELL // oBrw&#58;nStretchCol = 2 // crashes with EDIT_LISTBOX and EDIT_BUTTON for now oBrw&#58;aCols&#91; 1 &#93;&#58;cHeader = "Property" oBrw&#58;aCols&#91; 2 &#93;&#58;cHeader = "Value" // oBrw&#58;lRecordSelector &#58;= &#46;F&#46; oBrw&#58;aCols&#91; 1 &#93;&#58;bLDClickData = &#123; || oBrw&#58;aCols&#91; 2 &#93;&#58;Edit&#40;&#41; &#125; oWnd&#58;oClient = oBrw oWnd&#58;bReSized = &#123; || oBrw&#58;aCols&#91; 2 &#93;&#58;nWidth &#58;= oWnd&#58;nWidth - oBrw&#58;aCols&#91; 1 &#93;&#58;nWidth - 63 &#125; oWnd&#58;Show&#40;&#41; return nil function SetEditType&#40; oBrw, aData &#41; local nEditType &#58;= aData&#91; oBrw&#58;nArrayAt &#93;&#91; 3 &#93; local oCol &#58;= oBrw&#58;aCols&#91; 2 &#93; oCol&#58;nEditType &#58;= nEditType do case case nEditType == EDIT_LISTBOX oCol&#58;aEditListTxt = aData&#91; oBrw&#58;nArrayAt &#93;&#91; 4 &#93; oCol&#58;aEditListBound = aData&#91; oBrw&#58;nArrayAt &#93;&#91; 4 &#93; // remove this if you want the index, not the string if ! Empty&#40; aData&#91; oBrw&#58;nArrayAt &#93;&#91; 5 &#93; &#41; oCol&#58;bOnPostEdit = aData&#91; oBrw&#58;nArrayAt &#93;&#91; 5 &#93; endif case nEditType == EDIT_BUTTON oCol&#58;bEditBlock = aData&#91; oBrw&#58;nArrayAt &#93;&#91; 4 &#93; // whatever is returned by the codeblock, it will be asigned endcase return nil function SelectColumn&#40; oBrw, oControl, aData &#41; aData &#58;= &#123; &#123; "Header", oControl&#58;aCols&#91; 1 &#93;&#58;cHeader, EDIT_GET &#125; &#125; oBrw&#58;aCols &#58;= nil oBrw&#58;SetArray&#40; aData &#41; oBrw&#58;aCols&#91; 2 &#93;&#58;bOnPostEdit = nil oBrw&#58;Refresh&#40;&#41; return oControl&#58;aCols&#91; 1 &#93;&#58;cHeader function GenColumnsList&#40; oBrw &#41; local aData &#58;= &#123;&#125;, n for n = 1 to Len&#40; oBrw&#58;aCols &#41; AAdd&#40; aData, "Column " + AllTrim&#40; Str&#40; n &#41; &#41; &#41; next return aData function SelColumn&#40; oBrwInsp, oBrw, uVal &#41; MsgInfo&#40; uVal &#41; return uVal [/code:1hsyte4c]Here you have the PRG and the EXE to run it:<!-- m --><a class="postlink" href="http://rapidshare.com/files/137873544/xbrwinsp.zip.html">http://rapidshare.com/files/137873544/xbrwinsp.zip.html</a><!-- m -->
xBrowse with MARQSTYLE_HIGHLROWRC?
[url=http&#58;//imageshack&#46;us:1r6x44gx][img:1r6x44gx]http&#58;//img168&#46;imageshack&#46;us/img168/6914/uwevd8&#46;png[/img:1r6x44gx][/url:1r6x44gx]
xBrowse with MARQSTYLE_HIGHLROWRC?
using a Class TProperty:test.prg[code:1up3hb9i] #include "FiveWin&#46;ch" #include "XBrowse&#46;ch" function Main&#40;&#41; local oWnd, oBrw, aData &#58;= &#123; &#123; PadR&#40; "One", 10 &#41;, PadR&#40; "Two", 10 &#41;, PadR&#40; "Three", 10 &#41; &#125;,; &#123; "Four", "Five", "Six" &#125; &#125; DEFINE WINDOW oWnd TITLE "XBrowse" @ 0, 0 XBROWSE oBrw ARRAY aData AUTOCOLS // FOOTERS oBrw&#58;aCols&#91; 1 &#93;&#58;cHeader = "Header1" oBrw&#58;aCols&#91; 2 &#93;&#58;cHeader = "Header2" oBrw&#58;aCols&#91; 3 &#93;&#58;cHeader = "Header3" // oBrw&#58;aCols&#91; 1 &#93;&#58;cFooter = "Header1" // oBrw&#58;aCols&#91; 2 &#93;&#58;cFooter = "Header2" // oBrw&#58;aCols&#91; 3 &#93;&#58;cFooter = "Header3" oWnd&#58;oClient = oBrw ACTIVATE WINDOW oWnd ; ON INIT InspectBrowse&#40; oBrw &#41; return nil function InspectBrowse&#40; oBrw &#41; local aProps &#58;= &#123;&#125;, oProp AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Marquee" oProp&#58;nEditType = EDIT_LISTBOX oProp&#58;bValues = &#123; || &#123; "NoMarquee", "DotedCell", "SolidCell", "HighLCell", "HightLRowRC", "HighLRow", "HighLRowMS" &#125; &#125; oProp&#58;bOnRead = &#123; | oProp | oProp&#58;GetLabel&#40; oBrw&#58;nMarqueeStyle + 1 &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | uValue &#58;= oProp&#58;GetIndex&#40; uValue &#41;, If&#40; nKey != VK_ESCAPE, &#40; oBrw&#58;nMarqueeStyle &#58;= uValue - 1, oBrw&#58;Refresh&#40;&#41; &#41;,&#41; &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Columns" oProp&#58;nEditType = EDIT_LISTBOX oProp&#58;bValues = &#123; || GenColumnsList&#40; oBrw &#41; &#125; oProp&#58;bOnRead = &#123; | oProp | "<array>" &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | MsgInfo&#40; uValue &#41; &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Top" oProp&#58;nEditType = EDIT_GET oProp&#58;bOnRead = &#123; | oProp | Str&#40; oBrw&#58;nTop &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | oProp&#58;nTop &#58;= uValue &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Left" oProp&#58;nEditType = EDIT_GET oProp&#58;bOnRead = &#123; | oProp | Str&#40; oBrw&#58;nLeft &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | oProp&#58;nLeft &#58;= uValue &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Width" oProp&#58;nEditType = EDIT_GET oProp&#58;bOnRead = &#123; | oProp | Str&#40; oBrw&#58;nWidth &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | oProp&#58;nWidth &#58;= uValue &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "Height" oProp&#58;nEditType = EDIT_GET oProp&#58;bOnRead = &#123; | oProp | Str&#40; oBrw&#58;nHeight &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | oProp&#58;nHeight &#58;= uValue &#125; AAdd&#40; aProps, oProp &#58;= TProperty&#40;&#41;&#58;New&#40;&#41; &#41; oProp&#58;oObject = oBrw oProp&#58;cName = "ArrayAt" oProp&#58;nEditType = EDIT_GET oProp&#58;bOnRead = &#123; | oProp | Str&#40; oBrw&#58;nArrayAt &#41; &#125; oProp&#58;bOnWrite = &#123; | oProp, oCol, uValue, nKey | oProp&#58;nArrayAt &#58;= uValue &#125; Inspect&#40; oBrw, aProps &#41; return nil function Inspect&#40; oControl, aProps &#41; local oWnd, oBrw, aData &#58;= &#123;&#125;, n for n = 1 to Len&#40; aProps &#41; AAdd&#40; aData, &#123; aProps&#91; n &#93;&#58;cName, "" &#125; &#41; next DEFINE WINDOW oWnd TITLE "Object inspector" FROM 10, 10 TO 40, 48 oWnd&#58;ToolWindow&#40;&#41; @ 0, 0 XBROWSE oBrw ARRAY aData COLUMNS 1, 2 COLSIZES 100, 140 ; ON CHANGE SetEditType&#40; oBrw, aProps &#41; oBrw&#58;aCols&#91; 2 &#93;&#58;bStrData = &#123; || Eval&#40; aProps&#91; oBrw&#58;nArrayAt &#93;&#58;bOnRead, aProps&#91; oBrw&#58;nArrayAt &#93; &#41; &#125; oBrw&#58;aCols&#91; 2 &#93;&#58;nEditType = aProps&#91; oBrw&#58;nArrayAt &#93;&#58;nEditType oBrw&#58;nMarqueeStyle = MARQSTYLE_HIGHLROW // oBrw&#58;lFastEdit = &#46;T&#46; only compatible with MARQSTYLE_HIGHLCELL // oBrw&#58;nStretchCol = 2 // crashes with EDIT_LISTBOX and EDIT_BUTTON for now oBrw&#58;aCols&#91; 1 &#93;&#58;cHeader = "Property" oBrw&#58;aCols&#91; 2 &#93;&#58;cHeader = "Value" // oBrw&#58;lRecordSelector &#58;= &#46;F&#46; oBrw&#58;aCols&#91; 1 &#93;&#58;bLDClickData = &#123; || oBrw&#58;aCols&#91; 2 &#93;&#58;Edit&#40;&#41; &#125; oControl&#58;bResized = &#123; || oBrw&#58;Refresh&#40;&#41; &#125; oControl&#58;bChange = &#123; || oBrw&#58;Refresh&#40;&#41; &#125; oWnd&#58;oClient = oBrw oWnd&#58;bReSized = &#123; || oBrw&#58;aCols&#91; 2 &#93;&#58;nWidth &#58;= oWnd&#58;nWidth - oBrw&#58;aCols&#91; 1 &#93;&#58;nWidth - 63 &#125; oWnd&#58;Show&#40;&#41; return nil function SetEditType&#40; oBrw, aProps &#41; local oProp &#58;= aProps&#91; oBrw&#58;nArrayAt &#93; local nEditType &#58;= oProp&#58;nEditType local oCol &#58;= oBrw&#58;aCols&#91; 2 &#93; oCol&#58;nEditType&#40; nEditType &#41; do case case nEditType == EDIT_GET case nEditType == EDIT_LISTBOX oCol&#58;aEditListTxt = Eval&#40; oProp&#58;bValues &#41; oCol&#58;aEditListBound = Eval&#40; oProp&#58;bValues &#41; // remove this if you want the index, not the string oCol&#58;bOnPostEdit = &#123; | oCol, uValue, nKey | Eval&#40; oProp&#58;bOnWrite, oProp, oCol, uValue, nKey &#41; &#125; case nEditType == EDIT_BUTTON oCol&#58;bEditBlock = oProp&#58;bOnWrite // whatever is returned by the codeblock, it will be asigned endcase return nil function SelectColumn&#40; oBrw, oControl, aData &#41; aData &#58;= &#123; &#123; "Header", oControl&#58;aCols&#91; 1 &#93;&#58;cHeader, EDIT_GET &#125; &#125; oBrw&#58;aCols &#58;= nil oBrw&#58;SetArray&#40; aData &#41; oBrw&#58;aCols&#91; 2 &#93;&#58;bOnPostEdit = nil oBrw&#58;Refresh&#40;&#41; return oControl&#58;aCols&#91; 1 &#93;&#58;cHeader function GenColumnsList&#40; oBrw &#41; local aData &#58;= &#123;&#125;, n for n = 1 to Len&#40; oBrw&#58;aCols &#41; AAdd&#40; aData, "Column " + AllTrim&#40; Str&#40; n &#41; &#41; &#41; next return aData function SelColumn&#40; oBrwInsp, oBrw, uVal &#41; MsgInfo&#40; uVal &#41; return uVal CLASS TProperty DATA oObject DATA cName DATA bValues DATA nEditType DATA bOnRead DATA bOnWrite METHOD New&#40;&#41; INLINE Self METHOD GetLabel&#40; nIndex &#41; INLINE Eval&#40; &#58;&#58;bValues &#41;&#91; nIndex &#93; METHOD GetIndex&#40; uValue &#41; INLINE AScan&#40; Eval&#40; &#58;&#58;bValues &#41;, uValue &#41; ENDCLASS [/code:1up3hb9i]source code and EXE:<!-- m --><a class="postlink" href="http://rapidshare.com/files/137914299/inspector.zip.html">http://rapidshare.com/files/137914299/i ... r.zip.html</a><!-- m -->[url=http&#58;//imageshack&#46;us:1up3hb9i][img:1up3hb9i]http&#58;//img507&#46;imageshack&#46;us/img507/8763/inspectorvu8&#46;png[/img:1up3hb9i][/url:1up3hb9i]
xBrowse with MARQSTYLE_HIGHLROWRC?
Dear Antonio,to do it this way, seems to be a better solution.The difference is, propertys itself are selected sometimes from previews as well.( not as a text-selection from a listbox )A sample ( only NO LINES is a property )NO LINES comes from STYLE but belongs to a new GRID-selection :[img:22uuw7d9]http&#58;//www&#46;pflegeplus&#46;com/pictures/xbrtools25&#46;jpg[/img:22uuw7d9]I don't know, if it is possible to ínclude this in a object-inspector for the moment ( but everything can be done better ).Best regardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse with MARQSTYLE_HIGHLROWRC?
[quote="nageswaragunupudi":2z9kq3ui]Mr JC > liked very much this style of selected row on xBrowse! It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect! > Answer to your question is in the testxbrw3.prg source itself. [code:2z9kq3ui] oBrw&#58;bClrRowFocus &#58;= &#123; || &#123; CLR_BLACK, RGB&#40;185,220,255&#41; &#125; &#125; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROWMS [/code:2z9kq3ui] I do not know if this was implemented in version 8.05. You may try the above code and try. You will learn more from studying the source code of testxbrw3.prg ( The way I learnt )[/quote:2z9kq3ui]Dear Nages, your tip works very fine! Thank you very much! Now, it's ok!
xBrowse with MARQSTYLE_HIGHLROWRC?
Uwe,See how easy we can add new properties to inspect with the object inspector:[url=http&#58;//imageshack&#46;us:150ep3dg][img:150ep3dg]http&#58;//img201&#46;imageshack&#46;us/img201/530/inspectormd4&#46;png[/img:150ep3dg][/url:150ep3dg][/code]In just some minutes we can add all the properties that we want to inspect.
xBrowse with MARQSTYLE_HIGHLROWRC?
Source code and EXE:<!-- m --><a class="postlink" href="http://rapidshare.com/files/138212030/inspector.zip.html">http://rapidshare.com/files/138212030/i ... r.zip.html</a><!-- m -->
xBrowse with MARQSTYLE_HIGHLROWRC?
Antonio,every time, i connect to RAPIDSHARE, it doesn't work.My internet-connection is very fast. ( Hightspeed )This programm tells me, if i am a AOL-customer to use a different browser.This program tells me, my connection is to slow.[img:36axxftp]http&#58;//www&#46;pflegeplus&#46;com/pictures/rapidshare&#46;jpg[/img:36axxftp]Maybe the problem occurs, because i'm using AOL.!!! I got it with a E-mail from James !!! it is OK ------------------------------------------------------------------------------------------------------------------------------------------------------------------------RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse with MariaDB
Hi, How the best away to create a xbrowse with some MariaDb File/Fields? Thanks in advance
xBrowse with MariaDB
Exactly the same way as we create xbrowse for DBF, TDatabase, ADO, Array, etc. Syntax of XBrowse is identical for all. [code=fw:33oo8i92]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"select first,last,city from customer"</span> <span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> w,h <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp;DATASOURCE oRs ;<br />&nbsp; &nbsp;COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span> ;<br />&nbsp; &nbsp;CELL LINES NOBORDER<br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:33oo8i92]
xBrowse with MariaDB
[quote="nageswaragunupudi":p8gn1o69]Exactly the same way as we create xbrowse for DBF, TDatabase, ADO, Array, etc. Syntax of XBrowse is identical for all. [code=fw:p8gn1o69]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"select first,last,city from customer"</span> <span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> w,h <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />   DATASOURCE oRs ;<br />   COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span> ;<br />   CELL LINES NOBORDER<br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:p8gn1o69][/quote:p8gn1o69] Thank you Nages, I will display a browse and some buttons linke insert, delete and edit. I use tdabase with dbfs to display the fields e save or changes datas, in this case how the best away with fivewin mariadb functions? Thank you again!
xBrowse with MariaDB
Please see: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36903">viewtopic.php?f=3&t=36903</a><!-- l --> We strongly recommend this approach for browsing and editing records for any database including MariaDB. Please use the template. Please feel free to ask any doubts or questions.
xBrowse with Merge RESOURCE
Mr. Linares, the merge using xBrowse "RESOURCE" does not work. ex: oBrw:City:lMergeVert := .t. return error method City...
xBrowse with Merge RESOURCE
This has nothing to do with Resource. If there is a column with header 'city', this works. Example code: [code=fw:1gicu7wr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw<br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'CUST'</span> SHARED VIA <span style="color: #ff0000;">'DBFCDX'</span><br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG CITY<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">'TEST'</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">'City'</span>, <span style="color: #ff0000;">'First'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'CUST'</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">City</span>:<span style="color: #000000;">lMergeVert</span> := .t.<br /><br />&nbsp; &nbsp;<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 />&nbsp;</div>[/code:1gicu7wr] Resource: [code=fw:1gicu7wr]<div class="fw" id="{CB}" style="font-family: monospace;">TEST <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">306</span>, <span style="color: #000000;">227</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"TXBrowse demo"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;DEFPUSHBUTTON <span style="color: #ff0000;">"OK"</span>, IDOK, <span style="color: #000000;">252</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">14</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TXBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">4</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">297</span>, <span style="color: #000000;">202</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1gicu7wr] Screenshot: [url=http&#58;//img688&#46;imageshack&#46;us/my&#46;php?image=xbrmerge&#46;jpg:1gicu7wr][img:1gicu7wr]http&#58;//img688&#46;imageshack&#46;us/img688/9494/xbrmerge&#46;jpg[/img:1gicu7wr][/url:1gicu7wr]
xBrowse with Merge RESOURCE
Dear Mr. RAO, Is there any limitation or rules to follow when using oBrw:field:lMergeVert := .T. ..? oBrw:field must be index/the controlling index? obrw:field must be the first column? I tried to use it and here's some pieces of code: [code=fw:sf1pfw52]<div class="fw" id="{CB}" style="font-family: monospace;">...<br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oSupplier <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1301</span> <span style="color: #0000ff;">OF</span> oFldRE:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">UPDATE</span>;<br />         <span style="color: #0000ff;">AUTOCOLS</span> LINES CELL FASTEDIT;<br />         <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'supplier'</span>;<br />         HEADERS <span style="color: #ff0000;">'_ID'</span>, <span style="color: #ff0000;">'Supplier'</span>, <span style="color: #ff0000;">'Address'</span>, <span style="color: #ff0000;">'City'</span>, <span style="color: #ff0000;">'Country'</span>, <span style="color: #ff0000;">'Last Update'</span>, <span style="color: #ff0000;">'Uploaded'</span>, <span style="color: #ff0000;">'Status'</span>;<br />         COLUMNS <span style="color: #ff0000;">'supplier_id'</span>, <span style="color: #ff0000;">'supplier'</span>, <span style="color: #ff0000;">'address'</span>, <span style="color: #ff0000;">'city'</span>, <span style="color: #ff0000;">'country'</span>, <span style="color: #ff0000;">'lastupdate'</span>,<span style="color: #ff0000;">'luploaded'</span>, <span style="color: #ff0000;">'ldeletion'</span><br />         COLSIZES <span style="color: #000000;">70</span>, <span style="color: #000000;">350</span>, <span style="color: #000000;">245</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">80</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">70</span>;<br />         <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">CLICK</span> uSupplierMenu<span style="color: #000000;">&#40;</span> nRow, nCol, oSupplier <span style="color: #000000;">&#41;</span><br />...<br /><br /><br /><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Arrange by CITY"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">CITY</span>:<span style="color: #000000;">lMergeVert</span> := .T. , oBrw:<span style="color: #0000ff;">Adjust</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//I tried oBrw:FullPaint() and oBrw:Refresh(.T.)</span><br /><br /><br />...<br /> </div>[/code:sf1pfw52] got this message after selecting the "arrange by CITY" menu [img:sf1pfw52]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/xbrowse_lmergevert&#46;png[/img:sf1pfw52] Regards, Frances
xBrowse with Merge RESOURCE
oBrw:field must be index/the controlling index? ... YES obrw:field must be the first column? ... NOT NECESSARY While creating the Browse, it is enough to say oCol:lMergeVert := .t. If you want to do it at runtime, oCol:lMergeVert := .t. oBrw:lMergeVert := .t. oCol:WorkMergeData() // call this method also oBrw:Refresh()
xBrowse with Merge RESOURCE
Dear Mr. RAO, Now I can arrange with lmergevert on runtime. Thanks so much! Regards, Frances
xBrowse with Merge RESOURCE
I will do another test! as it was in a hurry, I saw code thanks Ronaldo
xBrowse with SQLRDD
Hi to all, Anyone can put a sample with xBrowse with SQLRDD. If it's posible, define only two fields of file with many fields. Thank you. Pere Cordonet
xBrowse with SQLRDD
>> If it's posible, define only two fields of file with many fields. >> Yes. @ .. XBROWSE ...... COLUMNS "field1name", "field2name" ; <other clauses> I have not used SQLRDD. But I have gone through the manual quickly. It appears SQLRDD does not support OrdKeyCount() and OrdKeyNo(). I am not sure if I am right. There could be some issues with SQLRDD.
xBrowse with SQLRDD
I use xBrowse with SQLRDD and can confirm that it works - there are issues with OrdKeyCount() & OrdKeyNo() as nageswaragunupudi says - the only area i have found to be a problem is the "hot key" seeking in a browse. Regards, Pete
xBrowse with SQLRDD
Thank you, for your answer. I'll try substitute these functions ! Pere Cordonet
xBrowse with SQLRDD
[quote="PeterHarmes":3obypo14]I use xBrowse with SQLRDD and can confirm that it works - there are issues with OrdKeyCount() & OrdKeyNo() as nageswaragunupudi says - the only area i have found to be a problem is the "hot key" seeking in a browse. Regards, Pete[/quote:3obypo14] If this is the case, I would suggest that after creating xbrowse, we need to override these codeblocks: oBrw:bKeyNo := { |n| If( n == nil, (oBrw:cAlias)->( RecNo() ), (oBrw:cAlias)->(DbGoTo(n)) } oBrw:bKeyCount := { || (oBrw:cAlias)->( LastRec() ) } Better to retain the other default codeblocks as created by xbrowse without disturbing them. I presume RecNo(), DbGoTo(n) and LastRec() are supported. If they have other names, they can be substituted. Still there could be occasional issues because in SQLRDD, the recno can be higher than the recordcount. May I know how DbSeek() works or how we can simulate that behavior? ( Xbrowse implements incremental seek for ADO recordsets using ADO Find method)
xBrowse with SQLRDD
Recno() & Dbgoto exist and work in the normal way - i'm not too sure about Lastrec() as i don't use it - i will do some tests tomorrow to see if this works. Dbseek() also works in the same way (although the softseek parameter seems a bit buggy)
xBrowse with SQLRDD
I need some time for implement this source. When i have a result, i'll comment this. Thank you. Pere Cordoent <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse with SQLRDD
Tests on Lastrec Opened orders table - has 7621 rows Lastrec() returns 7628 which is the largest value in the column sr_recno (where the record number/row number) is stored. In the xHarbour Reference - Lastrec() should return the number of records, so I would say this function does not work properly under SQLRDD Pete
xBrowse with SQLRDD
Mr. Peter Harmes, I understand. For xbrowse to properly work, 1) oBrw:bKeyCount should be a codeblock which should return the total number of rows. So what function do you advise for this codeblock? 2) oBrw:bKeyNo := { |n| If( n == nil, < serial number of the row >, < goto the n'th row from top> ) } For bKeyNo codeblock, what functions do you advise?
xBrowse with SQLRDD
[quote:2kwo4vuf]Opened orders table - has 7621 rows Lastrec() returns 7628 which is the largest value in the column sr_recno (where the record number/row number) is stored. [/quote:2kwo4vuf] What I understood from what little i read the documentation is this. SR_RecNo is maintained like an autoincrement number. When no records are deleted, and no filters or scopes are set ( using where clause or otherwise ) Max( SR_RecNo) -->LastRec() correctly represents the total rows. But when some records are deleted, number of rows is less than LastRec,i.e. Max(SR_RecNo). And most of the times we read and browse only a subset of the total table using some kind of scope or filter or where clause. In such cases we need to have reliable way to know (i) number of rows, (ii) serial number of the row and (iii) to go to a row with a given serial number in the subset being browsed.
xBrowse with SQLRDD
A very slow elementary functions could be: [code=fw:u56ao7g4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> SR_OrdkeyCount<span style="color: #000000;">&#40;</span>xOrder<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nItem:= <span style="color: #000000;">0</span>, nRecno:= Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nOO:= OrdNumber<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />OrdSetFocus<span style="color: #000000;">&#40;</span> xOrder <span style="color: #000000;">&#41;</span><br /><br />DbGotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />DbEval<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>|| nItem++ <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />OrdSetFocus<span style="color: #000000;">&#40;</span>nOO<span style="color: #000000;">&#41;</span><br />DbGoto<span style="color: #000000;">&#40;</span>nRecno<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> nItem<br /> </div>[/code:u56ao7g4] [code=fw:u56ao7g4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> SR_OrdkeyNo<span style="color: #000000;">&#40;</span>xOrder<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nItem:= <span style="color: #000000;">0</span>, nRecno:= Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,nKey:= <span style="color: #000000;">0</span><br /><span style="color: #00C800;">Local</span> nOO:= OrdNumber<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />OrdSetFocus<span style="color: #000000;">&#40;</span> xOrder <span style="color: #000000;">&#41;</span><br /><br />DbGotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />DbEval<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>|| nItem++,Iif<span style="color: #000000;">&#40;</span>Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == nRecno, nKey:= nItem,<span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,,<span style="color: #000000;">&#123;</span>|| Empty<span style="color: #000000;">&#40;</span>nKey<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />Iif<span style="color: #000000;">&#40;</span>Empty<span style="color: #000000;">&#40;</span>nKey<span style="color: #000000;">&#41;</span>,nKey:= nItem,<span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span><br />OrdSetFocus<span style="color: #000000;">&#40;</span>nOO<span style="color: #000000;">&#41;</span><br />DbGoto<span style="color: #000000;">&#40;</span>nRecno<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> nKey<br /> </div>[/code:u56ao7g4] Require that if the procedure would be correct. Thank you. Pere Cordonet
xBrowse with SQLRDD
You can download this sample: <!-- m --><a class="postlink" href="http://www.despachoarteaga.com.mx/VisorSQL.zip">http://www.despachoarteaga.com.mx/VisorSQL.zip</a><!-- m -->
xBrowse with SQLRDD
Mr. Peter Harmes If you are using xBrowse with SQLRDD successfully, can you please tell us how are you building codeblocks for oBrw:bKeyNo and oBrw:bKeyCount ? From what I understand from the above postings, I think the codeblocks I posted earlier should give reasonable results for browsing full tables and where there are no or few deleted records. In other cases, I think of an alternative approach, which takes some setup time but xBrowse will work correctly. [code=fw:1niqgm3v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Initially</span><br />   aRows := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbEval<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span>|| AAdd<span style="color: #000000;">&#40;</span> aRows, RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// normal xbrowse code   </span><br />   @ <r>, <c> <span style="color: #0000ff;">XBROWSE</span> oBrw COLUMNS .....<other clauses> ..;<br />        <span style="color: #0000ff;">ALIAS</span> cAlias ROWS aRows &nbsp;<span style="color: #B900B9;">// Please note the clause ROWS aRows</span><br /> </div>[/code:1niqgm3v]
xBrowse with SQLRDD
I have finally changed bKeyCount and bKeyno codeblock It works quite well (with a table with 200 entries) [code=fw:2wwv7zs4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <r>, <c> <span style="color: #0000ff;">XBROWSE</span> oBrw<br />oBrw:<span style="color: #000000;">SetRDD</span> <span style="color: #000000;">&#40;</span>. f.. f.<span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">bKeyNo</span>      := <span style="color: #000000;">&#123;</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> SR_OrdkeyNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>       <span style="color: #000000;">&#125;</span><br />oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</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> SR_OrdkeyCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>   <span style="color: #000000;">&#125;</span>                              <br /> </div>[/code:2wwv7zs4] Thanks for all information to finally works fine, not is the best solution for a long tables, but this function will be much better if xharbour will be written in sqlrdd lib. Thanks to all Pere Cordonet Note: Sorry for my english, it's very poor.
xBrowse with SQLRDD
I dont build a code block for bKeyno, but for bKeycount (where i use it) - i do a SQL count for the number of records that meet the criteria and apply this to a variable and to bKeycount. By the looks of things on the data we have used, the standard xBrowse functionality works fine!!
xBrowse with SQLRDD
If you run a query directly, there are no filters, deleteds, partial tables, ... So I created these features: [url:h552pdag]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=18670#p97839[/url:h552pdag] My problem was that when clicked on a record always moved to the first line of xbrowse.
xBrowse with TArray
Hi all,Has anybody here tried xBrowse and Array using TArray Class. (xBrowse and TArray object)TArray is a very useful class which allows us to manage arrays with features like a DBF. For Eg. GoTop(), Skip(), Eof(), Bof(), Zap(), Append() etc. and refer array elements with field name instead of the conventional array subscriptAny samples available ?RegardsAnser
xBrowse with Tree
Hello friends, Could someone help me in the following problem: 1) create an object with the parameters that I need at the moment; 2) with the object, I create xbrowse with tree; 3) then wanted to take advantage of the xbrowse after a change in the parameters of the query. I've already tried oBrowse: Refresh () and it does not resolve. What can I do? Thanks in advance for your help. Att., Oliveiros Junior
xBrowse with Tree
Create a new object with the revised parameters. Create a new tree from the new object. Then, oBrw:oTree := oNewTree oBrw:GoTop() oBrw:Refresh()
xBrowse with Tree
Mr. Rao, Thanks, it worked. Att. Oliveiros Junior
xBrowse with WaterMark
Hi, Is it possible to put a picture background of xbrowse like watermark? Thanks,
xBrowse with WaterMark
Horizon, Use the same background-color for the image like for the browser With the image-size ( free space around the watermark ) You can adjust the space between the watermarks inside the browser. [color=#0000FF:39kectll][b:39kectll]DEFINE BRUSH oBrush FILENAME "Logo.bmp" oBrw:SetBackGround( oBrush ) oBrush:End() oBrw:Refresh()[/b:39kectll][/color:39kectll] [img:39kectll]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Logo&#46;bmp[/img:39kectll] [img:39kectll]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Watermark&#46;jpg[/img:39kectll] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse with WaterMark
Thank you very much Uwe. It works. But I have a problems with brush. [code=fw:3a34rfjg]<div class="fw" id="{CB}" style="font-family: monospace;">    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">6</span>  <span style="color: #B900B9;">// For MultiSelect</span><br />    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lRecordSelector</span> := .f.<br />    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lHScroll</span>        := .F.<br />    <br />    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bClrSelFocus</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">16777215</span>, <span style="color: #000000;">15512898</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <br />    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bClrSel</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">16777215</span>, <span style="color: #000000;">15512898</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>  <br />    ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lKinetic</span> := .F.</div>[/code:3a34rfjg] 1. The up/down navigation is slower than before brush in xbrowse. Is it normal? 2. The shape of selection bar is different like below. (Upper brw is without brush, Lower is with.) [url:3a34rfjg]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/wmark1&#46;jpeg[/url:3a34rfjg]
xBrowse with WaterMark
[quote:3gl2qp2d] 1. The up/down navigation is slower than before brush in xbrowse. Is it normal? [/quote:3gl2qp2d] Yes. Not only up/down but left/right navigation also. Using brushes is suitable for small browses with fast datasources like arrays, recordsets, etc and small local dbfs Programmer needs to decide the suitability when to use brushes. [quote:3gl2qp2d] 2. The shape of selection bar is different like below. (Upper brw is without brush, Lower is with.) [/quote:3gl2qp2d] We will look into this. Looks normal when only a cell is highligted.
xBrowse with WaterMark
[quote:ethrr25e] 2. The shape of selection bar is different like below. (Upper brw is without brush, Lower is with.) [/quote:ethrr25e] This is fixed in FWH 17.12. Thanks for pointing out the issue.
xBrowse with WaterMark
[quote="nageswaragunupudi":29bk89do][quote:29bk89do] 2. The shape of selection bar is different like below. (Upper brw is without brush, Lower is with.) [/quote:29bk89do] This is fixed in FWH 17.12. Thanks for pointing out the issue.[/quote:29bk89do] Thanks again.
xBrowse with WaterMark
Hi Mr. Rao, Can you share the solution here if it is simple? Thanks.
xBrowse with WaterMark
xbrowse.prg ( 17.11 ) line 12428 in method PaintCellBack(....) replace line 12428 [code=fw:1h8hbo97]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lTransparent</span> <br />&nbsp;</div>[/code:1h8hbo97] with [code=fw:1h8hbo97]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lTransparent</span> .and. ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nMarqueeStyle</span> < MARQSTYLE_HIGHLROWRC<br />&nbsp;</div>[/code:1h8hbo97]
xBrowse with a tree with ADO
To All I have a folder with xbrowse that I want to be able to have a master table tree'd to a related table. I have searched the forum and found a screen shot from Renaldo demonstrating its possibility. The master\related tables look like this +Advertising table -- publication1 -- publication2 If anyone can share some code or point me to a sample I would be very grateful. The xBrowse will be using the above tables via ADO. Rick Lipkin [url=http&#58;//imageshack&#46;us/photo/my-images/5/p026&#46;png/:2a5usi3a][img:2a5usi3a]http&#58;//img5&#46;imageshack&#46;us/img5/8213/p026&#46;png[/img:2a5usi3a][/url:2a5usi3a]
xBrowse with array
Hi, I've just recompiled my app with latest xHarbour (commercial) and FW (10.05) and have noticed that the horizontal & vertical scroll bar has disappeared in a xbrowse that browses an array rather than a DBF/SQL Table. I think i can just make out the vertical scroll bar just off of the edge of the browse. If i query the lHScroll & lVScroll they both return .T. I'm using a resource file to display the dialog with the xBrowse I use the AUTOCOLS & AUTOSORT parameter. This was working fine in (09.05) Any ideas? Regards Pete
xBrowse with array
Update After doing more tests, it seems to do this on some DBF browses as well - i havent found the common thing between the browses yet!! I have downgraded my Fivewin a few times: 10.02 does not work, 09.11 works
xBrowse with array
I think i've narrowed it down. I think the calculation of the size of the browse when building from a resource is being calculated incorrectly. If i manually resize the browse & it's relating dialog based on each of the column widths the scroll bars appear fine. Pete
xBrowse with array
Just checked all other versions of FW and the changes made in FW 10.02 have caused this problem - 10.01 works fine. Can anyone help?
xBrowse with array
Anyone got any ideas? regards, Pete
xBrowse with array
Pete, Are you using resources to create the dialogs where the xbrowses are shown ? If yes, have you specified "TXBROWSE" as the type of control in your resources ? A common mistake is to specify "LISTBOX" instead of "TXBROWSE" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse with array
yes we do use resources to create the dialogs and yes they are specified as txbrowse. An example of how it appears in my resource is below: CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 9, 25, 380, 144 Regards, Pete
xBrowse with array
Any ideas? Regards, Pete
xBrowse with array
Pete, You have to scpecify WS_HSCROLL and WS_VSCROLL styles also in your resource entry: CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | WS_HSCROLL | WS_VSCROLL, 9, 25, 380, 144
xBrowse with array
Thanks Antonio - works great now!! best regards, Pete
xBrowse with array
very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->