topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xBrowse Incremental Search | Using the old tSBrowse, I could use the following code to set the order for the browse. Then with the browse displayed, I could simply start typing to get the database to reposition ... no field was necessary.
This is the last step I need to accomplish to convert to xBrowse. My question is how can I do an incremental search for a displayed browse in xBrowse without having to provide an actual input box ?
Here is all I have to do in tsBrowse:
oBrw:nColOrder := 0
oBrw:aColumns[1]:cOrder := "einnum" // Part number
oBrw:SetOrder(1)
If I was working on the values in column 2, I would just set that value. |
xBrowse Incremental Search | Tim,
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=81520#p81520">viewtopic.php?p=81520#p81520</a><!-- l --> |
xBrowse Initial edit values | Hi Guys,
Is there some way to define an initial value for a xbrowse column, IF a cell of this column is edited ?
I have tried with bEditValue, but don't work... |
xBrowse Initial edit values | [code=fw:3scc4f9c]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oBrw<br /><br /> USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED<br /><br /> <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;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<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;">"CUST"</span> ;<br /> COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span>, <span style="color: #ff0000;">"SALARY"</span> ;<br /> CELL LINES FASTEDIT NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> WITH OBJECT :<span style="color: #000000;">Salary</span><br /> :<span style="color: #000000;">bOnPreEdit</span> := <span style="color: #000000;">{</span> |o| o:<span style="color: #000000;">oEditGet</span>:<span style="color: #000000;">cText</span> := <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> END<br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3scc4f9c] |
xBrowse Initial edit values | Thank you <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> |
xBrowse Left double click | I see this is defined
[code:1ro73kqm]oBrw1:aCols[1]:blDClickData := {|r,c,f,o| Msginfo("Left double click on column data " + o:cHeader, "TXBrowse power") }[/code:1ro73kqm]
Is it also possible to make ONE statement for a left double click on a row.
So I do not have add that line for every column
Thanks,
Willy |
xBrowse Left double click | Willy:
Pls try this way:
oBrw1:blDblClick := { | nRow, nCol, nKey | YourFunction()}
Regards |
xBrowse Left double click | HelloArmando,
I've tried this (I thought) and it did'nt work. Now it does. I must have forgotten someting simple.
Thanks,
Willy |
xBrowse LookUp | Hi All,
Sorry with my english.
To [b:2cygysd3]Mr.Antonio,[/b:2cygysd3] or [b:2cygysd3]Mr. Nages[/b:2cygysd3]
2 day ago, I has download FTDN (FWH 13.02)
the version in file Fivewin.ch is 13.02, but if I get error in my code, the error show version : 12.08..
[code=fw:2cygysd3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">e</span>:\KSK12\flookup.exe <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">032</span> bytes<br /> Compiler version: <span style="color: #000000;">xHarbour</span> build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Rev. <span style="color: #000000;">9656</span><span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">12.08</span><br /> Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7600</span> <br /> </div>[/code:2cygysd3]
I have a problem in the incremental search with RecordSet. if using Array or DBF file with mall record. this program is not problem.
My problem like this:
database: Oracle, table containing 172,212 records.
I want to create lookup table from RecordSet.
if i just press Up, Down, PgUp, PgDn the browse is normal,
but if I type a word like '20.2' or a 'desctription' , the result like delayed and if I press BackSpace, the dialog is not respons... and then... BLANK BROWSE..
my code like this, i get it from FWH\Samples, just litle change.
[code=fw:2cygysd3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br /> fLookUp.prg<br />*/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> tbl_ackode<span style="color: #000000;">(</span> nnTop, nnLeft <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, nWild := <span style="color: #000000;">2</span><br /> <span style="color: #00C800;">local</span> cList, aFlds, aHdrs<br /> <span style="color: #00C800;">local</span> nTop, nLeft, nBott, nRight<br /> <span style="color: #00C800;">local</span> lRet := .F., osay1, osay2<br /><br /> <span style="color: #00C800;">local</span> get_data, ckode, cket, clvl, cgd, cdk<br /> <span style="color: #00C800;">local</span> oRsAcct := open_rs<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> nTop := <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> empty<span style="color: #000000;">(</span> nnTop <span style="color: #000000;">)</span>, <span style="color: #000000;">150</span>, nnTop <span style="color: #000000;">)</span><br /> nLeft := <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> empty<span style="color: #000000;">(</span> nnLeft <span style="color: #000000;">)</span>, <span style="color: #000000;">150</span>, nnLeft <span style="color: #000000;">)</span><br /> nBott := nTop + <span style="color: #000000;">450</span><br /> nRight := nLeft + <span style="color: #000000;">750</span><br /><br /> ofont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Segoe UI Light"</span>,,<span style="color: #000000;">-12</span>, .F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">FROM</span> nTop, nLeft <span style="color: #0000ff;">TO</span> nBott, nRight <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_WHITE, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">190</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> cList := <span style="color: #ff0000;">"KODE,PERKIRAAN,LVL,GD,DK,REFF"</span><br /> aFlds := aHdrs := HB_ATokens<span style="color: #000000;">(</span> cList, <span style="color: #ff0000;">','</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">34</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 /> COLUMNS aFlds HEADERS aHdrs ;<br /> RECORDSET orsAcct <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT CELL LINES NOBORDER ;<br /> <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">(</span> eval<span style="color: #000000;">(</span> get_data <span style="color: #000000;">)</span> ,;<br /> lRet := .T., ;<br /> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> get_data := <span style="color: #000000;">{</span>|| ckode := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> ,;<br /> cket := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> ,;<br /> clvl := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> ,;<br /> cgd := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span> ,;<br /> cdk := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oBrw<br /><br /> with object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">80</span><br /> end<br /> with object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">200</span><br /> end<br /> with object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">50</span><br /> end<br /> with object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">80</span><br /> end<br /> with object oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">80</span><br /> end<br /><br /> :<span style="color: #000000;">lIncrFilter</span> := .T.<br /> :<span style="color: #000000;">lSeekWild</span> := <span style="color: #000000;">(</span> nWild == <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cFilterFld</span> := <span style="color: #ff0000;">"KODE"</span><br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_WIDEST<br /> :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> :<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> :<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">5</span><br /> :<span style="color: #000000;">lRecordSelector</span> := .F.<br /> :<span style="color: #000000;">lHScroll</span> := .T.<br /> :<span style="color: #000000;">lVScroll</span> := .T.<br /><br /> :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">{</span>|nKey| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nKey == VK_RETURN, <span style="color: #000000;">(</span> eval<span style="color: #000000;">(</span> get_data <span style="color: #000000;">)</span> , lRet := .T. , oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> END<br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> osay1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Filter:"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">190</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oBrw:<span style="color: #000000;">cFilterFld</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> aHdrs ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">SAY</span> osay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Desc..."</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">190</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">COMBOBOX</span> nWild <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Start from..."</span>, <span style="color: #ff0000;">"Containing..."</span> <span style="color: #000000;">}</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lSeekWild</span> := <span style="color: #000000;">(</span> nWild == <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lSeekWild</span>, oBrw:<span style="color: #000000;">cSeek</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">24</span>,<span style="color: #000000;">10</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;">140</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_WHITE,RGB<span style="color: #000000;">(</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">190</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .f. <span style="color: #000000;">)</span><br /><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: #000000;">{</span> lRet, ckode, cket, clvl, cgd, cdk <span style="color: #000000;">}</span><br /><br /><br />* my table is in acct schema<br />*<br /><span style="color: #00C800;">static</span> func open_rs<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> ores, csql, oCon, cstring, txtPTLokasi := <span style="color: #ff0000;">"001007"</span><br /> cString := <span style="color: #ff0000;">"Provider=OraOLEDB.Oracle;Data Source=orcl;User ID=system;Password=itboss"</span><br /><br /> CursorWait<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oCon := CREATEOBJECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADODB.Connection"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">TRY</span><br /> oCon:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /> CATCH<br /> msgalert<span style="color: #000000;">(</span><span style="color: #ff0000;">"Error connection to Oracle"</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Cursor</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> quit<br /> END <span style="color: #00C800;">TRY</span><br /><br /> csql := <span style="color: #ff0000;">"select acct.ackode.kode, acct.ackode.ket as Perkiraan, acct.ackode.lvl, "</span> + ;<br /> <span style="color: #ff0000;">"case when acct.ackode.gd = 'G' then 'General' else 'Detail' end as GD, "</span> + ;<br /> <span style="color: #ff0000;">"case when acct.ackode.dk = 'D' then 'Debet' else 'Kredit' end as DK, "</span> + ;<br /> <span style="color: #ff0000;">"acct.ackode.reff, acct.acgroup.ket as ket_group "</span> + ;<br /> <span style="color: #ff0000;">"from acct.ACKODE "</span> + ;<br /> <span style="color: #ff0000;">"inner join acct.acgroup on acct.acgroup.kode = acct.ackode.grp "</span> + ;<br /> <span style="color: #ff0000;">"where acct.ackode.aktif = 'Y' and acct.ackode.ptlokasi = '"</span>+txtPTLokasi+<span style="color: #ff0000;">"' "</span> + ;<br /> <span style="color: #ff0000;">"order by kode"</span><br /> <span style="color: #00C800;">Try</span><br /> ores := FW_OpenRecordSet<span style="color: #000000;">(</span> oCon, cSql <span style="color: #000000;">)</span><br /> Catch<br /> msgalert<span style="color: #000000;">(</span><span style="color: #ff0000;">"Error opening RecordSet"</span><span style="color: #000000;">)</span><br /> quit<br /> End <span style="color: #00C800;">try</span><br /> *<br /> * RecordSet: <span style="color: #000000;">KODE</span> | PERKIRAAN | LVL | GD | DK | REFF | KET_GROUP<br /> * ----------------------------------------------------<br /> * <span style="color: #000000;">00001</span> test <span style="color: #000000;">1</span> General Debet test<br /> * <span style="color: #000000;">00002</span> test <span style="color: #000000;">2</span> General Debet <span style="color: #000000;">0001</span> test<br /> * <span style="color: #000000;">00003</span> test <span style="color: #000000;">3</span> General Debet <span style="color: #000000;">0002</span> test<br /> * ...<br /> *<br /> * total record : <span style="color: #000000;">172</span>,<span style="color: #000000;">212</span> records.<br /> *<br /><span style="color: #00C800;">return</span> ores<br /><br /> </div>[/code:2cygysd3]
I thing in older version, my code for lookup table is not problem...
some one can help me....?
Mulyadi.
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
Indonesia.
FWHX: 13.02 |
xBrowse LookUp | Mr. Nages.....?
Help me please..... |
xBrowse LookUp | [quote:2j53dcea]I have a problem in the incremental search with RecordSet. if using Array or DBF file with mall record. this program is not problem.
[/quote:2j53dcea]
You are right.
A small bug has crept in versions 12.12 to 13.02 in Incremental Seek of ADO only.
Please make this correction.
Please locate these lines in the xbrowse.prg
[code=fw:2j53dcea]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> AdoIncrSeek<span style="color: #000000;">(</span> uSeek <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /> <span style="color: #00C800;">local</span> lFound := .f.<br /> <span style="color: #00C800;">local</span> cCol := StrToken<span style="color: #000000;">(</span> ::<span style="color: #000000;">oRs</span>:<span style="color: #000000;">Sort</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> </div>[/code:2j53dcea]
Please make this correction
[code=fw:2j53dcea]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> AdoIncrSeek<span style="color: #000000;">(</span> uSeek <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /> <span style="color: #00C800;">local</span> lFound := .f.<br /> <span style="color: #00C800;">local</span> cCol := CharRem<span style="color: #000000;">(</span> <span style="color: #ff0000;">"[]"</span>, StrToken<span style="color: #000000;">(</span> ::<span style="color: #000000;">oRs</span>:<span style="color: #000000;">Sort</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// CORRECTION</span><br /> </div>[/code:2j53dcea]
After making this correction, please compile xbrowse.prg and link directly with your application.
Please let us know the results.
This is fixed in version 13.03.
[quote:2j53dcea]
version in file Fivewin.ch is 13.02, but if I get error in my code, the error show version : 12.08..
[/quote:2j53dcea]
Most likely your compile script may be referring to the old fwh\include folder of 12.08 version. Please check your compilation environment and settings. |
xBrowse LookUp | Mr. Nages
Many Thanks..
[b:4l2maq3n]Incremental Search with ADO:[/b:4l2maq3n]
with corrected that:
1. in the case with Incrementas Search, at least be helpedful effort.
before now, every we Click in the Column Header an then we typing a text to searhcing, as a result is Error.
and now this case is not error.
2. [b:4l2maq3n]the next Problem is[/b:4l2maq3n]: if we typing a text and then the text is not found in the criteria, so the [color=#0000BF:4l2maq3n]XBROWSE resulted a Blank Rows
and movement cursor is leaving off, with that BackSpace key not function[/color:4l2maq3n].
VERSION:
some day ago, I just buy version 13.02 and I dont have 12.08.. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
[b:4l2maq3n]XBROWSE[/b:4l2maq3n] Problem: Implementation from source code: XBINCFLT.PRG ( FWH\SAMPLES )
I already test with Array, Dbf and ADO(Oracle 10g.), the result like this:
1. just for display record direct from recordset for small or larget table, can be fast and quick.
2. searching:
- small record, the result is no problem. movement cursor fast and quick.
- [u:4l2maq3n]large record like 50000 or up, movement cursor at typing seeking for is very slow[/u:4l2maq3n].
NOW I applying and already migration to Oracle Database, not DBF file like previous.
DBF file just good for small record, if we have a record database is so big, DBF very many many many problem.. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
like DBF or Index file Corrupted, 'record not found' but actually the case is be present. etc.... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Thanks for helpfull effort and I waiting furthermore and when I be able to download 13.03...? <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Mulyadi
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
Indonesia
FWHX 13.02, BCC582. |
xBrowse LookUp | Good decision to move to Oracle.
I had experience in development of software with FWH+xHarbour+Oracle for a very large organisation.
One thing we should keep in mind while moving away from DBF ( or ADS ) to any other RDBS is that we can never have the comfort of browsing very large tables.
For example, we can comfortably offer browse of a million row table with ADS (DBF or ADT) but is just not possible with Oracle (or any similar RDBMS).
We need to manage with smaller and manageable subsets of the table for browses. You will yourself see when you go along.
You may notice that you will not find the kind of browses (grids) that we (clipper/harbour programmers) provide in the software prepared by others. |
xBrowse MARQSTYLE_HIGHLROW .. Rao | Rao
I am using a highlrow where the user can click on multiple xBrowse rows :
[img:2a22ikxy]http://i63.tinypic.com/16ghoxl.jpg[/img:2a22ikxy]
and I click Transfer .. I get the Bookmark array :
[img:2a22ikxy]http://i65.tinypic.com/2nvt7b7.jpg[/img:2a22ikxy]
[code=fw:2a22ikxy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------</span><br /><span style="color: #00C800;">Static</span> Func _TranAll<span style="color: #000000;">(</span> oRsInvt,oWnd,oLbxMain,oRsInvDetail,;<br /> oWndChildD,oRsInv,lTaxable,oTaxable,oFontB,oFontBig,nRepairNumber,;<br /> oLabor,oParts,oMisc,oTax,oTotal,nAssignedTo,cLoc,cTaxSet,;<br /> oOther,oSubtotal,oLbx,oBtn1,oBtn2,oBtn3,lIsTrucker <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Local</span> aCols,Saying,i<br /><br />aCols := oLbx:<span style="color: #000000;">aSelected</span><br /><br /><span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">)</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;">(</span>aCols<span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> _TransFer<span style="color: #000000;">(</span> oRsInvt,oWnd,oLbxMain,oRsInvDetail,;<br /> oWndChildD,oRsInv,@lTaxable,oTaxable,oFontB,oFontBig,nRepairNumber,;<br /> oLabor,oParts,oMisc,oTax,oTotal,nAssignedTo,cLoc,cTaxSet,;<br /> oOther,oSubtotal,oLbx,oBtn1,oBtn2,oBtn3,lIsTrucker <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">(</span><span style="color: #00C800;">nil</span><span style="color: #000000;">)</span><br /> </div>[/code:2a22ikxy]
You will notice I am looping through the array, but unfortunitly the the bookmark does not move to the correct data row and I get the same Data twice:
First Bookmark:
[img:2a22ikxy]http://i65.tinypic.com/312z81c.jpg[/img:2a22ikxy]
Second Bookmark:
[img:2a22ikxy]http://i67.tinypic.com/xaph7m.jpg[/img:2a22ikxy]
Final transfer to invoice:
[img:2a22ikxy]http://i63.tinypic.com/svi3w2.jpg[/img:2a22ikxy]
How can I force looping through the BookMark array to move the record pointer to the correct data line ?
Rick Lipkin |
xBrowse MARQSTYLE_HIGHLROW .. Rao | Instead of
oLbx:BookMark(aCols[i])
Please use oLbx:BookMark := aCols[i]
Actually, the entire process can be simplified.
After the user selects some rows, ..
[code=fw:317xt6e8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nSavePos := oRs:<span style="color: #000000;">AbsolutePosition</span><br />oRs:<span style="color: #000000;">Filter</span> := oBrw:<span style="color: #000000;">aSelected</span><br />aSelectedData := oBrw:<span style="color: #000000;">GetRows</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oRs:<span style="color: #000000;">Filter</span> := <span style="color: #ff0000;">""</span><br />oRs:<span style="color: #000000;">AbsolutePosition</span> := nSavePos<br />oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />XBROWSER aSelectedData <span style="color: #B900B9;">// use this data as u like</span><br /> </div>[/code:317xt6e8] |
xBrowse MARQSTYLE_HIGHLROW .. Rao | Rao
Thank you Very Much oLbx:BookMark := aCols[i] worked perfect!
Rick Lipkin |
xBrowse MakeTotals on Array Column | To All
I am creating a complex array from multiple data sources .. the second array column is one of those columns I want to sum up on the column footer. All I know is the column is aPlan [2] Header "Origional Budget"
How can I use MakeTotals() from an array column ?
[code=fw:1cgv285u]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// project plan ---------------------------</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLbx3 ;<br /> ARRAY aPlan ; <br /> HEADERS <span style="color: #ff0000;">"Budget Item"</span>, ;<br /> <span style="color: #ff0000;">"Origional_Budget"</span>, ;<br /> <span style="color: #ff0000;">"Budget Revision"</span>, ;<br /> <span style="color: #ff0000;">"Current Budget"</span>, ;<br /> <span style="color: #ff0000;">"Origional Contract"</span>, ;<br /> <span style="color: #ff0000;">"Contract Revisions"</span>, ;<br /> <span style="color: #ff0000;">"Current Committed"</span>, ;<br /> <span style="color: #ff0000;">"Pending Proposals"</span>, ;<br /> <span style="color: #ff0000;">"Potential Exposures"</span>, ;<br /> <span style="color: #ff0000;">"Potential Costs"</span>, ;<br /> <span style="color: #ff0000;">"Potential Proj Costs"</span> ;<br /> COLSIZES <span style="color: #000000;">200</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span> ; <span style="color: #B900B9;">// 11</span><br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">174</span> <span style="color: #0000ff;">of</span> oCust ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES<br /><br /> oLbx3:<span style="color: #000000;">lFooter</span> := .t.<br /> oCol := oLbx3:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> oCol:<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">{</span> || Ltrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbx3:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" / "</span> + LTrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbx3:<span style="color: #000000;">KeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbx3:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || oCol:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oLbx3<br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM <span style="color: #B900B9;">// <---------- here .. does not work</span><br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /><br /> oLbx3:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT <span style="color: #B900B9;">// orig budget</span><br /> oLbx3:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_RIGHT<br /><br /> oLbx3:<span style="color: #000000;">lRecordSelector</span> := .f.<br /><br /> </div>[/code:1cgv285u]
Thanks
Rick Lipkin |
xBrowse MakeTotals on Array Column | Rick
WITH OBJECT oLbx3
:aCols[2]:nFooterType := AGGR_TOTAL
END
ODLG:bSTART := { || Olbx3:MAKETOTALS(),Olbx3:SETFOCUS() }
Hth
Richard |
xBrowse MakeTotals on Array Column | To All
I found out that as I was creating my array I used the TransForm() function to format the amount which converted the value to character. I decided to use the PICTURE clause on the xBrowse Column and I achieved my desired results.
Thanks to everyone.
Rick Lipkin
[code=fw:3fxr3l9z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// project plan ---------------------------</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLbx3 ;<br /> ARRAY aPlan ;<br /> HEADERS <span style="color: #ff0000;">"Budget"</span>+CRLF+<span style="color: #ff0000;">"Item"</span>, ;<br /> <span style="color: #ff0000;">"Origional"</span>+CRLF+<span style="color: #ff0000;">"Budget"</span>, ;<br /> <span style="color: #ff0000;">"Budget"</span>+CRLF+<span style="color: #ff0000;">"Revision"</span>, ;<br /> <span style="color: #ff0000;">"Current"</span>+CRLF+<span style="color: #ff0000;">"Budget"</span>, ;<br /> <span style="color: #ff0000;">"Origional"</span>+CRLF+<span style="color: #ff0000;">"Contract"</span>, ;<br /> <span style="color: #ff0000;">"Contract"</span>+CRLF+<span style="color: #ff0000;">"Revisions"</span>, ;<br /> <span style="color: #ff0000;">"Current"</span>+CRLF+<span style="color: #ff0000;">"Committed"</span>, ;<br /> <span style="color: #ff0000;">"Pending"</span>+CRLF+<span style="color: #ff0000;">"Proposals"</span>, ;<br /> <span style="color: #ff0000;">"Potential"</span>+CRLF+<span style="color: #ff0000;">"Exposures"</span>, ;<br /> <span style="color: #ff0000;">"Potential"</span>+CRLF+<span style="color: #ff0000;">"Costs"</span>, ;<br /> <span style="color: #ff0000;">"Potential"</span>+CRLF+<span style="color: #ff0000;">"Project Costs"</span> ;<br /> COLSIZES <span style="color: #000000;">200</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span> ; <span style="color: #B900B9;">// 11</span><br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">"999,999,999.99"</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">174</span> <span style="color: #0000ff;">of</span> oCust ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES<br /><br /><br /> oLbx3:<span style="color: #000000;">lFooter</span> := .t.<br /> oCol := oLbx3:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> oCol:<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">{</span> || Ltrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbx3:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" / "</span> + LTrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbx3:<span style="color: #000000;">KeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbx3:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || oCol:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oLbx3<br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * :<span style="color: #000000;">bLClickFooter</span> := <span style="color: #000000;">{</span> |r,c,f,o| FooterAggrClick<span style="color: #000000;">(</span> r, c, f, o <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /><br /><br /> </div>[/code:3fxr3l9z]
[img:3fxr3l9z]http://i61.tinypic.com/2lcof2f.jpg[/img:3fxr3l9z] |
xBrowse MakeTotals() | Rao
I have a couple of questions for you .. here is my MakeTotals() and xBrowse Header code ..
[code=fw:326etm5y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLbxC ;<br /> RECORDSET oRsQuota ;<br /> COLUMNS <span style="color: #ff0000;">"PERSNO"</span>, ;<br /> <span style="color: #ff0000;">"EMPLOYEE"</span>, ;<br /> <span style="color: #ff0000;">"QUOTA"</span>, ;<br /> <span style="color: #ff0000;">"ENTITLEMENT"</span>, ;<br /> <span style="color: #ff0000;">"USED"</span>, ;<br /> <span style="color: #ff0000;">"REMONKEYDATE"</span> ;<br /> COLSIZES <span style="color: #000000;">122</span>,<span style="color: #000000;">190</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">120</span> ;<br /> HEADERS <span style="color: #ff0000;">"PersNo"</span>, ;<br /> <span style="color: #ff0000;">"Employee Name"</span>, ;<br /> <span style="color: #ff0000;">"Quota"</span>, ;<br /> <span style="color: #ff0000;">"Entitlement"</span>, ;<br /> <span style="color: #ff0000;">"Used"</span>, ;<br /> <span style="color: #ff0000;">"RemainderOnKeyDt"</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">133</span> <span style="color: #0000ff;">of</span> oGrps ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> FOOTERS LINES CELL<br /><br /> oLbxC:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> oLbxC:<span style="color: #000000;">lRecordSelector</span> := .f.<br /><br /> <span style="color: #B900B9;">// add columns</span><br /> ADD oCol2 <span style="color: #0000ff;">to</span> oLbxC <span style="color: #00C800;">AT</span> <span style="color: #000000;">7</span> <span style="color: #00C800;">DATA</span> <span style="color: #000000;">{</span>|x| x := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>oRsQuota:<span style="color: #000000;">Eof</span>, ,_ChkHours<span style="color: #000000;">(</span>oRsQuota:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"REMONKEYDATE"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span>;<br /> HEADER <span style="color: #ff0000;">"TotalDaysRemaining"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span><br /><br /> oLbxC:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">'Hours'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// column orientation</span><br /> oLbxC:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">7</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT <span style="color: #B900B9;">// days remaining</span><br /> oLbxC:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">7</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oLbxC:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /><br /> oLbxC:<span style="color: #000000;">lFooter</span> := .t.<br /> oCol1 := oLbxC:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> oCol1:<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">{</span> || Ltrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbxC:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" / "</span> + LTrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> oLbxC:<span style="color: #000000;">KeyCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbxC:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || oCol1:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oLbxC<br /> :<span style="color: #000000;">Entitlement</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">Used</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">RemainderOnKeyDt</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">TotalDaysRemaining</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /> </div>[/code:326etm5y]
Lets take the header RemainderOnKeyDt .. If I define the header as :
:Remainder On KeyDt:nFooterType := AGGR_SUM
The compiler errors .. I can not leave any spaces .. is there a work around that would let me use spaces in then xBrowse Column header ? .. Also I have created a 7th column that just returns a numeric value .. The bottom MakeTotal() is skewed off to the left .. is there a way to align the MakeTotal footer to align to the right ? ..
[img:326etm5y]http://i63.tinypic.com/20rll3r.jpg[/img:326etm5y]
Rick Lipkin |
xBrowse MakeTotals() | You can have the header as "Remainder On KeyDt" and still use "oBrw:RemainderOnKeyDt:nFooterType := AGGR_SUM" |
xBrowse MakeTotals() | Rao
Thanks .. how do I shift the last column TotalDaysRemaining maktotals() footer to the right ?
Rick Lipkin |
xBrowse MakeTotals() | nFootStrAlign |
xBrowse MakeTotals() | Rao
Thanks .. appreciate your Help!
Rick Lipkin |
xBrowse MakeTotals() not adding negative numbers | To All
I have an xBrowse that uses :MakeTotals() on the 'Balance' field and it was brought to my attention the total does not add up correctly when there is a negative number in the column ..
In the screenshot below there is one invoice ( on top ) with a positive value of $99.00 and one with a credit balance of -150.00 and the balance should be -51.00 not zero.
Thanks
Rick Lipkin
[code=fw:3rxtkhvh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLbxA ;<br /> RECORDSET oRsInvoice ;<br /> COLUMNS <span style="color: #ff0000;">"REPAIR NUMBER"</span>, ;<br /> <span style="color: #ff0000;">"TRANSACTION TYPE"</span>, ;<br /> <span style="color: #ff0000;">"INVOICED DATE"</span>, ;<br /> <span style="color: #ff0000;">"TOTAL"</span>, ;<br /> <span style="color: #ff0000;">"BALANCE"</span> ;<br /> COLSIZES <span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span> ;<br /> HEADERS <span style="color: #ff0000;">"Invoice #"</span>, ;<br /> <span style="color: #ff0000;">"Type"</span>, ;<br /> <span style="color: #ff0000;">"Date"</span>, ;<br /> <span style="color: #ff0000;">"Total"</span>, ;<br /> <span style="color: #ff0000;">"Balance"</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">132</span> <span style="color: #0000ff;">of</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> FOOTERS LINES CELL<br /><br /> oLbxA:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> oLbxA:<span style="color: #000000;">lRecordSelector</span> := .f.<br /><br /> WITH OBJECT oLbxA<br /> :<span style="color: #000000;">Balance</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /> </div>[/code:3rxtkhvh]
[img:3rxtkhvh]http://i60.tinypic.com/2ij6au8.jpg[/img:3rxtkhvh] |
xBrowse MakeTotals() not adding negative numbers | MakeTotals() does take into account both positive and negative values. Here is a small program to test.
[code=fw:3isfjrtz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br /> <span style="color: #00C800;">local</span> aData := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #000000;">1000</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Two"</span>, <span style="color: #000000;">-500</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Three"</span>, <span style="color: #000000;">200</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-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;">260</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /> @ <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 /> DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> ;<br /> LINES NOBORDER FOOTERS<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</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 /> </div>[/code:3isfjrtz]
[url=https://imageshack.com/i/p8fTvErBj:3isfjrtz][img:3isfjrtz]http://imagizer.imageshack.us/v2/xq90/908/fTvErB.jpg[/img:3isfjrtz][/url:3isfjrtz]
Please provide a small sample which we can compile and test at our end. |
xBrowse Melhoria FOOTER. | DATA lFootAlignBtn AS LOGICAL INIT .f. // Usado para alinhar o rodapé quando houver um botão (EDIT_GET_BUTTON)
METHOD PaintFooter( nRow, nCol, nHeight, lInvert ) CLASS TXBrwColumn
...
else
if SetAlpha() .and. aBitmap[ BITMAP_ALPHA ]
ABPaint( hDC, nBmpCol, nBmpRow, aBitmap[ BITMAP_HANDLE ], ::nAlphaLevelFooter )
else
DEFAULT aBitmap[ BITMAP_ZEROCLR ] := GetZeroZeroClr( hDC, aBitmap[ BITMAP_HANDLE ] )
SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
aBitmap[ BITMAP_ZEROCLR ], hDC, nBmpCol, nBmpRow, nBmpWidth( aBitmap[ BITMAP_HANDLE ] ),;
nBmpHeight( aBitmap[ BITMAP_HANDLE ] ) )
endif
endif
[b:3lbh7fe5]
elseif ::lFootAlignBtn .and. ;
::nEditType == EDIT_GET_BUTTON .and. ;
::nFootStrAlign == AL_RIGHT .and. ;
!Empty( aBitmap := ::aBitmap( ::nBtnBmp ) )
nWidth -= ( aBitmap[ BITMAP_WIDTH ] + 6 )
[/b:3lbh7fe5]
endif
if Empty( cFooter )
::oBrw:ReleaseDC()
return nil
endif
... |
xBrowse Memo MultiHeight | Saludos Foro
No se si ha implementado por aliguien esto, el MultiHeight.
Tengo documentos con detalles variables, que varian de 1 linea a 20 lineas que guardo en campos memo. |
xBrowse Memo MultiHeight | If you are asking if different rows can have different heights, it is not provided yet.
All rows have the same height. |
xBrowse Memo MultiHeight | Hola Mr. Rao
Si esa era mi pregunta, lei algo en el foro que quedo inconcluso en el 2012, el mismo tema.
[color=#0000FF:22x7c8n6]Hi Mr. Rao
If that was my question, I read something on the forum that was left unfinished in 2012, the same subject.
[/color:22x7c8n6]
[url:22x7c8n6]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=23160&p=124220&hilit=xbrowse+memo#p124220[/url:22x7c8n6] |
xBrowse MergeVert | Me disponia a usar la propiedad de fusión de celdas (combinación quizas mejor traducido), en definitiva Merge Vertical de xBrowse.
Y la idea era en un browse visualizar diferentes albranes de ventas, y fusionar las filas número, fecha y total si correspondian aun mismo albarán, y visualizar el detalle de lineas de artículos.
Busque y encontre un ejemplo de Mr.Rao, crei entender como funcionaba, y lo probe.
[url:3dxdt9qe]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=28543&p=159813&hilit=lmergevert#p159813[/url:3dxdt9qe]
A primera vista funcionaba perfecto, pero cuando dos albaranes correlativos eran de la misma fecha, o del mismo importe, tambien me fusionaba las filas.
[img:3dxdt9qe]https://s16.postimg.org/70pvgb8it/image.jpg[/img:3dxdt9qe]
[img:3dxdt9qe]https://s16.postimg.org/ypcintvj9/image.jpg[/img:3dxdt9qe]
Despues de volver a revisar el ejemplo, me doy cuenta que la columna total no se fusiona , y se comporta como yo desearia.
[img:3dxdt9qe]http://img843.imageshack.us/img843/3798/osoni.jpg[/img:3dxdt9qe]
Tras mirar nuevamente el código, veo donde esta el truco.
Se define el xBrowse usando dos veces el campo "INVOICE", y en el segundo le pone el titulo "TOTAL"
[code=fw:3dxdt9qe]<div class="fw" id="{CB}" style="font-family: monospace;">@ <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 DATASOURCE <span style="color: #ff0000;">"TEST"</span> ;<br /> COLUMNS <span style="color: #ff0000;">"INVOICE"</span>, <span style="color: #ff0000;">"INVOICE"</span>, <span style="color: #ff0000;">"DATEPAY"</span>, <span style="color: #ff0000;">"PAYMENT"</span> ;<br /> HEADERS <span style="color: #ff0000;">"INVOICE"</span>, <span style="color: #ff0000;">"TOTAL"</span>, <span style="color: #ff0000;">"DATEPAY"</span>, <span style="color: #ff0000;">"PAYMENT"</span> ;<br /> CELL LINES NOBORDER</div>[/code:3dxdt9qe]
A continuación se modifica el codeblcok bStrData de la segunda columna para que visualice el total.
[code=fw:3dxdt9qe]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT :<span style="color: #000000;">Total</span><br /> :<span style="color: #000000;">lMergeVert</span> := .t.<br /> :<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || TRANSFORM<span style="color: #000000;">(</span> TEST->TOTAL, NumPict<span style="color: #000000;">(</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br /> :<span style="color: #000000;">nHeadStrAlign</span> := AL_RIGHT<br /> :<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">""</span><br /> END</div>[/code:3dxdt9qe]
De esta forma entiendo que la segunda columna (total) tiene un codeblock que devuelve invoice (se usa para el merge) y otro que devuelve el total que es el que se visualiza.
Si bien esto funciona, creo que es algo enrevesado.
Revisando el código fuente de la clase propongo el siguiente cambio (que mantiene compatiblidad con versiones anteriores):
-Añadir un CodeBlock a la clase TXBrwColumn, bMerge. Que contendrá el codeblock a evaluar para merge.
-Modificar el método WorkMergeData(), si bMerge no está definido funcionará como ahora, y si esta definido lo evaluzara para determnar las filas a fusionar.
Línea 13910 xBrowse.prg
[code=fw:3dxdt9qe]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">bMerge</span>==<span style="color: #00C800;">NIL</span><br /> uVal := ::<span style="color: #000000;">Value</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> uVal := Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bMerge</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span></div>[/code:3dxdt9qe]
Con esta modificación el código que uso en mi programa es:
[code=fw:3dxdt9qe]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">SetDolphin</span><span style="color: #000000;">(</span> oDet, .F., .F.<span style="color: #000000;">)</span> <br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"SerNum"</span>,<span style="color: #ff0000;">"Serie"</span>+CRLF+<span style="color: #ff0000;">"Nº.Albarán"</span>, .T.<span style="color: #000000;">)</span><br /> WITH OBJECT ATail<span style="color: #000000;">(</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">)</span> <br /> :<span style="color: #000000;">lMergeVert</span> :=.T. <span style="color: #B900B9;">//Merge para SerNum</span><br /> END<br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Fecha"</span>,<span style="color: #ff0000;">"Fecha"</span>, .T.<span style="color: #000000;">)</span><br /> WITH OBJECT ATail<span style="color: #000000;">(</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">lMergeVert</span> :=.T.<br /> :<span style="color: #000000;">bMerge</span> := <span style="color: #000000;">{</span>||oDet:<span style="color: #000000;">SerNum</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">//Merge Fecha, tomando como referencia SerNum</span><br /> END<br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"ArtCod"</span>,<span style="color: #ff0000;">"Cod"</span>, .T.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"ArtDes"</span>,<span style="color: #ff0000;">"Artículo"</span>,.T.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"kgs"</span>,<span style="color: #ff0000;">"Kilos"</span>, .T.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Pvp"</span>,<span style="color: #ff0000;">"Precio"</span>, .T.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Importe"</span>,<span style="color: #ff0000;">"Importe"</span>,.t.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Lote"</span>,<span style="color: #ff0000;">"Lote"</span>,.t.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">SetColFromMySql</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Total"</span>,<span style="color: #ff0000;">"Total"</span>,.T.<span style="color: #000000;">)</span><br /> WITH OBJECT ATail<span style="color: #000000;">(</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">lMergeVert</span> :=.T.<br /> :<span style="color: #000000;">bMerge</span> := <span style="color: #000000;">{</span>|| oDet:<span style="color: #000000;">SerNum</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">//Merge Total, tomando como referencia SerNum</span><br /> END<br /><br />...</div>[/code:3dxdt9qe]
Que creo que para futuras modificaciones es más claro y legible que el ir asignando columnas que no son la que queremos visualizar, para después variar el bStrData y así obtener el resultado deseado.
[img:3dxdt9qe]https://s16.postimg.org/fyf6reqcl/image.jpg[/img:3dxdt9qe]
Perdon ha quedado un post un poco tocho, esto de viva voz se explica mucho más rápido, pero espero que se haya entendido, y que se pueda añadir si Antonio lo considera oportuno en venideras versiones. |
xBrowse MergeVert | Biel,
Muchas gracias
Lo voy a comentar con Rao a ver cual es su opinión. A mi me parece excelente tu propuesta. |
xBrowse MergeVert | Biel,
Incluido para la próxima versión de FWH
gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse Metro style | Are there plans that xBrowse control can present items in a vertical or horizontal list and if yes how soon we can have such a control?
Best regards,
Otto |
xBrowse Metro style | As of now there are no such plans, but can you explain in detail what exactly are you looking for? |
xBrowse Metro style | Dear Mr. Rao,
I am going through the samples attached to VS 2012 and check which controls we have ready and which not.
This is what I mean:
[img:2d0gqryn]http://www.atzwanger-software.com/fw/listgrid.jpg[/img:2d0gqryn]
[img:2d0gqryn]http://www.atzwanger-software.com/fw/listgrid1.jpg[/img:2d0gqryn] |
xBrowse Metro style | This can be achieved with the present xbrowse with a little bit of coding in our application. I provided similar solution to Mr Uwe earlier in these forums. |
xBrowse Metro style | Dear Mr. Rao,
thank you.
I think this should be a build in feature: ListLayout / GridLayout.
[code=fw:2nltbhyu]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> listView.layout = <span style="color: #00C800;">new</span> WinJS.UI.ListLayout<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span> <span style="color: #00C800;">else</span> <span style="color: #000000;">{</span><br /><br /> <span style="color: #B900B9;">// Create a new Grid Layout</span><br /> listView.layout = <span style="color: #00C800;">new</span> WinJS.UI.GridLayout<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;</div>[/code:2nltbhyu]
Best regards,
Otto |
xBrowse Metro style | Any news?
Best regards,
Otto |
xBrowse Metro style | 12.08 |
xBrowse MouseWheel | Hi,
xBrowse does not allow the use of the mouse wheel when the records are less than the size of the xBrowse Client Area... Same case for xBrowse from Code and From Resources...
PS: It only works when the Mouse Pointer is directly on top of existing records... I would expect it to work in the area of the browse and not only on top of the records... |
xBrowse MoveCol() and nFreeze on FWH9.11 | Hello all,
Just a tip:
Using FWH9.11
If you use :MoveCol() method of xBrowse and :nFreeze with value... the order should be:
[code=fw:2d5lto9r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">//this works perfectly with FWH9.11</span><br />With Object oBrw<br /> ...<br /> :<span style="color: #000000;">MoveCol</span><span style="color: #000000;">(</span> nFrom, nTo<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nFreeze</span> := <span style="color: #000000;">2</span><br /> ...<br />End<br /> </div>[/code:2d5lto9r]
The reason why I post this:
I was using FWH9.10 and the order was:
[code=fw:2d5lto9r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">//this doesn't work with FWH9.11</span><br />With Object oBrw<br /> ...<br /> :<span style="color: #000000;">nFreeze</span> := <span style="color: #000000;">2</span><br /> :<span style="color: #000000;">MoveCol</span><span style="color: #000000;">(</span> nFrom, nTo<span style="color: #000000;">)</span><br /> ...<br />End<br /> </div>[/code:2d5lto9r]
<!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Regards,
Fraxzi |
xBrowse MoveCol() and nFreeze on FWH9.11 | Frances,
we are going to review it,
many thanks for your feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse MoveCol() and nFreeze on FWH9.11 | Frances,
Purpose of freezing some columns is that they always remain on the left during the entire runtime of the browse.
XBrowse allows the user to rearrange the columns by dragging column headers. If the user drags un-freezed columns into the freezed area or drags freezed columns outside the freezed area, the very intention of the programmer is defeated.
Till version 9.10, the only option available to the programmer to protect the freeze is by setting oBrw:lAllowColSwapping to false, thereby denying the user the facility to rearrange columns. But with this approach the user can not rearrange any columns, even within the unfreezed area or within the freezed area, which is not against the intentions of the programmer.
The change made in the MoveCol() method of version 9.11 is that the user can still rearrange the columns by dragging, but he can not drag an un-freezed column into the freezed area or a freezed column out of the freezed area. But he can rearrange columns within the un-freezed area or within the freezed area. This does not defeat the purpose of freezing and at the same time allows the user maximum possible flexibility to rearrange the columns without disturbing the freeze.
Though even while programming setting the freeze after rearranging the columns is a better idea, it is appreciated that this restriction in the MoveCol() method should be applicable to the user at runtime but not
necessarily to the programmer while writing the code. This is implemented in verson 9.12. With this change, the programmer can still use MoveCol() method to rearrange columns in his program without any restriction and at the same time the user can not disturb the freeze at runtime.
To implement this change in version 9.11, the following lines may be changed:
Line 4968: METHOD MoveCol( xFrom, xTo, lRefresh, lUser ) CLASS TXBrowse
Line 4973: DEFAULT lRefresh := .t., lUser := .f.
Line 4986: if lUser .and. ! Empty( ::nFreeze )
Line 9079: ::oBrw:MoveCol( Self, oCol, .t., .t. )
In addition to MoveCol() method, two other methods are available to the
programmer (not to the user) for rearranging the columns, without any
restrictions.
1. SwapCol( xcol1, xCol2, lRefresh )
This method swaps two columns without disturbing the position of other columns.
Difference between MoveCol and SwapCol is explained below:
As an example, in a browse having ten columns, after MoveCol( 7, 3 ), the resultant order of columns is :
1, 2, 7, 3, 4, 5, 6, 8, 9, 10
After SwapCol( 7, 3 )
1, 2, 7, 4, 5, 6, 3, 8, 9, 10
2. ReArrangeCols( aSequence, lRetainRest )
aSequence is an array of column creation numbers or column headers.
This method rearranges all columns in the revised sequence. If lRetainRest( true by default ) is true, columns not included in the aSequence are retained at the end in the original sequence else these remaining columns
are deleted. |
xBrowse MoveCol() and nFreeze on FWH9.11 | Dear Mr. Antonio,
Thank you for the detailed explanation. Switching a line of code from one to another doesn't hurt.
Thank you so much for the greatest support.
Regards,
Frances |
xBrowse Multi-Line select | To All
I have looked at the multi-line select option in the sample TestxBrw.prg and I see where you add the line .. oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
[code=fw:3rwmkmvm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> MultiSelect<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oChild, oBrw<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oChild <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"MultiSelect browse"</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oWnd<br /><br /> oBrw := TXBrowse<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWMS<br /><br /> oBrw:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oChild:<span style="color: #000000;">oClient</span> := oBrw<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oChild <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3rwmkmvm]
What I would like to be able to do is trap those multiple rows and on a button click run those hi-lited rows through a program that imports them ( like a do while loop ) ..
The button click has a single action line program ( _transfer() )I would like to run for as many rows that are selected.
Here is a screen shot of what I am trying to do..
[url=http://imageshack.us/photo/my-images/824/rickq.jpg/:3rwmkmvm][img:3rwmkmvm]http://img824.imageshack.us/img824/4953/rickq.jpg[/img:3rwmkmvm][/url:3rwmkmvm]
then on the transfer button click be able to cycle through this code multiple times
[code=fw:3rwmkmvm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">161</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Transfer"</span> <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">of</span> oInvt <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> _Transfer<span style="color: #000000;">(</span> oRsInvt,oWnd,oLbxMain,oRsInvDetail,;<br /> oWndChildD,oRsInv,@lTaxable,oTaxable,oFontB,oFontBig,nRepairNumber,;<br /> oLabor,oParts,oMisc,oTax,oTotal,nAssignedTo,cLoc,nTaxNumber,;<br /> oOther,oSubtotal<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> </div>[/code:3rwmkmvm]
[url=http://imageshack.us/photo/my-images/210/tranj.jpg/:3rwmkmvm][img:3rwmkmvm]http://img210.imageshack.us/img210/6990/tranj.jpg[/img:3rwmkmvm][/url:3rwmkmvm]
Any help and advice would be appreciated!
Rick Lipkin |
xBrowse Multi-Line select | Dear Rick, maybe this little code can give you an idea or guidance.
It works on two identical dbf files.
local n, nn, aProducts:=oBrw:aSelected //MULTISELECT
FOR nn:=1 to len(aProducts)
Sourc->(dbgoto(aProducts[nn]))
Dest->(dbAppend())
FOR n := 1 to Sourc->(Fcount())
Dest->( FieldPut( n, Sourc->(FieldGet(n)) ) )
NEXT
NEXT
Regards |
xBrowse Multi-Line select | Francisco
I believe you are on the right track with ..
[code=fw:20hoa1hv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aCols := oLbx:<span style="color: #000000;">aSelected</span><br /><span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span> aCols <span style="color: #000000;">)</span><br /> </div>[/code:20hoa1hv]
Just looking at the results of the array .. I see a number which with .dbf apparently represents Recno() .. Unfortunitly I am using MS Access ( w ADO ) and Recno() is not a legitimate value.
[url=http://imageshack.us/photo/my-images/337/rick1k.jpg/:20hoa1hv][img:20hoa1hv]http://img337.imageshack.us/img337/2466/rick1k.jpg[/img:20hoa1hv][/url:20hoa1hv]
Any idea what these row values represent ?
Thanks
Rick Lipkin |
xBrowse Multi-Line select | To All
After doing some tests it appears the array value for aCols[i] is actually the 'bookmark' value..
[code=fw:35qh17ss]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aCols := oLbx:<span style="color: #000000;">aSelected</span><br /><span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span> aCols <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> oLbx:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</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;">(</span>aCols<span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> oRsInvt:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"d"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Next</span><br /> </div>[/code:35qh17ss]
Issuing the BookMark() method takes you to that record and you can then extract the value of that row... and in my case I can issue my _Transfer() function in the For\Next loop.
Rick Lipkin |
xBrowse Multi-Select (bookmarks ) | Rao
I have some code that uses Multi-Select and I want to be able to total the Balance of the selected rows. I am using this code ( please forgive the debug info ) that loops thru the Len of aCols.
When I select multiple lines ( in this case 2 lines ) I see two bookmark records ( 141 and 288 ), however the For\Next Loop only sees the current ( last ) Bookmark 288 and loops thru twice adding up the same record twice.
Please look over this code and tell me what I am doing wrong. It appears that oLbxB:BookMark(aCols[i]) goes to the last row selected ( bookmark 288 ) and since the len of aCols = 2 .. it adds the same row twice and 80.08 gets added twice not taking into consideration bookmark 141.
Somehow, I need to be able to loop thru both bookmarks ( top to bottom ) and add the balance of the two records.
Rick Lipkin
[code=fw:10kmwdwn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nTotal := <span style="color: #000000;">0.00</span><br />nPayment := <span style="color: #000000;">0.00</span><br />nBal := <span style="color: #000000;">0.00</span><br />aCols := oLbxB:<span style="color: #000000;">aSelected</span><br /><br /><span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span>aCols <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Len aCols"</span> <span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span>aCols <span style="color: #000000;">)</span><span style="color: #000000;">)</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;">(</span>aCols<span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"i"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> i <span style="color: #000000;">)</span><br /><br /> oLbxB:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"BookMark"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> oLbxB:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Invoice Balance"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> oRsInvoice:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Balance"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span><br /><br /> nBal := nBal+oRsInvoice:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Balance"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"nBal"</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> nBal <span style="color: #000000;">)</span><br /> </div>[/code:10kmwdwn]
[img:10kmwdwn]http://i60.tinypic.com/2ljhsop.jpg[/img:10kmwdwn]
[img:10kmwdwn]http://i59.tinypic.com/6qim1z.jpg[/img:10kmwdwn] |
xBrowse Multi-Select (bookmarks ) | To All
Doing a quick search thru thru forum .. I see how to goto the bookmark record I wish to loop thru... this change was the key:
[code=fw:160nb7q1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oLbxB:<span style="color: #000000;">BookMark</span> := <span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> </div>[/code:160nb7q1]
Rick Lipkin |
xBrowse Multilinea se puede imprimir? | Esimados amigos
hay alguna forma de imprimir automáticamente un xbrowse multilinea sin complicarme tanto?.
Probé así: obrw:Report(), pero solo imprime la primera línea de cada fila (como ya me imaginaba).
Por favor alguien que me de una mano.
Uso Fw904
Saludos
Marcelo Jingo |
xBrowse Multiple cEditPicture on the Same Column | Hi,
Based on a specific condition, can I have multiple cEditPicture on the same column in xBrowse
I am using array in xBrowse and I have a column named Petrol Allowance, this column may contain values either in Litres or Amount. I can identify whether the figure in this column is in Litre or Amount by identifying the value of the column
For. Eg If the Value is > 500 means it is amount, if it is less than 500 then it is in Ltr
[b:hr2xl533]A Screen Snapshot to demonstrate the problem[/b:hr2xl533]
[url=http://img199.imageshack.us/i/xbrowse.jpg/:hr2xl533][img:hr2xl533]http://img199.imageshack.us/img199/1183/xbrowse.jpg[/img:hr2xl533][/url:hr2xl533]
I tried the following code, but it is giving run time error.
[code=fw:hr2xl533]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">cEditPicture</span>:=<span style="color: #000000;">{</span> || iif<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">Value</span> > <span style="color: #000000;">200</span>,<span style="color: #ff0000;">"@Z Rs.9,999"</span>,<span style="color: #ff0000;">"@Z 9999 Ltr"</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:hr2xl533]
Error
[quote:hr2xl533]Application
===========
Path and name: D:\Apps\EmpViewer\EmpViewer.exe (32 bits)
Size: 1,860,608 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04-03-2010, 13:26:32
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = U
[ 2] = N 3
Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINTHEADER(1475)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1271)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(1174)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1439)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(10470)
Called from: .\source\classes\WINDOW.PRG => _FWH(3378)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(345)
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
Called from: .\source\function\VALBLANK.PRG => CVALTOSTR(105)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ARRCELL(3983)
Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN:ADJUST(7742)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:ADJUST(7825)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ADJUST(925)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:INITIATE(833)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:CREATEFROMCODE(727)
Called from: .\EmpViewer.PRG => VIEWLIST(236)[/quote:hr2xl533]
Regards
Anser |
xBrowse Multiple cEditPicture on the Same Column | Hi,
With Mr.Rao's help I solved the problem. The work round was suggested by Mr.Rao. Thanks to Mr.Rao.
Instead of cEditPicture
[code=fw:2ywodkld]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">cEditPicture</span>:=<span style="color: #000000;">{</span> || iif<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">Value</span> > <span style="color: #000000;">200</span>,<span style="color: #ff0000;">"@Z Rs.9,999"</span>,<span style="color: #ff0000;">"@Z 9999 Ltr"</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:2ywodkld]
Used bStrData
[code=fw:2ywodkld]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">bStrData</span>:=<span style="color: #000000;">{</span> || Transform<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">Value</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Petrol</span>:<span style="color: #000000;">Value</span> > <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"@Z 9,999 Rs."</span>, <span style="color: #ff0000;">"@Z 9999 Ltr"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:2ywodkld]
[url=http://img687.imageshack.us/i/xbrowse2.jpg/:2ywodkld][img:2ywodkld]http://img687.imageshack.us/img687/8933/xbrowse2.jpg[/img:2ywodkld][/url:2ywodkld]
I am yet to find a solution to diplay the value as Rs.2,000 instead of 2,000 Rs. This is something to do with the function Transform()
If I use "@Z Rs.9,999" then I am getting the out put as Rs.***
Regards
Anser |
xBrowse Multiple cEditPicture on the Same Column | Use the picture '@Z Rs 9999999'. Do not use 'Rs.' Dot in the picture clause is considered as decimal place.
'Rs' should be normally acceptable to the users. If you are very particular of the dot in Rs., then use StrTran( Transform( n, '@Z Rs 999999' ), 'Rs', 'Rs.' ) |
xBrowse Multiple cEditPicture on the Same Column | Dear Mr.Rao,
[quote="Mr.Rao":2kpqunrj]Use the picture '@Z Rs 9999999'. Do not use 'Rs.' Dot in the picture clause is considered as decimal place.[/quote:2kpqunrj]
Perfect!!! Thank you. The dot was the problem. [b:2kpqunrj]Picture '@Z Rs 9999999'[/b:2kpqunrj] served my purpose
Regards
Anser |
xBrowse Multiselección | Hola,Cual es la data, metodo, tecla, funcion etc, etc, que me permita saber los registros que tengo seleccionados en el xbrowse.Ejemplo: ya tengo seleccionados 7, quiero borrarlos, copiarlos, exportarloscomo detecto cuales son.Se puede hacer a la antigua con un campo selección como funcionaba en sus tiempos GrumpFish para Clipper, pero me gustaría hacerlo, en caso de que se pueda de la forma correcta en xBrowse.Saludos,Mauricio |
xBrowse Multiselección | Esto lo saque de la propia clase, creo que es lo que buscas[b:2e0076rw]DATA aSelected [/b:2e0076rw] // Currently records selected (only use with marquee style MARQSTYLE_HIGHLROWMS |
xBrowse Multiselección | Gracias Daniel,
Lo pruebo y te comento
Saludos,
Mauricio |
xBrowse Multiselect | Hi all,
there's a little glitch in the xBrowse when using the MultiSelect feature.
Example:
i select rows 3 and 5 of a xBrowse by keeping ctrl-key pressed and clicking each row with the mouse.
After i decide not to select the row 5 and click this row again ( ctrl-key is still pressed ).
Now the unwanted row 5 is actually selected but has no highlite and the row 3 has the highlite.
This is confusing for a user because it looks like row 3 is currently selected.
Regards,
Detlef |
xBrowse Multiselect | Change the default color of each one to achieve a good result
[list:3h7gt4jh]
[*:3h7gt4jh]bClrStd[/*:3h7gt4jh]
Not selected row
[*:3h7gt4jh]bClrSel[/*:3h7gt4jh]
Selected row
[*:3h7gt4jh]bClrSelFocus[/*:3h7gt4jh]
Focused
[*:3h7gt4jh]bClrRowFocus[/*:3h7gt4jh]
Focused Row
[/list:u:3h7gt4jh] |
xBrowse Multiselect | Samir,
many thanks for your help. Your advice looks promising.
But xBrowse doesn't care about it.
here a sample:
I choosed rather weird colors to see the effects.
[code:ildjfibi]#INCLUDE "FiveWin.ch"
#INCLUDE "XBrowse.ch"
function Main()
local oDlg, aLin := {}, i, oBrw
for i := 1 TO 6
AAdd( aLin, { chr( 64 + i ), "Item " + str( i ) } )
next
DEFINE DIALOG oDlg FROM 0, 0 TO 14, 28
oBrw := TxBrowse():New( oDlg )
oBrw:SetArray( aLin )
oBrw:CreateFromCode()
with object oBrw
:nRowDividerStyle := LINESTYLE_BLACK
:nColDividerStyle := LINESTYLE_BLACK
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:aCols[1]:cHeader := 'Cod'
:aCols[2]:cHeader := 'Description'
:bClrStd := { || { CLR_BLACK, CLR_WHITE } }
:bClrSel := { || { CLR_BLUE, CLR_YELLOW } }
:bClrSelFocus := { || { CLR_HRED, CLR_CYAN } }
:bClrRowFocus := { || { CLR_WHITE, CLR_RED } }
:lHScroll := .f.
:nStretchCol := 2
end
ACTIVATE DIALOG oDlg
RETURN NIL
[/code:ildjfibi]
But xBrowse still does not handle the colors user friendly.
Try to select/deselect with ctrl key pressed.
If you want to see a surprise click at an other window while this browse dialog is visible.
You'll see a color change which you can not see when staying inside your application.
regards,
Detlef |
xBrowse Multiselect | I didn't test before, but this must help...
Maybe Antonio can solve it for you <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
xBrowse Multiselect | sorry i dont understand
i see all color ok
Window focus (xbrowse)
[img:w1kkd2m6]http://www.mcfox.org/fivewin/imagen1.jpg[/img:w1kkd2m6]
window lostfocus (xbrowse)
[img:w1kkd2m6]http://www.mcfox.org/fivewin/imagen2.jpg[/img:w1kkd2m6] |
xBrowse Multiselect | [quote="Daniel Garcia-Gil":26nc36aw]sorry i dont understand
i see all color ok
[/quote:26nc36aw]
Daniel,
the colors may be ok.
My problem is the following:
A user gets a list with records and he wants to delete rows 1, 3 and 5.
With multiselect now problem.
[img:26nc36aw]http://www.d-hoefner.de/files/xBrwClr1.gif[/img:26nc36aw]
But the user decided not to delete rows 3 and 1.
So with pressed CTRL key he clicks first at row 3 and than at row 1 to deselect them.
Now row 5 seems to be the only selected row.
[img:26nc36aw]http://www.d-hoefner.de/files/xBrwClr2.gif[/img:26nc36aw]
If the user presses the delete button he will be surprised that row 1 will be deleted.
IMO that's a little bit irritating.
Regards,
Detlef |
xBrowse Multiselect | [quote="Detlef Hoefner":32604wtl]
If the user presses the delete button he will be surprised that row 1 will be deleted.
IMO that's a little bit irritating.
[/quote:32604wtl]
how do u deleted selected rows?
i do checked DATA oBrw:aSelected only saw row 5 selected...
only delete row into data ::aSelected
please check this sample...
it is you sample with few changes
[b:32604wtl]compiled with xHarbour[/b:32604wtl][code:32604wtl]
#INCLUDE "FiveWin.ch"
#INCLUDE "XBrowse.ch"
function Main()
local oDlg, aLin := {}, i, oBrw
for i := 1 TO 6
AAdd( aLin, { chr( 64 + i ), "Item " + str( i ) } )
next
DEFINE DIALOG oDlg FROM 0, 0 TO 14, 28
oBrw := TxBrowse():New( oDlg )
oBrw:SetArray( aLin )
oBrw:CreateFromCode()
with object oBrw
:nRowDividerStyle := LINESTYLE_BLACK
:nColDividerStyle := LINESTYLE_BLACK
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bKeyDown := {| k | if( k == VK_DELETE,;
( DeleteRow( oBrw ), oBrw:refresh()), ) }
:aCols[1]:cHeader := 'Cod'
:aCols[2]:cHeader := 'Description'
:bClrStd := { || { CLR_BLACK, CLR_WHITE } }
:bClrSel := { || { CLR_BLUE, CLR_YELLOW } }
:bClrSelFocus := { || { CLR_HRED, CLR_CYAN } }
:bClrRowFocus := { || { CLR_WHITE, CLR_RED } }
:lHScroll := .f.
:nStretchCol := 2
end
ACTIVATE DIALOG oDlg
RETURN NIL
procedure DeleteRow( oBrw )
local nI
local aClon := ACLONE( oBrw:aArrayData )
for nI := 1 to len( oBrw:aSelected )
aDel( aClon, oBrw:aSelected[ nI ]-nI+1,.f. )
next
ASize( aClon, len( aClon ) - len( oBrw:aSelected ) )
oBrw:aArrayData := aClon
oBrw:aSelected := {}
return[/code:32604wtl] |
xBrowse Multiselect | Daniel,
many thanks for your help.
But i already knew how to handle the :aSelected array.
My example of deleting rows was not good.
My concern is just the misleading color of a selected row while the :nArrayAt pointer is at a different row.
Here an other example where a user might be irritated.
He first selects row 1, 2 and 3.
The he deselects 2 and 1.
Row 3 stays colored and looks to be the actual row.
If he presses cursor down the browse will hilite row 2 but not row 4 as the user might think.
It is not a big problem. But it's just a none proper ui functionality.
Normally James Bott ( hi, James ) is the first address for such ui concerns.
Regards,
Detlef |
xBrowse Multiselect | This is why you must change the colors.... put a color like (255,0,0) for the focused row and (50,50,50) for the selected row.... |
xBrowse Multiselect | Hi Detlef,
Samir is on the right track--you must have some way to visually tell them apart. If you look at the way Windows Explorer handles this, the active record is colored and it has a dotted black border. Normally you don't even notice this border since the color tends to hide it.
If you multi-select files by holding down the Ctrl-key and clicking then each record remains colored and only the active record has the border. If you then unselect a record, the color is removed but the border remains. Unfortunately, this is very subtle and may easily go un-noticed. Perhaps a more bold border would solve this.
Samir's idea to use two different colors still presents a problem. When the active record is both selected and highlighted, then what color should be displayed?
Another possible solution would be to add a checkbox column for use in making selections. This is a popular method used in such applications as Hotmail, GMail, etc. The current row would be the only one colored. With the checkbox, it is still easy to see when the record is also highlighted.
I think my preference would be colored selected records with a bold-border active record. I have never tried to implement this using TXBrowse so I don't know how easy or difficult this may be.
Regards,
James |
xBrowse Multiselect | Thanks for jumping in, James,
i'm still not sure about the visual appearance of a multiselect browse.
Even in Windows Explorer and other windows apps this is not handled comprehensible.
There are different methods for navigation and 'actions'.
Example:
in Windows Explorer select 3 elements with Ctrl-key pressed.
After, still with Ctrl-key pressed, deselect two elements.
Now you have one colored element and the latest deselected element surrounded with dots.
Method 1:
if you press the down arrow key, you will move from the dotted element to the next one below.
Method 2:
if you press the Del-key, you'll be asked if the colored element should be deleted.
This is no consistent behaviour.
In my opinion the record pointer should be moved backwards in select-history when deselecting elements and no 'dotting' of deselected items.
So you will never get misdirected because the last selected element is always the colored one.
Hope my view is not too wrong.
Regards,
Detlef |
xBrowse Multiselect | Detlef,
I would have to disagree with you on this point. I would find it very disconcerting if I deselected an item and then the active record jumped to somewhere else in the list (as you suggested to the last selected record). This would be really bad if the last selected item was far removed from the last deselected one (by say 500 records). What if the user wanted to deselect the one they just selected because they made a mistake and really meant to select the one below it. With your system they would be moved to the last selected record (which could be anywhere) and then they would have to navigate back to where they just were.
With the Windows Explorer method they could deselect the wrong record then select the one directly below it very easily.
Many users are familiar with Windows Explorer and if your application works completely differently, then they will be confused and upset.
I don't think it is all that confusing to have an active record that may, or may not, be a selected record.
Regards,
James |
xBrowse Multiselect - Selectall | Hi,
I have a multiselect xbrowse of an array, and want to select all items.
I have try oBrw:SelectAll(), but it only works if I allready selected at least 2 items.
Is there an other way to select all items.
I use FWH64 16.03 |
xBrowse Multiselect - Selectall | For this browse please set
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS |
xBrowse Multiselect - Selectall | Thank you, now it's working <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Another question about selecting rows. Is there a posibility to select records according to a condition.
I want for example select all raws where column 1 is holding the text '.CSV', after pressing a button. |
xBrowse Multiselect - Selectall | Assuming array browse, please try this:
[code=fw:85kduxjt]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aSelected</span> := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br />AEval<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">{</span> |a,i| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Upper<span style="color: #000000;">(</span> cFileExt<span style="color: #000000;">(</span> Trim<span style="color: #000000;">(</span> a<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"CSV"</span>, AAdd<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, i <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br />oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:85kduxjt] |
xBrowse Multiselect - Selectall | Thank you,
It's working fine.
I want to expand the possibility to deselect all files of one type.
Can I just set the value of the aSelected array to 0 for those records, or should I create a new one? |
xBrowse Multiselect - Selectall | [quote="Marc Vanzegbroeck":30vip29r]Thank you,
It's working fine.
I want to expand the possibility to deselect all files of one type.
Can I just set the value of the aSelected array to 0 for those records, or should I create a new one?[/quote:30vip29r]
I deleted the record in the oBrw:aSelected array, and now it's working also for deselecting types.
I have another question. In the dialog, I show how many items are selected by showing len(oBrw:aSelected).
For the selections by my buttons, it's working fine.
But if i select by clicking the browse, it's not working.
I added the ON CLICK command by the xbrowse, and did an update uw the say. But it always show the previous amount of selected items. |
xBrowse Multiselect - Selectall | Mr Roa,
Do you know how I can show the number of selected items.
Now it shows the previous selected items. |
xBrowse Multiselect - Selectall | Please try
oBrw:bOnRefresh := { || oSay:Refresh() }
where oSay is
@ r,c SAY oSay PROMPT Len( oBrw:aSelected ) SIZE ............. OF oDlg |
xBrowse Multiselect - Selectall | [quote="nageswaragunupudi":20m3nfgd]Please try
oBrw:bOnRefresh := { || oSay:Refresh() }
where oSay is
@ r,c SAY oSay PROMPT Len( oBrw:aSelected ) SIZE ............. OF oDlg[/quote:20m3nfgd]
Thank you, its working fine. |
xBrowse Multiselect == Twbrowse H.C. | Necessito trabjar com el xBrowse == ao twbrowse de Hernan; explico:Quero el xbrowse com MultiSelec e Bitmaps, assim:[img:1ntlxbwi]http://www.technet.com.br/~jackson/sbsarq/bmps/brwmulti.JPG[/img:1ntlxbwi]Mas, meu bitmap no esta ligado a nenhuno campo del DBF, es apenas um Bitmap, q basta uno click com el mouse para mudar el Bmp e selecionar el Linha.E me retorna uno valor, para yo saber quais linhas estao selecionadas.Es possible com xbrowse, isto ???Es possible me apresentar uno exemplo simple ???saludos Ale |
xBrowse Multiselect == Twbrowse H.C. | Tambem gostaria de saber como fazer isso, uso a TSBROWSE, mais já estou mudando todos os MEUS BROWSEs para XBROWSE, e gostaria de ver esta possibilidadeFico no aguardo |
xBrowse Multiselect == Twbrowse H.C. | Con XBrowse se puede hacer. Os "entresaco" el código que utilizo. Al clickar con el botón derecho del ratón el registro se vuelve de color amarillo y se activa un icono a su izquierda. Igualmente el array aSeleccion contiene algunos datos del registro y el array aSele contiene el número de registroSaludos,Manuel[code:26llaodo]
..................
STATIC aSeleccion,aSele
.................
Local oLbx
//
oLbx := TXBrowse():New(oDlg)
oLbx:CreateFromResource(200)
oLbx:nFreeze := 4
oLbx:bClrStd := { || {CLR_BLACK,SelColor2(EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre,aSeleccion ),CLR_WHITE } }
//
oCol := oLbx:AddCol()
oCol:AddResource("LEVELB")
oCol:AddResource("LEVELR")
oCol:bBmpData := { || IIF(ASCAN(aSeleccion,EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre)=0,1,2 ) }
oCol:cHeader := "S"
AADD(aCols,1)
//
oCol := oLbx:AddCol()
oCol:bStrData := { || EMPRESAS->Numcliente}
oCol:cHeader := "Núm.")
oCol:oDataFont := oFont1
AADD(aCols,2)
//
oCol := oLbx:AddCol()
oCol:bStrData := { || SUBSTR(EMPRESAS->Nombre,1,35)}
oCol:cHeader := " Nombre o razón social"
oCol:oDataFont := oFont1
AADD(aCols,3)
.....................................
.....................................
//
for nFor := 1 to len(aCols)
oLbx:aCols[ nFor ]:blDClickData := {|| (Empresas(oLbx,"Ver/Modificar datos",.F.,nSerie),oLbx:Refresh()) }
oLbx:aCols[ nFor ]:bRClickData := {|| (ESeleccionar(oLbx),oLbx:refresh(),IIF(LEN(aSeleccion) > 0,oBtn7:enable(),oBtn7:disable()) ) }
oLbx:aCols[ nFor ]:bRClickHeader := {|r,c,f,o| NIL }
next
//
**********************************
STATIC FUNCTION ESELECCIONAR(oLbx)
**********************************
Local nPos
Local nPos2
nPos := AScan(aSeleccion, EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre)
nPos2:= AScan(aSele, EMPRESAS->(Recno()))
//
IF nPos # 0 // quita la marca si ya la tiene
ADel(aSeleccion, nPos)
ASize(aSeleccion, Len(aSeleccion)-1)
ELSE
AAdd(aSeleccion, EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre) // pone la marca
ENDIF
//
IF nPos2 # 0 // quita la marca si ya la tiene
ADel(aSele, nPos)
ASize(aSele, Len(aSele)-1)
ELSE
AAdd(aSele, EMPRESAS->(Recno())) // pone la marca
ENDIF
//
RETURN NIL
*************************************
FUNCTION SELCOLOR2( cItem, aSeleccion )
*************************************
local nColor := CLR_WHITE
local nPos
nPos := AScan(aSeleccion, cItem)
//
IF nPos # 0
cItem = aSeleccion [nPos]
nColor = CLR_YELLOW
ENDIF
//
RETURN nColor
[/code:26llaodo]
Las mismas funciones son válidas para un LISTBOX
[code:26llaodo]
REDEFINE LISTBOX oLbx ;
FIELDS IIF(ASCAN(aSeleccion,EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre)=0," ",aLevel[ 2 ] ),;
" "+EMPRESAS->NumCliente+" ",;
" "+EMPRESAS->Nombre;
FIELDSIZES 13,40,250;
HEADERS "S"," Núm."," Nombre o Razón Social");
ID 200;
FONT oFont1;
COLOR rgb(0,0,0),rgb(255,234,175);
ON RIGHT CLICK (ESeleccionar(oLbx),oLbx:refresh(),IIF(LEN(aSeleccion) > 0,oBtn7:enable(),oBtn7:disable()) );
ON LEFT DBLCLICK Empresas(oLbx,"Ver/Modificar datos",.F.,nSerie); // Al doble click se editar el registro
OF oDlg
oLbx:nClrText := { || SelColor(EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre,aSeleccion ) }
oLbx:nClrPane := { || SelColor3(EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre,aSeleccion ) }
oLbx:nClrForeFocus:= { || SelColor2(EMPRESAS->NumCliente+"-"+EMPRESAS->Nombre,aSeleccion ) }
[/code:26llaodo] |
xBrowse Multiselect == Twbrowse H.C. | Gracias Manuel por el ejemplo, mas, ainda no estoy conseguindo montar el Prg.Es possible postar uno ejemplo, na Pratica com uno DBF e uno EXE, para un mejor entendimento ???Gracias pela ajuda.Saludos Ale |
xBrowse Multiselect == Twbrowse H.C. | Hola Ale, aquí tienes un ejemplo:<!-- m --><a class="postlink" href="http://rapidshare.com/files/118392887/ejemplo.zip.html">http://rapidshare.com/files/118392887/ejemplo.zip.html</a><!-- m --> |
xBrowse Multiselect == Twbrowse H.C. | Perfect Manuel, Gracias, Muito bom este ejemplo.Saluds Ale |
xBrowse Multiselect == Twbrowse H.C. | Hello Manuel,Good sample - may I put your sample on:[url:1sfeedc6]http://fwcodesnips.com[/url:1sfeedc6]Regards,Otto |
xBrowse Multiselect == Twbrowse H.C. | Muy buenas a todos:
¿ Alguien conserva por ahí el fichero ejemplo.zip ?
Lo he perdido y me gustaría recuperarlo.
Gracias. |
xBrowse NOT support dynamic alias | Hello Nages.
xBrowse has support for dynamic alias management?
The definition of the parameter ALIAS "XA01" works fine, but:
The definition of the parameter ALIAS oDtbl NO works well
oDtbl generated a different number each time you open a table.
Currently use FWH 13.07
Solution will have to operate with dynamic alias?
regards |
xBrowse NOT support dynamic alias | From the syntax, oDtbl, I assume this is a database object. If so, it contains an object not the name of the alias. Try using oDtbl:cAlias.
James |
xBrowse NOT support dynamic alias | What is oDtbl ?
If it is a TDatabase object, it works too. |
xBrowse ON OFF checkbox does not work in FWH1203 | To ALL
I have noticed that inserting a check box in xBrowse has changed .. Please review my code and let me know what I am doing wrong ?
The Ado Fieldtype is YesNo .. and has worked in prior versions ..
Thanks
Rick Lipkin
ps TestXbr3.prg is not working either .. just have a column .T. or .F. for Married Column
[code=fw:jv1bkcg9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLBXB ;<br /> RECORDSET oRsDetail ;<br /> COLUMNS <span style="color: #ff0000;">"QTY"</span>, ;<br /> <span style="color: #ff0000;">"INVENTORY ID"</span>, ;<br /> <span style="color: #ff0000;">"INVENTORY TYPE"</span>, ;<br /> <span style="color: #ff0000;">"ITEM DESCRIPTION"</span>, ;<br /> <span style="color: #ff0000;">"PRICE"</span>, ;<br /> <span style="color: #ff0000;">"LOCATION"</span>, ;<br /> <span style="color: #ff0000;">"COVERED BY WARRANTY"</span> ;<br /> COLSIZES <span style="color: #000000;">45</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">310</span>,<span style="color: #000000;">65</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">50</span> ;<br /> HEADERS <span style="color: #ff0000;">"Qty"</span>, ;<br /> <span style="color: #ff0000;">"Part Number"</span>, ;<br /> <span style="color: #ff0000;">"Type"</span>, ;<br /> <span style="color: #ff0000;">"Description"</span>, ;<br /> <span style="color: #ff0000;">"Price"</span>, ;<br /> <span style="color: #ff0000;">"Location"</span>, ;<br /> <span style="color: #ff0000;">"Warranty"</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">172</span> <span style="color: #0000ff;">of</span> oWorkB ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> LINES CELL<br /><br /> <span style="color: #B900B9;">// row numbers</span><br /> ADD oCol <span style="color: #0000ff;">to</span> oLbxB <span style="color: #00C800;">AT</span> <span style="color: #000000;">1</span> <span style="color: #00C800;">DATA</span> oLbxB:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> HEADER <span style="color: #ff0000;">'Ln'</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">23</span> <span style="color: #B900B9;">//PICTURE '9999'</span><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT<br /> <span style="color: #B900B9;">// extention</span><br /> ADD oCol <span style="color: #0000ff;">TO</span> oLbxB <span style="color: #00C800;">AT</span> <span style="color: #000000;">7</span> <span style="color: #00C800;">DATA</span> <span style="color: #000000;">{</span>|x| x := _CalcExt<span style="color: #000000;">(</span> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Qty"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,;<br /> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Price"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span><span style="color: #000000;">}</span> HEADER <span style="color: #ff0000;">'Ext'</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">65</span><br /><br /> <span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">(</span>oCol := oLbxB:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"COVERED BY WARRANTY"</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <br /> oCol:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ON"</span>, <span style="color: #ff0000;">"OFF"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /><br /> </div>[/code:jv1bkcg9]
[url=http://imageshack.us/photo/my-images/545/rick1.jpg/:jv1bkcg9][img:jv1bkcg9]http://img545.imageshack.us/img545/1154/rick1.jpg[/img:jv1bkcg9][/url:jv1bkcg9] |
xBrowse ON OFF checkbox does not work in FWH1203 | Instead of
[code=fw:1q6hqao9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">(</span>oCol := oLbxB:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"COVERED BY WARRANTY"</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span></div>[/code:1q6hqao9]
please substitute
[code=fw:1q6hqao9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">(</span>oCol := oLbxB:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"WARRANTY"</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span></div>[/code:1q6hqao9]
Parameter of oCol() should be either HeaderName or CreationOrder as numeric. |
xBrowse ON OFF checkbox does not work in FWH1203 | Rao
I tried your suggestion yesterday without success .. what I found interesting today is that by default .. "on", "off" used to work displaying an xbrowse checkbox in older ( 9.11 ) versions of FWH ( without resource support ) but for the xbrowse checkboxes to work in current versions.. you MUST import an "on" and "off" bitmap in your resource file... did not have to do that previously... and that is ok now that I know <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
If you take a look at the sample testxbr3.prg, you will notice the column Married only shows .T. or .F. .. with no code to control the checkbox .. and if I am correct .. you will also need to at the appropriate bitmap to the resource ??
Rick Lipkin |
xBrowse ON OFF checkbox does not work in FWH1203 | oCol:SetCheck()
without any parameters uses internal bitmaps by default.
If an array is specified as the first parameter, the two elements of the array should be either valid resource names or bitmap filenames.
Because you called oCol:SetCheck( { "ON", "OFF" } ), ON and OFF should be valid resource names. |
xBrowse ON OFF checkbox does not work in FWH1203 | Rao
Thanks for the excellent advice .. Appreciate your help!
Rick |
xBrowse PaintCell Suggested Change | Antonio,
I have browses that determine color requirements "on the fly" at runtime.
in order to make my programs work with xBrowse I made a slight change to the PaintCell method of TXBrwColumn to pass SELF with the evaluation of the color code block. Partial code from the method is below with 4 lines changed to pass SELF.
This might possibly be a good addition to FiveWin master libraries.
if lHighLite
if ::oBrw:hWnd == GetFocus()
if lSelected
if nOrder == ::oBrw:nColSel
aColors := Eval( ::bClrSelFocus, SELF ) // Eval( ::oBrw:bClrSelFocus ) // 3/24/13 - PASS SELF - DL
else
aColors := Eval( If( ::oBrw:bClrRowFocus != nil, ::oBrw:bClrRowFocus, ::bClrSelFocus ), SELF ) // 3/24/13- PASS SELF - DL
endif
else
aColors := Eval( If( ::oBrw:bClrRowFocus != nil, ::oBrw:bClrRowFocus, ::bClrSelFocus ), SELF ) // 3/24/13- PASS SELF - DL
endif
else
aColors := Eval( ::bClrSel, SELF ) // 3/24/13- PASS SELF - DL
endif
else
aColors := Eval( ::bClrStd, SELF ) // 3/24/13- PASS SELF
lTransparent := IfNil( ::lColTransparent, ::oBrw:lTransparent )
endif |
xBrowse Picture apply only in first row | Dear All,
Is it possible that picture '999.99' be applied to first row and picture '@Z 999.99' for the rest of the row?
Kind Regards,
Frances |
xBrowse Picture apply only in first row | Please try assigning codeblock to oCol:cEditPicture.
Eg. oCol:cEditPicture := { || If( <yourcond>, "999,999.99", "@Z 999,999.99" ) } |
xBrowse Picture apply only in first row | [quote="nageswaragunupudi":3mtjpln2]Please try assigning codeblock to oCol:cEditPicture.
Eg. oCol:cEditPicture := { || If( <yourcond>, "999,999.99", "@Z 999,999.99" ) }[/quote:3mtjpln2]
Thanks Mr. RAO!
I was stuck with :bStrData this approach is much better.
Kind regards,
Frances |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.