topic
stringlengths
1
63
text
stringlengths
1
577k
xbrowse and Tree
Mr. Rao; I'd hate to occupy the airwaves with my queries. Please write to me at: reinaldo dot crespo at gmail . com. Thank you. Reinaldo
xbrowse and Ufc
Is it possible to associate a user function to the xbrowse like in the old clipper when we used the dbedit function that had the possibility to load a personal function?
xbrowse and Ufc
Hi, I think you can use this: [code=fw:vsr1dc4z]<div class="fw" id="{CB}" style="font-family: monospace;">oXbr:<span style="color: #000000;">EditBaseRecord</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span>,.T.,<span style="color: #000000;">&#123;</span>|oRec| Cpr211a<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"I"</span>,oRec<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,oXbrw<span style="color: #000000;">&#41;</span></div>[/code:vsr1dc4z]
xbrowse and arrays
Hi All I am trying to use one browse to display different arrays - which have different headers ,column sizes etc here is how I am setting up the browse [code=fw:30394bou]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp;oLbx := 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>oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLCELL<br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lColDividerComplete</span> := <span style="color: #00C800;">TRUE</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lFastEdit</span> := <span style="color: #00C800;">TRUE</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nDatalines</span> := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nRowHeight</span> &nbsp;:= <span style="color: #000000;">24</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lHScroll</span> := <span style="color: #00C800;">FALSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bClrStd</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span>CBRWTEXT,CBRWBACK<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bClrSel</span>:= &nbsp; <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span>CBRWTEXT,CBRWBACK<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lFooter</span> := <span style="color: #00C800;">TRUE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp;:= aTitle<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; := aSizes<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> := aPicture<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span>Brw<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// This function tries resetting the browse</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> lfSetArrays<span style="color: #000000;">&#40;</span>nSelect,aTitle,aSizes,aPicture,oLbx<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> i := <span style="color: #000000;">0</span>,j := <span style="color: #000000;">0</span><br />asize<span style="color: #000000;">&#40;</span>aTitle,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />asize<span style="color: #000000;">&#40;</span>aSizes,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />asize<span style="color: #000000;">&#40;</span>aPicture,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />asize<span style="color: #000000;">&#40;</span>oLbx:<span style="color: #000000;">aCols</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">if</span> nSelect == <span style="color: #000000;">1</span> .or. nSelect == <span style="color: #000000;">2</span> .or. nSelect == <span style="color: #000000;">3</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aTitle,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Job No.'</span>,<span style="color: #ff0000;">'Job Date'</span>,<span style="color: #ff0000;">'Description'</span>,<span style="color: #ff0000;">'Comp. Date'</span>,<span style="color: #ff0000;">'Contact'</span>,<span style="color: #ff0000;">'Order No.'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aSizes,<span style="color: #000000;">&#123;</span> &nbsp;<span style="color: #000000;">55</span> &nbsp; &nbsp; , &nbsp; <span style="color: #000000;">70</span> &nbsp; &nbsp; , &nbsp; &nbsp;<span style="color: #000000;">500</span> &nbsp; &nbsp; &nbsp;, &nbsp; <span style="color: #000000;">70</span> &nbsp; &nbsp; &nbsp; , &nbsp;<span style="color: #000000;">110</span> &nbsp; &nbsp;, &nbsp;<span style="color: #000000;">100</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aPicture,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'@!'</span> &nbsp; ,<span style="color: #ff0000;">'99/99/9999'</span>,<span style="color: #ff0000;">'@'</span>,<span style="color: #ff0000;">'99/99/9999'</span>,<span style="color: #ff0000;">'@'</span>,<span style="color: #ff0000;">'@!'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//aadd(aData,{" ",dtoc(date())," ",dtoc(date())," "," "})</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">if</span> nSelect == <span style="color: #000000;">4</span><br />&nbsp; &nbsp;asize<span style="color: #000000;">&#40;</span>oLbx:<span style="color: #000000;">aCols</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aTitle,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Invoice'</span>,<span style="color: #ff0000;">'Date'</span>,<span style="color: #ff0000;">'Sub Total'</span>,<span style="color: #ff0000;">'GST'</span>,<span style="color: #ff0000;">'Total'</span>,<span style="color: #ff0000;">'Paid'</span>,<span style="color: #ff0000;">'Balance'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aSizes,<span style="color: #000000;">&#123;</span> &nbsp;<span style="color: #000000;">70</span> &nbsp; &nbsp; , &nbsp; <span style="color: #000000;">70</span> , &nbsp; &nbsp;<span style="color: #000000;">100</span> &nbsp; &nbsp;, <span style="color: #000000;">100</span> , &nbsp;<span style="color: #000000;">100</span> &nbsp;, &nbsp;<span style="color: #000000;">100</span> , <span style="color: #000000;">100</span> &nbsp;<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>aPicture,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'@!'</span> &nbsp; ,<span style="color: #ff0000;">'99/99/9999'</span>,<span style="color: #ff0000;">'9999999.99'</span>,<span style="color: #ff0000;">'9999999.99'</span>,<span style="color: #ff0000;">'9999999.99'</span>,<span style="color: #ff0000;">'9999999.99'</span>,<span style="color: #ff0000;">'9999999.99'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp;:= aTitle<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; := aSizes<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> := aPicture<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><span style="color: #00C800;">next</span><br /><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 /><br />&nbsp;</div>[/code:30394bou] There is an error on this oLbx:aCols[j]:cHeader := aTitle[i,j] Error BASE/1005 Class: 'NIL' has no property: CHEADER Can anyone tell me how to achieve mutliple array's being displayed using the one browse. Thanks Colin
xbrowse and arrays
[code=fw:3sjdkj4c]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oLbx := 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>oDlg<span style="color: #000000;">&#41;</span><br />       oLbx:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLCELL<br />       oLbx:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br />       oLbx:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_BLACK<br />       oLbx:<span style="color: #000000;">lColDividerComplete</span> := <span style="color: #00C800;">TRUE</span><br />       oLbx:<span style="color: #000000;">lFastEdit</span> := <span style="color: #00C800;">TRUE</span><br />       oLbx:<span style="color: #000000;">nDatalines</span> := <span style="color: #000000;">1</span><br />       oLbx:<span style="color: #000000;">nRowHeight</span>  := <span style="color: #000000;">24</span><br />       oLbx:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span><br />       oLbx:<span style="color: #000000;">lHScroll</span> := <span style="color: #00C800;">FALSE</span><br />       oLbx:<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br />       oLbx:<span style="color: #000000;">bClrStd</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span>CBRWTEXT,CBRWBACK<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />       oLbx:<span style="color: #000000;">bClrSel</span>:=   <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span>CBRWTEXT,CBRWBACK<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />       oLbx:<span style="color: #000000;">lFooter</span> := <span style="color: #00C800;">TRUE</span><br /><br />       <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#41;</span><br />          <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTitle<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />             oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span> oLbx, aTitle<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span>, aSizes<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span>, aPicture<span style="color: #000000;">&#91;</span>i,j<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>             <br />          <span style="color: #00C800;">next</span><br />       <span style="color: #00C800;">next</span><br /><br />       oLbx:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span>Brw<span style="color: #000000;">&#41;</span><br />       <br /><span style="color: #B900B9;">//--------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> ADDCol<span style="color: #000000;">&#40;</span> oLbx, cTitle, nSize, cPict <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">Local</span> oCol<br /> <br /> oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> oCol:<span style="color: #000000;">cHeader</span>   &nbsp;    := cTitle<br /> oCol:<span style="color: #000000;">nWidth</span>       &nbsp; &nbsp;:= nSize<br /> oCol:<span style="color: #000000;">cEditPicture</span> &nbsp;:= cPict<br /> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//-------------------------------------------------</span><br /> </div>[/code:3sjdkj4c] Ricardo.
xbrowse and arrays
ricardo I need your vrmm last release on seven I not see the buttonbar please help me please have you old versions
xbrowse and arrays
[quote:m1pip141]I need your vrmm last release [/quote:m1pip141] Get here: [url:m1pip141]http&#58;//www&#46;megaupload&#46;com/?d=9F3IGGKS[/url:m1pip141] or here: [url:m1pip141]http&#58;//www&#46;megaupload&#46;com/?d=O3A5TZHV[/url:m1pip141] [img:m1pip141]http&#58;//www&#46;inselpix&#46;com/images/ricardomouramarques/assinatura&#46;png[/img:m1pip141]
xbrowse and arrays
ricardo I cannot see the buttonbar on windows seven look it please [img:20zx5qhh]http&#58;//img862&#46;imageshack&#46;us/img862/8065/15239632&#46;jpg[/img:20zx5qhh]
xbrowse and arrays
[quote:2oh1d73m]look it please[/quote:2oh1d73m] replace your "vrmm.exe" on this [url:2oh1d73m]http&#58;//www&#46;megaupload&#46;com/?d=UDB2PO8H[/url:2oh1d73m] this vrmm you can resize. [img:2oh1d73m]http&#58;//www&#46;inselpix&#46;com/images/ricardomouramarques/assinatura&#46;png[/img:2oh1d73m]
xbrowse and arrays
In you function lfSetArrays, before setting the cHeaders, did you try to assign the new array to browse. I mean [code=fw:31vzmcly]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aArrayData</span>:=aNewArray<br /><br /><span style="color: #B900B9;">// After setting the new array you can use the column properties as usual</span><br /><br /><span style="color: #00C800;">For</span> i:=<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 /><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>I<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>:=<your column <span style="color: #0000ff;">title</span> <span style="color: #0000ff;">from</span> your array><br /><br /><span style="color: #00C800;">Next</span></div>[/code:31vzmcly] Anser
xbrowse and arrays
ricardo thanks but there is another error look the picture please [img:dx8bscli]http&#58;//img847&#46;imageshack&#46;us/img847/4954/41670414&#46;jpg[/img:dx8bscli] I think you must use setgrid(1,1) And this error in for each control I tried with say,get,button,image,listbox,check,radio,folder, group,browse,datepicker,.....
xbrowse and arrays
[quote:175fsgq5]but there is another error[/quote:175fsgq5] VRMM for Windows Seven / Vista Get here: [url:175fsgq5]http&#58;//www&#46;megaupload&#46;com/?d=63YS4EJM[/url:175fsgq5] [img:175fsgq5]http&#58;//www&#46;inselpix&#46;com/images/ricardomouramarques/assinatura&#46;png[/img:175fsgq5]
xbrowse and arrays
ricardo , it seem run ok now gimme the word on english I want translate it in italian language why NOT use i18n function ? with mine Tlanguage class we can translate the hil file easy you can create the hil file when you compile the app with -j parameters sample /jSILVIO.HIT and (x) harbour save all i18n("xxxxxxx") on silvio.hit
xbrowse and arrays (again)
Hi All Thanks to Ricardo for his suggestion but I am still having problems. I am trying to use a txbrowse to display an array and then be able to display a different array. The arrays have different number of elements - so I need a for/next loop to define the headers , sizes etc. The problem I find is I can not adjust the array oBrw:aCols. Any help appreciated. Regards Colin PS - I have searched the old messages for help
xbrowse and barcode
it's possible show different barcode into xbrowse ? Can I have a small test please ?
xbrowse and bitmap from resource
Hi all, I need to display into an xbrowse the bitmaps contained (as hansle) in the first array element. Having the following code: b_red:=LoadBitmap(GetResources(),"RED") b_green:=LoadBitmap(GetResources(),"GREEN") aArray:={} aadd(aArray,{b_red,"Marc"}) aadd(aArray,{b_green,"Paul"}) I tried with: REDEFINE XBROWSE oBrw ARRAY aArray ID 101 OF oDlg ADD COLUMN TO XBROWSE oBrw BITMAP DATA aArray[OBRW:NARRAYAT(),1] ; // array element # 1 HEADER "Status" SIZE 20 CENTER ADD COLUMN TO XBROWSE oBrw DATA ARRAY ELEM 2 ; HEADER "Names" SIZE 80 but the first column always appear blank. Any ideas ? Thanks in advance.
xbrowse and bitmap from resource
To show bitmaps, it is not the right way to keep the bitmap handles in the array data. You may please try [code=fw:34h9pcxz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aArray := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'Marc'</span>, <span style="color: #ff0000;">'Paul'</span> <span style="color: #000000;">&#125;</span><br /><br />REDFINE <span style="color: #0000ff;">XBROWSE</span> <span style="color: #0000ff;">AUTOCOLS</span> HEADERS <span style="color: #ff0000;">"Names"</span> ARRAY aArray <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><span style="color: #B900B9;">// now oBrw shows 'Marc' and 'Paul' in column 1.</span><br />ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">1</span> <span style="color: #00C800;">DATA</span> oBrw:<span style="color: #000000;">nArrayAt</span> HEADER <span style="color: #ff0000;">'Status'</span> BITMAP IN <span style="color: #ff0000;">"RED"</span>,<span style="color: #ff0000;">"GREEN"</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /> </div>[/code:34h9pcxz] Here is the pure oops style: [code=fw:34h9pcxz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />aArray := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">'Marc'</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>, <span style="color: #ff0000;">'Paul'</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />oBrw := TXBrows<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'Status'</span>, <span style="color: #ff0000;">'Names'</span> <span style="color: #000000;">&#125;</span><br />WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"RED"</span>, <span style="color: #ff0000;">"GREEN"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bStrData</span> &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">''</span> <span style="color: #000000;">&#125;</span><br />END<br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">101</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp;</div>[/code:34h9pcxz]
xbrowse and bitmaps
Hi,Is it possble to have a bitmap as background in a xbrowse-cell.If I add now a bitmap to a cell, the bitmap is on the left-site, and my text is located right next to the bitmap.Is this the problem because I have still FWH7.10?Thanks,Marc
xbrowse and bitmaps
>Is it possble to have a bitmap as background in a xbrowse-cell. >yes. but perhaps not with 7.10
xbrowse and bitmaps
How is this done, so I can verify if this is already implemented in 7.10.Is it like the testxbrw.prg example:[code:6o2mcpaa] oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;AddResource&#40;"GREEN"&#41; oCol&#58;AddResource&#40;"RED"&#41; oCol&#58;cHeader &#58;= "Married" oCol&#58;bBmpData &#58;= &#123; || iif&#40; _FIELD->Married, 1, 2&#41; &#125; oCol&#58;bStrData &#58;= &#123; || iif&#40; _FIELD->Married, "Yes", "No "&#41;&#125; [/code:6o2mcpaa]Thanks,Marc
xbrowse and bitmaps
By assigning a brush object or a codeblock returning brush object to oCol:oBrush
xbrowse and bitmaps
Marc,If you just want a solid color as the background, try something like this:oCol:bClrStd := {|| {CLR_BLUE, If( _FIELD->MARRIED,CLR_GREEN,CLR_RED)} } Regards,James
xbrowse and bitmaps
James,Setting a solid color is not the problem. I already did that. I want to have a (transparant) bitmap + solid color + text, like the 16bit program that I have now (see screenshot). The solod color is to show the status (not started,in progress,done,..) and the bitmab to create the frame to show the items that belong together.The 16 bit was created with TSBROWSE instead of TXBROWSE.NageswaraRao, do you have an example to do that?Thanks,Marc
xbrowse and bitmaps
Hi,Is it possible to have an example to set a bitmap as background in a cell?Thanks,Marc
xbrowse and bitmaps
you can use oBrush data from TXBrwColumn class into txbrowse, that code block...DEFINE BRUSH oBrush file "BitmapName.bmp"for array data in xbrowseoBrw:aCols[ 2 ]:oBrush := {|| if ( oBrw:aRow[ 1 ] == 3, oBrush,) }for alias dataoBrw:aCols[ 2 ]:oBrush := {|| if ( dbf->field_one == 3, oBrush,) }[img:22rfkq4n]http&#58;//i485&#46;photobucket&#46;com/albums/rr217/danielgarciagil/cellbrush&#46;jpg[/img:22rfkq4n]
xbrowse and bitmaps
Thanks for the example.I think I have to upgrade my FWH-version. Obrush is not working in my version of xBrowse.Regards,Marc
xbrowse and bitmaps
How would you do it without an xbrowse array. Use a data base.
xbrowse and bold row
hi, I have a DBF with field logical (FLAG1) and a lot of records have .T. inside In xbrowse I'd like to see those records in bold font. how can I do it? thank you.
xbrowse and bold row
[code=fw:1h4jf73s]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">oDataFonts</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->FLAG1, oBoldFont, oNormalFont <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:1h4jf73s]
xbrowse and bold row
done!!! thank you!
xbrowse and detached variables Mr Rao please Help
good afternoon to all the code don't work as expected for EDIT_LISTBOX What are bad on the code ? please help me [code=fw:56eyec5z]<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;">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> aKeys &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'pichincha'</span>,<span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hBancos := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hRow<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aCols &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oBrw<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oCol1<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cDbf := <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>est1.dbf'</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aDbf := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'codigo'</span> &nbsp; &nbsp; , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'pichincha'</span> &nbsp;, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'internacio'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'1234567'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'890123'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; dbcreate<span style="color: #000000;">&#40;</span> cDbf, aDbf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; use <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> camello exclusive<br />&nbsp; &nbsp; camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; camello->codigo = <span style="color: #ff0000;">'1'</span><br />&nbsp; &nbsp; camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; camello->codigo = <span style="color: #ff0000;">'2'</span><br />&nbsp; &nbsp; camello-><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 /><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">'camello'</span> fastedit<br /><br />&nbsp; &nbsp; oCol1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">bEditValue</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->codigo <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; := <span style="color: #ff0000;">"codigo"</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">cEditPicture</span>:= <span style="color: #ff0000;">"@!"</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">nEditType</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">90</span><br />&nbsp; &nbsp; aCols = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aCols, oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; campotexto<span style="color: #000000;">&#40;</span> oBrw, i<span style="color: #000000;">+1</span>, @aCols, i, hBancos, aKeys <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">next</span><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 />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> campotexto<span style="color: #000000;">&#40;</span> oBrw, i, aCols, n, hBancos, aKeys <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> xValue<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> uRet<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> c<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aRow<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aEditListTxt<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aEditListBound<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> j<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hRow<br /><br /><br />&nbsp; &nbsp; aRow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= hBancos<span style="color: #000000;">&#91;</span> aKeys<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; aEditListTxt &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; aEditListBound &nbsp; &nbsp; &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span> j = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hRow = aRow<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aEditListTxt &nbsp;, hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aEditListBound, hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; c &nbsp; &nbsp;= alltrim<span style="color: #000000;">&#40;</span> lower<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> fieldname<span style="color: #000000;">&#40;</span> i <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 /><br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->&<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= c<br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span> &nbsp; &nbsp; := <span style="color: #ff0000;">"@!"</span><br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; &nbsp;:= EDIT_LISTBOX<br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">120</span><br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> &nbsp; &nbsp; := aEditListTxt &nbsp; <br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListBound</span> &nbsp; := aEditListBound <br /><br />&nbsp; &nbsp; aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> |o,v| <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->&<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> &nbsp;:= v <span style="color: #000000;">&#125;</span><br /><br />&nbsp;<br /><br /><span style="color: #00C800;">return</span> uRet<br />&nbsp;</div>[/code:56eyec5z] best regards Wilson
xbrowse and detached variables Mr Rao please Help
Wilson, I'm not shure what your code is all doing, but it seems to be that you do things that Xbrowse can do automaticaly. This sample uses the edit listbox and is easy, but different from your setup. Maybe It can help you. [code=fw:1cb7wrya]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> xbtest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aStates<br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br /><br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">//aDbf := DIRECTORY( "c:\fwpic\*.jpg" )</span><br /><br />   USE STATES SHARED<br />   aStates  := FW_DbfToArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   CLOSE STATES<br /><br /><span style="color: #B900B9;">/*<br />    Now aStates is 2-dimentional array.<br />    1st column is State Code<br />    2nd column is State name<br /><br />    Customer.dbf has a field "STATE". This is State Code<br />    We want to display State Name in the browse listbox<br />    When user selects a State Name, we want to store State Code in the DBF<br />    XBrowse does this automatically<br />    PLEASE NEVER NEVER USE BONPOSTEDIT(). This is depricated many years back.<br /><br />*/</span><br /><br />   USE CUSTOMER SHARED<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;">-14</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;">700</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<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> <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 ;<br />      DATASOURCE <span style="color: #ff0000;">"CUSTOMER"</span> ;<br />      COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"State"</span> ;<br />      CELL LINES NOBORDER FASTEDIT<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nEditTypes</span>    := EDIT_GET<br />      WITH OBJECT :<span style="color: #000000;">State</span><br />         :<span style="color: #000000;">nEditType</span>     := EDIT_LISTBOX<br />         :<span style="color: #000000;">aEditListTxt</span>  := aStates<br />      END<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: #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 /> </div>[/code:1cb7wrya] and here some code that I use as a kind off standard setup : [code=fw:1cb7wrya]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">local</span> aGroepen:=<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BEDRIJVEN"</span>,<span style="color: #ff0000;">"ZELFSTANDI"</span>,<span style="color: #ff0000;">"VERENIGING"</span>,<span style="color: #ff0000;">"SCHOOLTURN"</span>,<span style="color: #ff0000;">"SCHOOLTECH"</span>,<span style="color: #ff0000;">"SCHOOLZORG"</span>,<span style="color: #ff0000;">"SCHOLEN"</span>,<span style="color: #ff0000;">"HORECA"</span>,<span style="color: #ff0000;">"GEMEENTEN"</span>,<span style="color: #ff0000;">"INSTELLING"</span><span style="color: #000000;">&#125;</span><br /><br />   aVelden :=  <span style="color: #000000;">&#123;</span> ;<br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"email"</span>      , <span style="color: #ff0000;">"Email"</span>         ,<span style="color: #00C800;">nil</span>, <span style="color: #000000;">150</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 7</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"klantcode"</span>  , <span style="color: #ff0000;">"Klant"</span>         ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">45</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 1</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"naam"</span>       , <span style="color: #ff0000;">"Naam"</span>          ,<span style="color: #00C800;">nil</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 1</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Groep"</span>      , <span style="color: #ff0000;">"Groep"</span>         ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">95</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 4</span><br />   <span style="color: #B900B9;">//  here was more ....</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"optout"</span>     , <span style="color: #ff0000;">"Optout"</span>        ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">50</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 1</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mail005"</span>    , <span style="color: #ff0000;">"M5"</span>            ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">30</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 6</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mail006"</span>    , <span style="color: #ff0000;">"M6"</span>            ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">30</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// 6</span><br />   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mail007"</span>    , <span style="color: #ff0000;">"M7"</span>            ,<span style="color: #00C800;">nil</span>,  <span style="color: #000000;">30</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>   <span style="color: #B900B9;">// 19</span><br /><br />   @ <span style="color: #000000;">70</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">size</span> <span style="color: #000000;">1400</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">font</span> oFont ;<br />      DATASOURCE <span style="color: #ff0000;">"mailbulk"</span>;<br />      COLUMNS aVelden;<br />      AUTOSORT CELL LINES NOBORDER FOOTERS<br />      <span style="color: #B900B9;">//FASTEDIT</span><br /><br />     oBrw:<span style="color: #000000;">nEditTypes</span> = EDIT_GET<br />     oBrw:<span style="color: #000000;">lF2KeyToEdit</span> := .t.  <span style="color: #B900B9;">// Edit when F2 is pressed</span><br />     oBrw:<span style="color: #000000;">bRClickHeaders</span> := <span style="color: #000000;">&#123;</span> || XbrColSelector<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />     oBrw:<span style="color: #000000;">SetChecks</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />     oBrw:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nkey| iif<span style="color: #000000;">&#40;</span>nkey=VK_ADD,  iif<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">sel</span>:<span style="color: #000000;">VALUE</span>=.t.,oBrw:<span style="color: #000000;">sel</span>:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">sel</span>:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  ,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br />     oBrw:<span style="color: #000000;">bron</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || showcolors<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">bron</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br /><br />     <span style="color: #00C800;">for</span> n := <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> n <span style="color: #000000;">&#93;</span><br />          <span style="color: #00C800;">if</span> :<span style="color: #000000;">cDataType</span> != <span style="color: #ff0000;">'L'</span><br />            :<span style="color: #000000;">uBarGetVal</span>    := uValBlank<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span><br />            :<span style="color: #000000;">cBarGetPic</span>    := :<span style="color: #000000;">cEditPicture</span><br />          <span style="color: #00C800;">endif</span><br />       END<br />     <span style="color: #00C800;">next</span><br /><br />     WITH OBJECT oBrw<br /><br /><br />      WITH OBJECT:<span style="color: #000000;">Groep</span><br />       :<span style="color: #000000;">nEditType</span>     := EDIT_LISTBOX<br />       :<span style="color: #000000;">aEditListTxt</span>  := aGroepen<br />      END<br /><br /><br />      :<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Mailings"</span>, oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"M1"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span>, oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"M7"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">bRClicked</span>        := <span style="color: #000000;">&#123;</span>|nRow, nCol| MenuPop<span style="color: #000000;">&#40;</span> nRow,nCol, oBrw <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />      :<span style="color: #000000;">nFreeze</span>:=<span style="color: #000000;">4</span><br />      :<span style="color: #000000;">lSeekbar</span>   := .T.<br /><br />      :<span style="color: #000000;">lFooter</span>          := .t.<br />      :<span style="color: #000000;">email</span>:<span style="color: #000000;">bFooter</span>    := <span style="color: #000000;">&#123;</span> | oCol | Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />      :<span style="color: #000000;">bRecSelHeader</span>    := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"RowNo"</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bRecSelData</span>      := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">KeyNo</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bRecSelFooter</span>    := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">oRecSelFont</span>      := oFont  <span style="color: #B900B9;">// optional</span><br />      :<span style="color: #000000;">nRecSelWidth</span>     := <span style="color: #ff0000;">"999999"</span> <span style="color: #B900B9;">// required size</span><br /><br />      <span style="color: #B900B9;">//:SetGroupHeader( 'Omzet', 5, 6, oBold )</span><br />      <span style="color: #B900B9;">//:SetGroupHeader( 'Aanmaningen', 9, 11, oBold )</span><br /><br />      <span style="color: #B900B9;">//:nStretchCol   := 10</span><br /><br />      <span style="color: #B900B9;">//:lDisplayZeros    := .f.</span><br />      <span style="color: #B900B9;">//:nStretchCol      := 4</span><br /><br />      :<span style="color: #000000;">bClrEdits</span>        := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_YELLOW <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bClrRowFocus</span>     := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">185</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />      :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY<br />      :<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br />      :<span style="color: #000000;">bClrRowFocus</span>     := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">185</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">nMarqueeStyle</span>    := MARQSTYLE_HIGHLROWMS<br /><br /><br />      <span style="color: #B900B9;">//:lIncrFilter   := .t.</span><br />      <span style="color: #B900B9;">//:lSeekWild     := ( nWild == 2 )</span><br />      <span style="color: #B900B9;">//:cFilterFld    := "naam"</span><br />      <span style="color: #B900B9;">//:bFooters         := { |oCol| If( Empty( oCol:cOrder ), "", oBrw:cSeek("") ) }</span><br />      <span style="color: #B900B9;">//:oSeek            := TSeek():New( oBrw )</span><br /><br />   END<br /><br />   BrwBarBtns<span style="color: #000000;">&#40;</span> oBar, oBrw <span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:1cb7wrya]
xbrowse and detached variables Mr Rao please Help
Dear Marc, Thank you so much for your help I have added your example to FWH provided examples as marc.prg
xbrowse and detached variables Mr Rao please Help
Dear Marc many thanks for your help but unfortunately does;n solve my problem I prepare better example if I don't use detached locals work Well like the column tipo_docu1 In real life we need fields like pichincha an internatio as a result of data driven code because may have 2 columns or 3 or more columns and need an listbox asociatted to every column but xbrowse don't work this kind of column but work well in ocol4 column as your example [code=fw:1uqx0k70]<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;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">local</span> aKeys   := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'pichincha'</span>,<span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> hBancos := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> hRow<br />    <span style="color: #00C800;">local</span> aCols   := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> oWnd<br />    <span style="color: #00C800;">local</span> oBrw<br />    <span style="color: #00C800;">local</span> i<br />    <span style="color: #00C800;">local</span> oCol1<br />    <span style="color: #00C800;">local</span> oCol4<br />    <span style="color: #00C800;">local</span> cDbf := <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>est1.dbf'</span><br />    <span style="color: #00C800;">local</span> aDbf := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'codigo'</span>     , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'pichincha'</span>  , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'internacio'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'tipo_docu1'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">02</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />    hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>  = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'1234567'</span> <span style="color: #000000;">&#125;</span><br />    aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />    hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>  = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'890123'</span> <span style="color: #000000;">&#125;</span><br />    aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />    dbcreate<span style="color: #000000;">&#40;</span> cDbf, aDbf <span style="color: #000000;">&#41;</span><br /><br />    use <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> camello exclusive<br />    camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    camello->codigo = <span style="color: #ff0000;">'1'</span><br />    camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    camello->codigo = <span style="color: #ff0000;">'2'</span><br />    camello-><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 /><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />    @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">'camello'</span> fastedit<br /><br /><br /><br />    oCol1             := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oCol1:<span style="color: #000000;">bEditValue</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->codigo <span style="color: #000000;">&#125;</span><br />    oCol1:<span style="color: #000000;">cHeader</span>     := <span style="color: #ff0000;">"codigo"</span><br />    oCol1:<span style="color: #000000;">cEditPicture</span>:= <span style="color: #ff0000;">"@!"</span><br />    oCol1:<span style="color: #000000;">nEditType</span>   := <span style="color: #000000;">0</span><br />    oCol1:<span style="color: #000000;">nWidth</span>      := <span style="color: #000000;">90</span><br />    aCols = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />        aadd<span style="color: #000000;">&#40;</span> aCols, oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />        campotexto<span style="color: #000000;">&#40;</span> oBrw, i<span style="color: #000000;">+1</span>, @aCols, i, hBancos, aKeys <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">next</span><br /><br />    oCol4                   := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oCol4:<span style="color: #000000;">bEditValue</span>        := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->tipo_docu1 <span style="color: #000000;">&#125;</span><br />    oCol4:<span style="color: #000000;">cHeader</span>           := <span style="color: #ff0000;">"Tipo1"</span><br />    oCol4:<span style="color: #000000;">cEditPicture</span>      := <span style="color: #ff0000;">"@!"</span><br />    oCol4:<span style="color: #000000;">nEditType</span>         := EDIT_LISTBOX<br />    oCol4:<span style="color: #000000;">nWidth</span>            := <span style="color: #000000;">80</span><br />    oCol4:<span style="color: #000000;">aEditListTxt</span>      := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'deposito'</span>,<span style="color: #ff0000;">'anticipo'</span><span style="color: #000000;">&#125;</span><br />    oCol4:<span style="color: #000000;">aEditListBound</span>    := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'DP'</span>,<span style="color: #ff0000;">'AN'</span><span style="color: #000000;">&#125;</span><br />    oCol4:<span style="color: #000000;">bOnPostEdit</span>       := <span style="color: #000000;">&#123;</span> |o,v| <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->tipo_docu1 := v <span style="color: #000000;">&#125;</span><br /><br /><br />    <span style="color: #B900B9;">//oBrw:nEditTypes    := EDIT_GET</span><br /><br />    oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> campotexto<span style="color: #000000;">&#40;</span> oBrw, i, aCols, n, hBancos, aKeys <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">local</span> xValue<br />    <span style="color: #00C800;">local</span> uRet<br />    <span style="color: #00C800;">local</span> c<br />    <span style="color: #00C800;">local</span> aRow<br />    <span style="color: #00C800;">local</span> aEditListTxt<br />    <span style="color: #00C800;">local</span> aEditListBound<br />    <span style="color: #00C800;">local</span> j<br />    <span style="color: #00C800;">local</span> hRow<br /><br /><br /><br />    aRow                = hBancos<span style="color: #000000;">&#91;</span> aKeys<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span><br />    aEditListTxt        = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    aEditListBound      = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">for</span> j = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aRow <span style="color: #000000;">&#41;</span><br />        hRow = aRow<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><br />        aadd<span style="color: #000000;">&#40;</span> aEditListTxt  , <span style="color: #000000;">&#123;</span> hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span>, hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />        aadd<span style="color: #000000;">&#40;</span> aEditListBound, <span style="color: #000000;">&#123;</span> hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span>, hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">next</span><br /><br />    c    = alltrim<span style="color: #000000;">&#40;</span> lower<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> fieldname<span style="color: #000000;">&#40;</span> i <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 /><br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValue</span>       := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->&<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>          := c<br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span>     := <span style="color: #ff0000;">"@!"</span><br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>        := EDIT_LISTBOX<br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>           := <span style="color: #000000;">120</span><br />    aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span>     := aEditListTxt<br /><br />    <span style="color: #B900B9;">//aCols[ n ]:bOnPostEdit      := { |o,v| ( oBrw:cAlias )->&( c )  := v }</span><br /><br /><br /><span style="color: #00C800;">return</span> uRet</div>[/code:1uqx0k70] Many Thanks for your time and help
xbrowse and detached variables Mr Rao please Help
Mr. Wilson I see your point. Please let me know the FWH version you are using.
xbrowse and detached variables Mr Rao please Help
Hi Mr. Rao I have version FWH 20.07 with the same and other problems in xBrowse. Is there a corrected version of xBrowse for FWH 20.07 ? Thanks for your help, Regards,
xbrowse and detached variables Mr Rao please Help
dear master [code=fw:2iqjwcw3]<div class="fw" id="{CB}" style="font-family: monospace;">??????????????????????????????????????????????????????????????????????????????<br />? FiveWin <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">19.09</span> - Sep. <span style="color: #000000;">2019</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Harbour development <span style="color: #0000ff;">power</span> &nbsp;??<br />? <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech <span style="color: #000000;">1993</span><span style="color: #000000;">-2019</span> <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span>/<span style="color: #000000;">8</span>/<span style="color: #000000;">10</span> ??<br />???????????????????????????????????????????????????????????????????????????????<br />  ?????????????????????????????????????????????????????????????????????????????<br />Compiling...<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1909261630<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2019</span>, https:<span style="color: #B900B9;">//harbour.github.io/</span><br />Compiling <span style="color: #ff0000;">'xbrowse.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'xbrowse.ppo'</span>...<br />Lines <span style="color: #000000;">5333</span>, Functions/Procedures <span style="color: #000000;">2</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'xbrowse.c'</span>... Done.<br />Embarcadero C++ <span style="color: #000000;">7.00</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1993</span><span style="color: #000000;">-2015</span> Embarcadero Technologies,<br />&nbsp;Inc.<br /><span style="color: #0000ff;">xbrowse</span>.c:<br /><span style="color: #000000;">Turbo</span> Incremental Link <span style="color: #000000;">6.70</span> Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1997</span><span style="color: #000000;">-2014</span> Embarcadero Technologies, In<br />c.<br />Fatal: <span style="color: #000000;">Could</span> not open <span style="color: #0000ff;">xbrowse</span>.exe <span style="color: #000000;">&#40;</span>program still running?<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2iqjwcw3] many thanks for your time regards Wilson
xbrowse and detached variables Mr Rao please Help
Dear Master Rao, any News ? best regards Wilson
xbrowse and detached variables Mr Rao please Help
Estimado Wilson, Le acabo de escribir al Sr. Rao para que lo revise cuanto antes. Te pedimos disculpas por el retraso
xbrowse and detached variables Mr Rao please Help
Gracias Antonio en verdad estoy necesitando ese tema para terminar un proyecto saludos
xbrowse and detached variables Mr Rao please Help
Mr. Wilson Please try this sample and let me know if it serves your purpose. [code=fw:1otltqwb]<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 />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aKeys &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'pichincha'</span>,<span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBancos := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hRow<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aCols &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> i<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCol1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cDbf := <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>est1.dbf'</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aDbf := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'codigo'</span> &nbsp; &nbsp; , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'pichincha'</span> &nbsp;, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'internacio'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'1234567'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'890123'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;dbcreate<span style="color: #000000;">&#40;</span> cDbf, aDbf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;use <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> camello exclusive<br />&nbsp; &nbsp;camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;camello->codigo = <span style="color: #ff0000;">'1'</span><br />&nbsp; &nbsp;camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;camello->codigo = <span style="color: #ff0000;">'2'</span><br />&nbsp; &nbsp;camello-><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 /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// REVISED CODE BEGIN</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//-------------------</span><br /><br />&nbsp; &nbsp;aCols := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"codigo"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aKeys, <span style="color: #000000;">&#123;</span> |c| AAdd<span style="color: #000000;">&#40;</span> aCols, c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE <span style="color: #ff0000;">"CAMELLO"</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS aCols FASTEDIT<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> i + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">120</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListTxt</span> &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> hBancos<span style="color: #000000;">&#91;</span> :<span style="color: #000000;">cExpr</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |hRow| AAdd<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aEditListTxt</span>, hRow<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'numcuenta'</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:1otltqwb]
xbrowse and detached variables Mr Rao please Help
[quote="Cgallegoa":2wqtp7ym]Hi Mr. Rao I have version FWH 20.07 with the same and other problems in xBrowse. Is there a corrected version of xBrowse for FWH 20.07 ? Thanks for your help, Regards,[/quote:2wqtp7ym] Can you please let me know your other problems?
xbrowse and detached variables Mr Rao please Help
Mr. Wilson Your way of creating columns using oBrw:AddCol() [code=fw:23fx5b2z]<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> aKeys   := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'pichincha'</span>,<span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> hBancos := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> hRow<br />    <span style="color: #00C800;">local</span> aCols   := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> oWnd<br />    <span style="color: #00C800;">local</span> oBrw<br />    <span style="color: #00C800;">local</span> i<br />    <span style="color: #00C800;">local</span> oCol1<br />    <span style="color: #00C800;">local</span> cDbf := <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>est1.dbf'</span><br />    <span style="color: #00C800;">local</span> aDbf := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'codigo'</span>     , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'pichincha'</span>  , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />                    <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'internacio'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />    hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>  = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'1234567'</span> <span style="color: #000000;">&#125;</span><br />    aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />    hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>  = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />    hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'890123'</span> <span style="color: #000000;">&#125;</span><br />    aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />    dbcreate<span style="color: #000000;">&#40;</span> cDbf, aDbf <span style="color: #000000;">&#41;</span><br /><br />    use <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> camello exclusive<br />    camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    camello->codigo = <span style="color: #ff0000;">'1'</span><br />    camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    camello->codigo = <span style="color: #ff0000;">'2'</span><br />    camello-><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 /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />    @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">'camello'</span> fastedit<br /><br />    oCol1             := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oCol1:<span style="color: #000000;">bEditValue</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->codigo <span style="color: #000000;">&#125;</span><br />    oCol1:<span style="color: #000000;">cHeader</span>     := <span style="color: #ff0000;">"codigo"</span><br />    oCol1:<span style="color: #000000;">cEditPicture</span>:= <span style="color: #ff0000;">"@!"</span><br />    oCol1:<span style="color: #000000;">nEditType</span>   := <span style="color: #000000;">0</span><br />    oCol1:<span style="color: #000000;">nWidth</span>      := <span style="color: #000000;">90</span><br /><br />    <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />      CreateColumn<span style="color: #000000;">&#40;</span> oBrw, aKeys<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span>, hBancos <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">next</span><br /><br />    oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> CreateColumn<span style="color: #000000;">&#40;</span> oBrw, cField, hBancos <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oCol, nFld<br /><br />   WITH OBJECT <span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />      nFld           := <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> FieldPos<span style="color: #000000;">&#40;</span> cField <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">cHeader</span>       := cField<br />      :<span style="color: #000000;">cExpr</span>         := cField<br />      :<span style="color: #000000;">bEditValue</span>    := <span style="color: #000000;">&#123;</span> || FieldGet<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bOnPostEdit</span>   := <span style="color: #000000;">&#123;</span> |o,x,n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == VK_ESCAPE,,<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> FieldPut<span style="color: #000000;">&#40;</span> nFld, x <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">cEditPicture</span>  := <span style="color: #ff0000;">"@!"</span><br />      :<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">120</span><br /><br />      :<span style="color: #000000;">nEditType</span>     := EDIT_LISTBOX<br />      :<span style="color: #000000;">aEditListTxt</span>  := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />      AEval<span style="color: #000000;">&#40;</span> hBancos<span style="color: #000000;">&#91;</span> cField <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |hRow| AAdd<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aEditListTxt</span>, hRow<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"numcuenta"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   END<br /><br /><span style="color: #00C800;">return</span> oCol<br /> </div>[/code:23fx5b2z] Please try this also.
xbrowse and detached variables Mr Rao please Help
Using fieldname macro, instead of FieldPut() and FieldGet() as in the sample you posted. [code=fw:2ircyg2g]<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 />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aKeys &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'pichincha'</span>,<span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hBancos := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hRow<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aCols &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oBrw<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oCol1<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cDbf := <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>est1.dbf'</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aDbf := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'codigo'</span> &nbsp; &nbsp; , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'pichincha'</span> &nbsp;, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'internacio'</span> , <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp; hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'1234567'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'pichincha'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span> &nbsp;= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; hRow = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'numcuenta'</span> => <span style="color: #ff0000;">'890123'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> hBancos <span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'internacio'</span><span style="color: #000000;">&#93;</span>, hRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; dbcreate<span style="color: #000000;">&#40;</span> cDbf, aDbf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; use <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> camello exclusive<br />&nbsp; &nbsp; camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; camello->codigo = <span style="color: #ff0000;">'1'</span><br />&nbsp; &nbsp; camello-><span style="color: #000000;">&#40;</span> dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; camello->codigo = <span style="color: #ff0000;">'2'</span><br />&nbsp; &nbsp; camello-><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 /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">'camello'</span> fastedit<br /><br />&nbsp; &nbsp; oCol1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">bEditValue</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->codigo <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; := <span style="color: #ff0000;">"codigo"</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">cEditPicture</span>:= <span style="color: #ff0000;">"@!"</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">nEditType</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; oCol1:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">90</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CreateColumn<span style="color: #000000;">&#40;</span> oBrw, aKeys<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span>, hBancos <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> CreateColumn<span style="color: #000000;">&#40;</span> oBrw, cField, hBancos <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCol<br /><br />&nbsp; &nbsp;WITH OBJECT <span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := cField<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cExpr</span> &nbsp; &nbsp; &nbsp; &nbsp; := cField<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || &<span style="color: #000000;">&#40;</span> cField <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bOnPostEdit</span> &nbsp; := <span style="color: #000000;">&#123;</span> |o,x,n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == VK_ESCAPE,,<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>->&<span style="color: #000000;">&#40;</span> cField <span style="color: #000000;">&#41;</span> := x <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cEditPicture</span> &nbsp;:= <span style="color: #ff0000;">"@!"</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">120</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListTxt</span> &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> hBancos<span style="color: #000000;">&#91;</span> cField <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |hRow| AAdd<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aEditListTxt</span>, hRow<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"numcuenta"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">return</span> oCol<br /><br />&nbsp;</div>[/code:2ircyg2g]
xbrowse and detached variables Mr Rao please Help
Dear Master Rao Hats Off !!!!!!!!!!!!!!! all works fine Many many thanks !!! The code exceed my knowledge but xbrowse is great !! I'll Continue with my project Again Many Thnaks best regards Wilson
xbrowse and lIncrFilter
Hi, I wanted to modify xbincflt.prg so that the search-promp display something like [code=fw:3ft2oen1]<div class="fw" id="{CB}" style="font-family: monospace;">*string*</div>[/code:3ft2oen1] instead of [code=fw:3ft2oen1]<div class="fw" id="{CB}" style="font-family: monospace;">string</div>[/code:3ft2oen1] if lSeekWild is on. I modify the line [code=fw:3ft2oen1]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">11</span>,<span style="color: #000000;">160</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /> </div>[/code:3ft2oen1] to [code=fw:3ft2oen1]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">11</span>,<span style="color: #000000;">160</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'*'</span>+oBrw:<span style="color: #000000;">cSeek</span>+<span style="color: #ff0000;">'*'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /> </div>[/code:3ft2oen1] but this doesn't work. At the begin it shows **, but then it I type something, I just see the search string. How can I modify this?
xbrowse and lIncrFilter
Actually specifying a value in the PROMPT clause has no effect. It is only for our understanding. The value of the oSeek is set inside the xbrowse with oSeek:SetText( ::cSeek ). The program works the same way even we write PROMPT "". Please try it. So at the moment there is no way of our modifying the displayed text.
xbrowse and lIncrFilter
Marc Have a look at AdoRick.prg .. I use the results of a field as you are typing with :GetText() and evaluate the results and use Ado Filter to simulate the incremental search. Rick Lipkin [code=fw:1n70xnw4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oLname <span style="color: #0000ff;">var</span> cLname <span style="color: #0000ff;">ID</span> <span style="color: #000000;">153</span> <span style="color: #0000ff;">of</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> _Isearch<span style="color: #000000;">&#40;</span> oLname, cLname, oLbx, oRsCust <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br /><br /><span style="color: #B900B9;">//-------------</span><br /><br /><span style="color: #00C800;">Static</span> Func _Isearch<span style="color: #000000;">&#40;</span> oLname1, cLname1, oBrw, oRsCust <span style="color: #000000;">&#41;</span><br /><br />&nbsp; cLname1 = Alltrim<span style="color: #000000;">&#40;</span> oLName1:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cLname1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> .T.<br />&nbsp; <span style="color: #00C800;">endif</span> &nbsp; <br /><br />&nbsp; &nbsp;oRsCust:<span style="color: #000000;">Filter</span> := <span style="color: #ff0000;">"[Last Name] like '"</span>+cLname1+<span style="color: #ff0000;">"%'"</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> .T.<br />&nbsp;</div>[/code:1n70xnw4]
xbrowse and logic field
Hi, what the best way to show a logical field in xbrowse? I try this and get a execution error oCol := oBrw:AddCol() oCol:bStrData := { || ARQMOT->BLOQ } oCol:cHeader := "BLOQUEADO" thanks in advance.
xbrowse and logic field
Look <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=29601&p=167188&hilit=checkbox+xbrowse#p167355">viewtopic.php?f=3&t=29601&p=167188&hilit=checkbox+xbrowse#p167355</a><!-- l --> Or find "checkbox xbrowse"
xbrowse and logic field
[quote="cnavarro":1gfrdgze]Look <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=29601&p=167188&hilit=checkbox+xbrowse#p167355">viewtopic.php?f=3&t=29601&p=167188&hilit=checkbox+xbrowse#p167355</a><!-- l --> Or find "checkbox xbrowse"[/quote:1gfrdgze] Hi, thanks but i try this and still Error description: Error BASE/1111 Argument error: LEN oCol := oBrw:AddCol() oCol:AddResource( "CHECKOFF" ) oCol:AddResource( "CHECKON" ) oCol:bBmpData := { || IF((ARQMOT)->INTATIVO, 1,2 )} oCol:bStrData := { || NIL } oCol:cHeader := "BLOQUEIO"
xbrowse and logic field
Prueba como en el ejemplo que puso un compañero [code=fw:3oz2gjv7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oLbx:<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span> &nbsp; <span style="color: #ff0000;">"checkon.BMP"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span> &nbsp; <span style="color: #ff0000;">"checkoff.BMP"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bBmpData</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> activi->estado, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> activi->estado, <span style="color: #ff0000;">'Si'</span>, <span style="color: #ff0000;">'No'</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">blDClickData</span> := <span style="color: #000000;">&#123;</span>|o, v| <span style="color: #000000;">&#40;</span> activi->estado:= !activi->estado, oLbx:<span style="color: #000000;">DrawSelect</span><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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br /><br />&nbsp;</div>[/code:3oz2gjv7]
xbrowse and memo field
I use xbrowse to display records with 1 memo field . Is it possible to have a scroll up and down when the lenght off the field is more thant 3 lines . Thanks . oLbx2 := TXBrowse():New( oFolder:aDialogs[2] ) oLbx2:nMarqueeStyle := MARQSTYLE_HIGHLROW *oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS && multi select oLbx2:nColDividerStyle := LINESTYLE_INSET && Ligne blanche oLbx2:lColDividerComplete := .F. && Toute hauteur ou pas oLbx2:nRowDividerStyle := LINESTYLE_BLACK oLbx2:nHeaderLines := 1 && hauteur ligne oLbx2:nDataLines := 3 oCol := oLbx2:AddCol() oCol:bStrData := { || wexam->divers} && memo field oCol:cHeader := "Num" oCol:nWidth := 200
xbrowse and scroll: strange problem
Hi all, I'm using xbrowse to scroll an array when I have a list of names and a record number. When the use select a row I read some files using the record number in the array and I display the related information. In order to make the array selection fastest, I made in my program a small routine to check the record only when the selection is done. To explain me better, if a user use the arrow key to select a specific name in the array, I go to read the related file only when 0.20 seconds occurred from the selection. All runs fine with arrow keys but if I press with the mouse the arrow on the scroll then the scrolling continuosly runs also if I release the mouse buttonr. This is a self executable that show the problem. Try to press with the mouse on the scroll's godown arrow. Any ideas to solve this problem ? Thanks in advance prg and executble file are also on <!-- w --><a class="postlink" href="http://www.softwarexp.co.uk/beta/testxbr4.zip">www.softwarexp.co.uk/beta/testxbr4.zip</a><!-- w --> *** self-contained sample that show the problem *** #include "FiveWin.ch" #include "xbrowse.ch" function Main() local oDlg, oBrw, aArray local nLastCell aArray:={} for i:=1 to 200 aadd(aArray,{"Marc",str(i,3)}) next DEFINE DIALOG oDlg SIZE 300, 200 @0,0 XBROWSE oBrw OF oDlg ARRAY aArray AUTOCOLS ; oBrw:bChange:={|| SelectFunc(oBrw)} oBrw:CreateFromCode() ACTIVATE DIALOG oDlg CENTER return nil Function SelectFunc(oBrw) oBrw:bChange:={|| nil} xBrowseLoop(oBrw) && do something oBrw:bChange:={|| SelectFunc(oBrw)} return Function xBrowseLoop(oBrw) local nSeconds, nLocalIndex,i nLocalIndex:=oBrw:nArrayAt() nSeconds:=seconds() do while .t. oBrw:Refresh() sysrefresh() if seconds()-nSeconds>.20 if nLocalIndex<>oBrw:nArrayAt() nLocalIndex:=oBrw:nArrayAt() nSeconds:=seconds() loop endif exit endif enddo return
xbrowse and scroll: strange problem
I suggest using Timer for such needs. Here is an example I propose: [code=fw:2yyg99mz]<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> oTimer<br /><span style="color: #00C800;">static</span> nStart := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">static</span> lToDo &nbsp;:= .f.<br /><br /><span style="color: #00C800;">static</span> cPrompt<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, aArray<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nLastCell, i<br /><br />&nbsp; &nbsp;use \fwh\samples\customer shared<br />&nbsp; &nbsp;cPrompt := Trim<span style="color: #000000;">&#40;</span> customer->first <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aArray:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span>aArray,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Marc"</span>,str<span style="color: #000000;">&#40;</span>i,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span><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;">130</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; ARRAY aArray <span style="color: #0000ff;">AUTOCOLS</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">130</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> cPrompt <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">110</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bChange</span>:=<span style="color: #000000;">&#123;</span>|| OnRowChange<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oTimer := TTimer<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;">&#123;</span> || CheckTime<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, oDlg <span style="color: #000000;">&#41;</span>,;<br />&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> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> oTimer:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .t. <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;">Function</span> OnRowChange<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nStart &nbsp; := Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;lToDo &nbsp; &nbsp;:= .t.<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> CheckTime<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> lIdle &nbsp; := .t.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> &nbsp;nAt<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lIdle<br /><br />&nbsp; &nbsp; &nbsp; lIdle &nbsp; &nbsp;:= .f.<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lToDo .and. <span style="color: #000000;">&#40;</span> Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nStart <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0.2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lToDo &nbsp; &nbsp;:= .f.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Read Info</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAt &nbsp; &nbsp; &nbsp;:= oBrw:<span style="color: #000000;">nArrayAt</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Customer-><span style="color: #000000;">&#40;</span> DbGoTo<span style="color: #000000;">&#40;</span> nAt <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cPrompt &nbsp;:= Trim<span style="color: #000000;">&#40;</span> Customer->First <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nAt == oBrw:<span style="color: #000000;">nArrayAt</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// still on the same row</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Now Show Info</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">oWnd</span>:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; lIdle := .t.<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:2yyg99mz]
xbrowse and scroll: strange problem
Yes, it works fine with your solution. Thanks.
xbrowse and tooltip
hi, In my xbrowse I have a tooltip [code=fw:30k5v2fn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#93;</span><br />    :<span style="color: #000000;">bCellToolTip</span> := <span style="color: #000000;">&#123;</span> |oCol| <span style="color: #ff0000;">"My ToolTip"</span> <span style="color: #000000;">&#125;</span>    <br />end<br /> </div>[/code:30k5v2fn] I would like there to be a sign in those cells or column with tooltips like excel with comment (see example below): [url=https&#58;//imgur&#46;com/35PuOI6:30k5v2fn][img:30k5v2fn]http&#58;//i&#46;imgur&#46;com/35PuOI6&#46;png[/img:30k5v2fn][/url:30k5v2fn]
xbrowse and tooltip
[url:2aelngno]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=34047[/url:2aelngno] Regards, saludos.
xbrowse and tooltip
// C:\FWH\SAMPLES\TOOLTCOL.PRG [code=fw:17q65t71]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> TestTip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oFont, oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nMilliSeconds := <span style="color: #000000;">32767</span><br /><br /><br />&nbsp; &nbsp;USE CUSTOMER<br /><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;">600</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span><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;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"CUSTOMER"</span> <span style="color: #0000ff;">AUTOCOLS</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/*<br />&nbsp; &nbsp;oBrw:bToolTips &nbsp; := ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }<br />&nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bCellToolTips</span> := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// yes</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oBrw:bCellToolTips := { |o| { o:Value, nil, nil, nil, nil, nil, nMilliSeconds } } &nbsp;// yes</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// { uToolTip, cTitle, choIcon, clrFore, clrBack, nWidth, nDelayTime}</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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 /><br /><span style="color: #B900B9;">//----------------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> MyColToolTip<span style="color: #000000;">&#40;</span> oBrw, r, c, f, oMouseCol, nMouseRow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> uBm, uVal<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMouseRow != oBrw:<span style="color: #000000;">nRowSel</span><br />&nbsp; &nbsp; &nbsp; uBm &nbsp; := oBrw:<span style="color: #000000;">BookMark</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bSkip</span>, nMouseRow - oBrw:<span style="color: #000000;">nRowSel</span> <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; uVal &nbsp;:= oMouseCol:<span style="color: #000000;">Value</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">BookMark</span> := uBm<br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; uVal &nbsp;:= oMouseCol:<span style="color: #000000;">Value</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cValToChar<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:17q65t71] Regards, saludos.
xbrowse and tooltip
hi karinha what I would like is the dot red in the cell with tooltip. My xbowse has 35 column and tooltip could be in 1 or 3 or 10 or 15 column (it's a random) when the users open xbrowse he doesn't know where the tooltip is. the excel example (dot red into the of C column) could be a solution. thanks
xbrowse and tooltip
The Red dot would be a extra element into the cell.... Mr. Rao will know the possibilities. But this is also a option. 1 Coloring the cell like in this post : <!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=40217&hilit=cellborder">viewtopic.php?f=3&t=40217&hilit=cellborder</a><!-- l --> I didn't look the tread, but I would look into it. Maybe the colored box can be changed in layout like you would. 2 If the browse is not to big, create 1 png with the data of the cell and combine a transparent png with the red dot in upper right. Use this pics to browse, but it will slow down stuff (just a idea) With option 1 your customer will see cellborders changed when tooltip data is there. Just a idea )))
xbrowse and tooltip
You can combine text and an image in a cell. [code=fw:25mdfp8u]<div class="fw" id="{CB}" style="font-family: monospace;">:<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;">bStrData</span>:=<span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#125;</span><br />&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;">nDataBmpAlign</span>:=AL_RIGHT <br />&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;">bBmpData</span><span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#125;</span></div>[/code:25mdfp8u]
xbrowse array autosort problem
Hello I need to sort a column of a xbrowse "at startup" as descending, I am browsing an array The bitmap (for ascending, descending) is showing "descending" for the column but the column is not sorted This is the code below , Thanks for the help, [code=fw:22wn3kob]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> ODLG ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLUMNS <span style="color: #000000;">2</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">7</span>,<span style="color: #000000;">11</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">13</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADERS <span style="color: #ff0000;">"Date"</span> + CRLF + <span style="color: #ff0000;">"Facture"</span>, <span style="color: #ff0000;">"Fournisseur"</span>,<span style="color: #ff0000;">"N°"</span> + CRLF + <span style="color: #ff0000;">"Facture"</span>,<span style="color: #ff0000;">"Date"</span> + CRLF + <span style="color: #ff0000;">"Echéance"</span>,<span style="color: #ff0000;">"Date"</span> + CRLF + <span style="color: #ff0000;">"Paiement"</span>,<span style="color: #ff0000;">"Total"</span> + CRLF + <span style="color: #ff0000;">"TTC"</span>,<span style="color: #ff0000;">"Total"</span> + CRLF + <span style="color: #ff0000;">"Acomptes"</span>,<span style="color: #ff0000;">"Solde"</span>,<span style="color: #ff0000;">"Motif"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FOOTERS ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FONT</span> aFont ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLORS <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_BLUE, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;colsizes asize ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;array TVISU lines AUTOSORT<br /><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">'D'</span> &nbsp; <span style="color: #B900B9;">// this is not working</span><br /><br />&nbsp;</div>[/code:22wn3kob]
xbrowse array autosort problem
Instead of [code=fw:nu2i62nk]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">'D'</span>   <span style="color: #B900B9;">// this is not working</span></div>[/code:nu2i62nk] Remove the above line and Substitute with [code=fw:nu2i62nk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// This works</span><br /> </div>[/code:nu2i62nk]
xbrowse array autosort problem
Thank you Mr Rao in order to have it descending , the following is needed also oBrw:aCols[01]:CSORTOrder := 'D'
xbrowse array autosort problem
[quote="Richard Chidiak":3jznt493]Thank you Mr Rao in order to have it descending , the following is needed also oBrw:aCols[01]:CSORTOrder := 'D'[/quote:3jznt493] NO PLEASE. The solution I provided works correctly and that is the only way. oCol:cSortOrder ( in case of arrays ) is the array element number on which to sort but not 'D' or 'A'. oCol:cSort holds if it is "A" or "D", after it sorts in ascending or descending order. Let xBrowse handle this internally and let us not confuse xBrowse by handling this directly. oCol:SetOrder() sorts the column, switching ascending to descending and vice-versa. When the browse is defined with AUTOSORT, the browse has already sorted on ascending order of first column. When we call aCols[1]:SetOrder(), it sorts in descending order because it is already sorted in the ascending order. Adopting my solution will give you the result required by you and please do not touch cSortOrder or cSort.
xbrowse array autosort problem
You are right sorting arrays confused me a bit , Can you please review the seekonarray function , in case of non sequential columns (like in my sample) the following line will cause an error in this case, i have commented it as i always need to seek on upper values if ! ::aCols[ nCol ]:lCaseSensitive // we get out of range in this case Thank you for your help Richard
xbrowse array autosort problem
[quote:1aewgno7]Adopting my solution will give you the result required by you and please do not touch cSortOrder or cSort.[/quote:1aewgno7] This is why instance vars such as these should be READONLY or even HIDDEN--so we can't mess with them. Regards, James
xbrowse array autosort problem
[quote="Richard Chidiak":3nvitqct]You are right sorting arrays confused me a bit , Can you please review the seekonarray function , in case of non sequential columns (like in my sample) the following line will cause an error in this case, i have commented it as i always need to seek on upper values if ! ::aCols[ nCol ]:lCaseSensitive // we get out of range in this case Thank you for your help Richard[/quote:3nvitqct] Mr. Richard You are right. For the time being, it is better to comment out this if .... and corresponding endif.
xbrowse array autosort problem
Mr Rao , i already did when browsing an empty array with autosort, it errors, the correct fix for this is in the method setarray And again when a column has no header or ablank header (only in browsing arrays) , xbrowse shows a character for the header, i go around this by setting a non visible char for the header.... Thank you for your help, Richard [code=fw:so62jsoq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;if lAutoOrder </span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lAutoOrder .AND. ! Empty<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// this line in replacement of the above</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">DEFAULT</span> nColOrder := ::<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;">nArrayCol</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span>|oCol| oCol:<span style="color: #000000;">cSortOrder</span> := oCol:<span style="color: #000000;">nArrayCol</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">nArrayCol</span> == nColOrder, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>oCol:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">'D'</span>, oCol:<span style="color: #000000;">SortArrayData</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">'D'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">SortArrayData</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp;</div>[/code:so62jsoq]
xbrowse array autosort problem
Mr Richard [quote:16nd0xoq]when browsing an empty array with autosort, it errors, the correct fix for this is in the method setarray [/quote:16nd0xoq] You are right. This needs to be fixed. Better fix seems to be [code=fw:16nd0xoq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span></div>[/code:16nd0xoq] [quote:16nd0xoq] And again when a column has no header or ablank header (only in browsing arrays) , xbrowse shows a character for the header, i go around this by setting a non visible char for the header.... [/quote:16nd0xoq] If defining the browse in command mode, we may specify "" or " " in the HEADERS clause for the columns with blank headers. Or after creating the browse, we may assign oCol:cHeader := '' or ' ' or nil
xbrowse array autosort problem
Mr Rao oBrwI:aCols[01]:SETORDER() is working as expected , in my case the column is reversed to descending mode and this is what i want Nevertheless, adding a new entry to the array of the browse will place the entry at the end of the list (not where it should be), i issue a obrw:refresh(.t.)after adding the entry. if i reset a oBrwI:aCols[01]:SETORDER() before the refresh , then the line is placed correctly The problem is that the sort order is reversed to ascending in this case... any clue ? Thank you for your help Richard
xbrowse array autosort problem
Please do this after adding a new line: [code=fw:1tjr15mn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">cOrder</span> := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> :<span style="color: #000000;">cOrder</span> == <span style="color: #ff0000;">'A'</span>, <span style="color: #ff0000;">'D'</span>, <span style="color: #ff0000;">'A'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />END<br />oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1tjr15mn]
xbrowse array autosort problem
thank you Is there a way to know what was the column sorted by the user ? I am using AUTOSORT and it could be any column, i need to refresh the "last sorted column"
xbrowse array autosort problem
[code=fw:36gj8qoe]<div class="fw" id="{CB}" style="font-family: monospace;">nSortedCol := AScan<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| !Empty<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">cOrder</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />oSortedCol := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nSortedCol > <span style="color: #000000;">0</span>, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> nSortedCol <span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span></div>[/code:36gj8qoe]
xbrowse array autosort problem
that does the job, thank you Don't you think this code should be included in the refresh method when browsing arrays with autosort ?
xbrowse array autosort problem
[quote="Richard Chidiak":2lar92bk]that does the job, thank you Don't you think this code should be included in the refresh method when browsing arrays with autosort ?[/quote:2lar92bk] Sorting an array does consume some time, small or more, depending on the array size. Resorting is necessary only when a Row is added, which is not always the case. In the life-cycle of a large software this may become necessary in less than fraction of the total refreshes. It is therefore desirable for the programmer to handle it.
xbrowse array autosort problem
i agree it has to be sorted also when updating the array in case the "sorting criteria" got updated like dates etc... It is not a problem to be handled by the program
xbrowse array autosort problem
[quote="Richard Chidiak":ck06z1lr]i agree it has to be sorted also when updating the array in case the "sorting criteria" got updated like dates etc... It is not a problem to be handled by the program[/quote:ck06z1lr] Yes. This can be done and good if it is done. XBrowse now handles updating non-array datasources when a column updated is sorted. This behavior should be extended to arrays too. Good suggestion.
xbrowse array que solo muestre algunas columnas
hola. Si defino de esta manera mi xbrowse [code=fw:g8cr4rv2]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;oBrw:= TXBROWSE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">setArray</span><span style="color: #000000;">&#40;</span>aComputistas<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oBrw<br /><br />&nbsp; &nbsp; &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;<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;<span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">191</span>, <span style="color: #000000;">191</span>, <span style="color: #000000;">255</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 /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bClrRowFocus</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_WHITE<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">22</span></div>[/code:g8cr4rv2] como hago para que (mi array tiene 3 columnas) el xbrowse no muestre (ni presionando el boton derecho dle mouse sobre el encabezado) una de las columnas? gracias.
xbrowse array que solo muestre algunas columnas
[quote="goosfancito":34n2pwo5]hola. Si defino de esta manera mi xbrowse [code=fw:34n2pwo5]<div class="fw" id="{CB}" style="font-family: monospace;">  oBrw:= TXBROWSE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />      oBrw:<span style="color: #000000;">setArray</span><span style="color: #000000;">&#40;</span>aComputistas<span style="color: #000000;">&#41;</span><br /><br />      WITH OBJECT oBrw<br /><br />         :<span style="color: #000000;">bClrStd</span>    := <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 />                   <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 />                   <span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">191</span>, <span style="color: #000000;">191</span>, <span style="color: #000000;">255</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 /><br />         :<span style="color: #000000;">bClrRowFocus</span>     := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_WHITE<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />         :<span style="color: #000000;">nMarqueeStyle</span>       := <span style="color: #000000;">5</span><br /><br />         :<span style="color: #000000;">nRowHeight</span>          := <span style="color: #000000;">22</span></div>[/code:34n2pwo5] como hago para que (mi array tiene 3 columnas) el xbrowse no muestre (ni presionando el boton derecho dle mouse sobre el encabezado) una de las columnas? gracias.[/quote:34n2pwo5] Hola Goosfancito buenos dias, como estas, para ocultar columnas, es asi con esta instruccion: [b:34n2pwo5]oBrw:aCols[7]:lHide = .T. //Oculta columna 7[/b:34n2pwo5] Saludos y buen dia.! Atte: Adrian C. C.
xbrowse array que solo muestre algunas columnas
[quote:fxte7mrf]... (ni presionando el boton derecho dle mouse sobre el encabezado) [/quote:fxte7mrf] Hola, ademas de lo que indica Adrian... [code=fw:fxte7mrf]<div class="fw" id="{CB}" style="font-family: monospace;">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;">bRClickHeader</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span></div>[/code:fxte7mrf] Saludos.
xbrowse array que solo muestre algunas columnas
[quote="FranciscoA":c7w501ae][quote:c7w501ae]... (ni presionando el boton derecho dle mouse sobre el encabezado) [/quote:c7w501ae] Hola, ademas de lo que indica Adrian... [code=fw:c7w501ae]<div class="fw" id="{CB}" style="font-family: monospace;">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;">bRClickHeader</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span></div>[/code:c7w501ae] Saludos.[/quote:c7w501ae] Gracias Francisco, esta instruccion me faltaba ocultar columnas al darle click derecho. Saludos . Atte: Adrian C. C.
xbrowse array que solo muestre algunas columnas
Yo uso esto para que no aparezcan los nombres de las columnas y para que no se puedan intercambiar, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> :lAllowColHiding := .f. :lAllowColSwapping := .f. usando bRClickHeader creo no podras usar boton derecho para alguna otra cosa sobre las columnas, es solo suposicion, nunca lo he usado, solo los que nombre antes.
xbrowse array que solo muestre algunas columnas
ya que estamos... como saco el borde este que me hace en el xbrowse por recursos, le puse un codigo que encontre de Style y me saca los scrooll (que es lo que queria hacer) pero me pone ese borde que no lo quiero. [url:15jdzn1k]http&#58;//1drv&#46;ms/1o552FZ[/url:15jdzn1k] gracias.
xbrowse array que solo muestre algunas columnas
Goosfancito Si usas WorkShop: Al hacer doble clic sobre el recurso se abre la ventana Windows Style En el cuadro Frame Style, seleccionas [b:1tr7lkrm]No border[/b:1tr7lkrm] En el cuadro Dialog Style, quitas el tilde a [b:1tr7lkrm]Thickf frame[/b:1tr7lkrm] y a [b:1tr7lkrm]Modal frame[/b:1tr7lkrm] Si usas PellesC... estoy en el horno <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xbrowse array que solo muestre algunas columnas
uso pelles C jajaja
xbrowse array que solo muestre algunas columnas
Con PellesC, intenta asi: Window Styles 0x50310000
xbrowse array que solo muestre algunas columnas
bien. Saco el borde. ahora a pelear de nuevo con el scrooll (no lo quiero) pero gracias es un gran avance.
xbrowse array vacio
Hola foro, El problema es que tengo un xbrowse desde recursos con un array vacio y no funciona, si le agrego un registro si funciona. Entiendo que no tiene registros y por lo tanto no tiene columnas, pero como solucionarlo]? [code=fw:2g0rbqge]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />aLealtad := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOGO_L"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw := 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> oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aLealtad</span>, .F. &nbsp;<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp; &nbsp;:= MARQSTYLE_HIGHLROW<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nColDividerStyle</span> &nbsp; := LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nRowDividerStyle</span> &nbsp; := LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nStretchCol</span> &nbsp; &nbsp; &nbsp; &nbsp;:= STRETCHCOL_LAST<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">lFooter</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">lUpdate</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nHeaderHeight</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">24</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">lAllowRowSizing</span> &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">lAllowColSwapping</span> &nbsp;:= .F.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">50</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Folio"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<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;">nHeadStrAlign</span> := AL_CENTER<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">250</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Nombre"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Puntos"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">nFooterType</span> &nbsp; := AGGR_SUM<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">nFootStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">nDataStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xBrw:<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;">cEditPicture</span> &nbsp;:= <span style="color: #ff0000;">'999,999'</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> xBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">lAllowSizing</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">300</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br />&nbsp;</div>[/code:2g0rbqge] Parece que desde codigo con un array vacio no hay problema... Saludos
xbrowse array vacio
[quote="Francisco Horta":ziepokwv]Hola foro, El problema es que tengo un xbrowse desde recursos con un array vacio y no funciona, si le agrego un registro si funciona. Entiendo que no tiene registros y por lo tanto no tiene columnas, pero como solucionarlo]? [code=fw:ziepokwv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />aLealtad := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOGO_L"</span><br /><br />                  xBrw := 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> oDlg <span style="color: #000000;">&#41;</span><br /><br />                xBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aLealtad</span>, .F.  <span style="color: #000000;">&#41;</span><br /><br />                xBrw:<span style="color: #000000;">nMarqueeStyle</span>      := MARQSTYLE_HIGHLROW<br />                xBrw:<span style="color: #000000;">nColDividerStyle</span>   := LINESTYLE_LIGHTGRAY<br />                xBrw:<span style="color: #000000;">nRowDividerStyle</span>   := LINESTYLE_LIGHTGRAY<br />                xBrw:<span style="color: #000000;">nStretchCol</span>        := STRETCHCOL_LAST<br />                xBrw:<span style="color: #000000;">lFooter</span>            := .T.<br />                xBrw:<span style="color: #000000;">lUpdate</span>            := .T.<br />                xBrw:<span style="color: #000000;">nHeaderHeight</span>      := <span style="color: #000000;">30</span><br />                xBrw:<span style="color: #000000;">nRowHeight</span>         := <span style="color: #000000;">24</span><br />                xBrw:<span style="color: #000000;">lAllowColHiding</span>    := .F.<br />                xBrw:<span style="color: #000000;">lAllowRowSizing</span>    := .F.<br />                xBrw:<span style="color: #000000;">lAllowColSwapping</span>  := .F.<br /><br />               xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">50</span><br />               xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>       := <span style="color: #ff0000;">"Folio"</span><br />               xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />               xBrw:<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;">nHeadStrAlign</span> := AL_CENTER<br /><br />              xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">250</span><br />              xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>       := <span style="color: #ff0000;">"Nombre"</span><br />              xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br />              xBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /><br />              xBrw:<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;">nWidth</span>        := <span style="color: #000000;">60</span><br />              xBrw:<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;">cHeader</span>       := <span style="color: #ff0000;">"Puntos"</span><br />              xBrw:<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;">nFooterType</span>   := AGGR_SUM<br />              xBrw:<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;">nFootStrAlign</span> := AL_RIGHT<br />              xBrw:<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;">nDataStrAlign</span> := AL_RIGHT<br />              xBrw:<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;">cEditPicture</span>  := <span style="color: #ff0000;">'999,999'</span><br /><br />             xBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />            AEval<span style="color: #000000;">&#40;</span> xBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">lAllowSizing</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />           xBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">300</span><span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br /> </div>[/code:ziepokwv] Parece que desde codigo con un array vacio no hay problema... Saludos[/quote:ziepokwv]A mi mismo SOLUCIONADO !! me faltaba xBrw:AddCol() saludos
xbrowse array vacio
[code=fw:16evdi84]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> BlankArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aLealtad := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, xBrw, oFont<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;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG_1"</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> xBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aLealtad ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"Folio"</span>, <span style="color: #ff0000;">"Nombre"</span>, <span style="color: #ff0000;">"Puntos"</span> ;<br />&nbsp; &nbsp; &nbsp; PICTURES <span style="color: #ff0000;">"999"</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"999,999"</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES FOOTERS <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;xBrw:<span style="color: #000000;">cDataTypes</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #ff0000;">'N'</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;xBrw:<span style="color: #000000;">nHeadStrAligns</span> &nbsp; &nbsp; := AL_CENTER<br />&nbsp; &nbsp;xBrw:<span style="color: #000000;">Puntos</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br />&nbsp; &nbsp;xBrw:<span style="color: #000000;">nStretchCol</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// other settings</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> xBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span><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 />&nbsp;</div>[/code:16evdi84]
xbrowse array vacio
Thanks Rao, is correct Regards Paco
xbrowse array y radiobutton...
Se puede? arme un xbrowse q maneja un array, la columna 1 son texto y la 2 debe ser un radiobutton. se puede hacer eso? como? gracias.
xbrowse arreglos de bugs!
Despues de probar el código que hemos publicado aqui: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=15936">viewtopic.php?f=6&t=15936</a><!-- l --> hemos detectado unos errores en la Clase TXBrowse que hay que arreglar asi: 1) Method End() tiene que ser renombrado como Destroy(). Estaba mal. Y finalmente llamar a return Super:Destroy() 2) Este código es necesario en Method CreateButtons() antes de @ ..., ... : [code=fw:272tpfzr]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBtnList</span> != <span style="color: #00C800;">nil</span><br />         ::<span style="color: #000000;">oBtnList</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span>   <br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBtnElip</span> != <span style="color: #00C800;">nil</span><br />         ::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span>  <br /> </div>[/code:272tpfzr] 3) En la función TXBrows() el browse no se destruía: [code=fw:272tpfzr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> bChild <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span><br />      bXBr:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      bXBr := bChild<br />   <span style="color: #00C800;">endif</span><br /> </div>[/code:272tpfzr] 4) PalBmpFree() no está funcionando bien. Hay que añadir esta función: [code=fw:272tpfzr]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00C800;">function</span> PalBmpFree<span style="color: #000000;">&#40;</span> hBmp, hPal <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hPal <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:272tpfzr]
xbrowse arreglos de bugs!
Otro bug arreglado: [code=fw:2csoa7z7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrwColumn<br /><br />...<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aBitmaps</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; PalBmpFree<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aBitmaps</span><span style="color: #000000;">&#91;</span> nFor, BITMAP_HANDLE <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aBitmaps</span><span style="color: #000000;">&#91;</span> nFor, BITMAP_PALETTE <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2csoa7z7]
xbrowse arreglos de bugs!
He detectado un mal funcionamiento el el xbrowse que se produce en las siguientes circunstancias Cuando un xbrowse tiene columnas ocultas, y el resto de las columnas no caben en el browse (es decir tiene columnas por la derecha fuera del espacio del control) al desplazarse con los metodos goRight y goLeft el comportamiento no es correcto y vuelve a la primera columna. Por ejemplo: Al programa xbposte.prg del directorio de ejemplos le oculto las dos primeras columnas y redefino los ancho de las columnas 3 y 4 .... [code=fw:1jlnplvs]<div class="fw" id="{CB}" style="font-family: monospace;"><br />....<br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hIDE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hIDE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ObRW:<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;">nWidth</span> := <span style="color: #000000;">280</span><br />   ObRW:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">150</span><span style="color: #000000;">&#91;</span>   <span style="color: #000000;">&#91;</span>/b<span style="color: #000000;">&#93;</span>   <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">window</span> oWnd <br /> </div>[/code:1jlnplvs] y al movernos por las celdas hacia la derecha cuando estamos en la columnas 4 en lugar de moverse hacia la cinco vuelve a la tres. e izquierda se puede comprobar este mal comportamiento
xbrowse autosort
Hello, I need to set autosort feature later. I do oBrowse:lAutoSort := .T., but in xbrowse.prg it says as a comment: [quote:1vica76w] // used internally. do not use in applications[/quote:1vica76w] Is it safe to use?. Thank you.
xbrowse autosort
[quote:86l2zlv3]Is it safe to use?.[/quote:86l2zlv3] This data is used internally and temporarily till creation of the browse. Once the browse is created, changing this value has no effect. For now I have this suggestion: In the method SetOrder() of TXBrwColumn Substitute this line at the beginning of the method [code=fw:86l2zlv3]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">cSortOrder</span> != <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:86l2zlv3] with [code=fw:86l2zlv3]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lAutoSort</span> .and. ::<span style="color: #000000;">cSortOrder</span> != <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:86l2zlv3] First create the browse with AUTOSORT clause. And later toggle oBrw:lAutoSort := .t. or .f. whenever you want. This feature is being provided in FWH13.05 whether or not the browse is created with AUTOSORT initially.
xbrowse autosort
Mr Nages, As I can use incremental seek with tdolphin ? Thank you.