topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse refresh
Antonio, en FWH808 creo que hay un problema con los arrays y xBrowse. Te comento, Tengo un array de por ejemplo 200 registros y en pantalla solo entra 50, pues cuando pulso el cursor para abajo, cuando llega a la linea 50, si sigo la 51 en adelante me la pinta sobre la 50 y las demás las deja igual, si pulso sobre repag o avpag si se refresca bien. Espero haberme explicado.SALUDOS,
xBrowse refresh
Mike,vamos a revisarlo cuanto antes, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse refresh problem
Hi all, I have this code: Use VENDA INDEX VENDA Shared New alias "VENDA" via "DBFCDX" Database oVenda ... oBrwPed := TXBrowse():New( oDlgPed ) oBrwPed:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrwPed:CreateFromResource( 109 ) oBrwPed:nColDividerStyle := 5 //LINESTYLE_BLACK // COLUNAS oBrwPed:lColDividerComplete := .T. oBrwPed:nHeaderHeight :=30 oBrwPed:nStretchCol := STRETCHCOL_LAST oBrwPed:cAlias := "VENDA" oCol := oBrwPed:AddCol() oCol:bStrData := { || VENDA->NUMERO } oCol:cHeader := "PEDIDO" oCol := oBrwPed:AddCol() oCol:bStrData := { || DTOC(VENDA->DATA)} oCol:cHeader := "DATA" oCol := oBrwPed:AddCol() oCol:bStrData := { || VENDA->HORA } oCol:cHeader := "HORA" oCol := oBrwPed:AddCol() oCol:bStrData := { || VENDA->CNPJCPF } oCol:cHeader := "CNPJ/CPF" oCol := oBrwPed:AddCol() oCol:bStrData := { || SUBSTR(VENDA->CLIENTE,1,35) } oCol:cHeader := "NOME CLIENTE" oCol := oBrwPed:AddCol() oCol:bStrData := { || Tran(VENDA->VALOR,"@E 9,999,999.99") } oCol:cHeader := "BRUTO" oCol:nDataStrAlign := AL_RIGHT oCol := oBrwPed:AddCol() oCol:bStrData := { || Tran(VENDA->DESCONTO,"@E 9,999,999.99") } oCol:cHeader := "DESCONTO" oCol:nDataStrAlign := AL_RIGHT oCol := oBrwPed:AddCol() oCol:bStrData := { || Tran(VENDA->LIQUIDO,"@E 9,999,999.99") } oCol:cHeader := "LIQUIDO" oCol:nDataStrAlign := AL_RIGHT oCol := oBrwPed:AddCol() oCol:bStrData := { || VENDA->VP } oCol:cHeader := "V/P" oCol:nDataStrAlign := AL_CENTER oCol:nHeadStrAlign := AL_CENTER oCol := oBrwPed:AddCol() oCol:bStrData := { || DTOC(VENDA->DTBAIXA)} oCol:cHeader := "DT BAIXA" oBrwPed:SetoDbf(oVenda) I some point i need to delete one record and I use: oVenda:Delete() oBrwPed:Refresh() In File the record is deleted but the xbrowse still display the record, if i close and open again xbrowse are empty. How I can refresh the xbrowser properly after delete record? Thanks in advance.
xBrowse refresh problem
Please use the recommended way to define the xbrowse like this [code=fw:8bm420r8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />FWNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E"</span>, .t. <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// Keep this at the beginning of your Main prg</span><br /><br />Use VENDA <span style="color: #0000ff;">INDEX</span> VENDA Shared <span style="color: #00C800;">New</span> <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">"VENDA"</span> via <span style="color: #ff0000;">"DBFCDX"</span><br />Database oVenda<br /><br /><br /><span style="color: #B900B9;">//  DEFINE DIALOG ....</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> oBrwPed <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlgPed DATASOURCE oVenda ;<br />   COLUMNS <span style="color: #ff0000;">"PEDITO"</span>, <span style="color: #ff0000;">"DATA"</span>, <span style="color: #ff0000;">"HORA"</span>, <span style="color: #ff0000;">"CNPJCPF"</span>, <span style="color: #ff0000;">"LEFT(CLIENTE,35)"</span>, <span style="color: #ff0000;">"VALOR"</span>, <span style="color: #ff0000;">"DESCONTO"</span>, <span style="color: #ff0000;">"LIQUIDO"</span>, <span style="color: #ff0000;">"VP"</span>, <span style="color: #ff0000;">"DTBAIXA"</span> ;<br />   HEADERS <span style="color: #00C800;">nil</span>,      <span style="color: #00C800;">nil</span>,     <span style="color: #00C800;">nil</span>,  <span style="color: #ff0000;">"CNPJ/CPF"</span>, <span style="color: #ff0000;">"NOME CLIENTE"</span>,     <span style="color: #ff0000;">"BRUTO"</span>, <span style="color: #00C800;">nil</span>,         <span style="color: #00C800;">nil</span>,     <span style="color: #ff0000;">"V/P"</span>,<span style="color: #ff0000;">"DT BAIXA"</span> ;<br />   LINES<br />   <br />WITH OBJECT oBrwPed<br />   :<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLROW<br />   :<span style="color: #000000;">nColDividerStyle</span>    := <span style="color: #000000;">5</span> <span style="color: #B900B9;">//LINESTYLE_BLACK // COLUNAS</span><br />   :<span style="color: #000000;">nHeaderHeight</span>       :=<span style="color: #000000;">30</span> <br />   :<span style="color: #000000;">nStretchCol</span>         := STRETCHCOL_LAST <br />   WITH OBJECT aCols<span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span><br />      :<span style="color: #000000;">nDataStrAlign</span>    := AL_CENTER<br />      :<span style="color: #000000;">nHeadStrAlign</span>    := AL_CENTER<br />   END<br />END<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPed<br />&nbsp;</div>[/code:8bm420r8] Now when you want to delete a record, CALL [code=fw:8bm420r8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrwPed:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:8bm420r8] No need to call Refresh() also. Note: XBrowse automatically assigns the picture clause and also decides left/right aligns
xBrowse refresh problem
[quote="nageswaragunupudi":tur2xdaf]Please use the recommended way to define the xbrowse like this [code=fw:tur2xdaf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />FWNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E"</span>, .t. <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// Keep this at the beginning of your Main prg</span><br /><br />Use VENDA <span style="color: #0000ff;">INDEX</span> VENDA Shared <span style="color: #00C800;">New</span> <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">"VENDA"</span> via <span style="color: #ff0000;">"DBFCDX"</span><br />Database oVenda<br /><br /><br /><span style="color: #B900B9;">//  DEFINE DIALOG ....</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> oBrwPed <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlgPed DATASOURCE oVenda ;<br />   COLUMNS <span style="color: #ff0000;">"PEDITO"</span>, <span style="color: #ff0000;">"DATA"</span>, <span style="color: #ff0000;">"HORA"</span>, <span style="color: #ff0000;">"CNPJCPF"</span>, <span style="color: #ff0000;">"LEFT(CLIENTE,35)"</span>, <span style="color: #ff0000;">"VALOR"</span>, <span style="color: #ff0000;">"DESCONTO"</span>, <span style="color: #ff0000;">"LIQUIDO"</span>, <span style="color: #ff0000;">"VP"</span>, <span style="color: #ff0000;">"DTBAIXA"</span> ;<br />   HEADERS <span style="color: #00C800;">nil</span>,      <span style="color: #00C800;">nil</span>,     <span style="color: #00C800;">nil</span>,  <span style="color: #ff0000;">"CNPJ/CPF"</span>, <span style="color: #ff0000;">"NOME CLIENTE"</span>,     <span style="color: #ff0000;">"BRUTO"</span>, <span style="color: #00C800;">nil</span>,         <span style="color: #00C800;">nil</span>,     <span style="color: #ff0000;">"V/P"</span>,<span style="color: #ff0000;">"DT BAIXA"</span> ;<br />   LINES<br />   <br />WITH OBJECT oBrwPed<br />   :<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLROW<br />   :<span style="color: #000000;">nColDividerStyle</span>    := <span style="color: #000000;">5</span> <span style="color: #B900B9;">//LINESTYLE_BLACK // COLUNAS</span><br />   :<span style="color: #000000;">nHeaderHeight</span>       :=<span style="color: #000000;">30</span> <br />   :<span style="color: #000000;">nStretchCol</span>         := STRETCHCOL_LAST <br />   WITH OBJECT aCols<span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span><br />      :<span style="color: #000000;">nDataStrAlign</span>    := AL_CENTER<br />      :<span style="color: #000000;">nHeadStrAlign</span>    := AL_CENTER<br />   END<br />END<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPed<br /> </div>[/code:tur2xdaf] Now when you want to delete a record, CALL [code=fw:tur2xdaf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrwPed:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:tur2xdaf] No need to call Refresh() also. Note: XBrowse automatically assigns the picture clause and also decides left/right aligns[/quote:tur2xdaf] Thank you Mr Nages
xBrowse report oLbx:Report
To All Is it possible to select ONLY the fields you wish xBrowse report to Print and also get a total number of records ? Thanks Rick Lipkin
xBrowse report oLbx:Report
The only way is to hide the unwanted columns and call :Report(). This also means that Report() method prints what we see in the browse by default. Total records printed is oBrw:nLen. By using the 4th parameter bSetup, you get the full flexibility to define your own columns. Example: [code=fw:2njnx6f0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"report.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oCn, oRs<br /><br />   oCn   := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"xbrtest.mdb"</span> <span style="color: #000000;">&#41;</span><br />   oRs   := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, <span style="color: #ff0000;">"customer"</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />   @ <span style="color: #000000;">60</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 oRs COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"Age"</span> ;<br />      CELL LINES NOBORDER<br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"REPORT"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span> |oRep,brw| MyReportSetup<span style="color: #000000;">&#40;</span> oRep, brw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />   oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> MyReportSetup<span style="color: #000000;">&#40;</span> oRep, oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oRs   := oBrw:<span style="color: #000000;">oRs</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cLines &nbsp; := cValToChar<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" lines"</span><br /><br />   COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"First Name"</span> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"First"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span><br />   COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Street"</span>     <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Street"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span><br />   COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"City"</span>       <span style="color: #00C800;">DATA</span> oBrw:<span style="color: #000000;">City</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span><br />   COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Salary"</span>     <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"salary"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999.99"</span> TOTAL<br /><br />&nbsp; &nbsp;oRep:<span style="color: #000000;">bPostEnd</span> &nbsp; := <span style="color: #000000;">&#123;</span> || oRep:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, cLines <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">return</span> .t.<br /><br /><span style="color: #B900B9;">// return .t. means xbrowse should not add columns</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:2njnx6f0] The report has some columns that are not even seen in the xbrowse and some columns are used from the browse.
xBrowse report oLbx:Report
Rao Thanks .. that worked ... how do you apply [code=fw:1hj30joc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oBrw:<span style="color: #000000;">nLen</span><br /> </div>[/code:1hj30joc] to show up at the bottom of the report to sum the number of records ? Rick Lipkin
xBrowse report oLbx:Report
Rao I am using FWH 1707 and your example errors during the compile at: [code=fw:2dm8o7uw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"First Name"</span> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"First"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span><br /> </div>[/code:2dm8o7uw] "Syntax error at Title" ... is this because I am using an older version of FWH ? and is there a work around ? Thanks Rick Lipkin ps .. just curious about what are the first three parameters .. I will have a look at my xBrowse.Prg .. again, perhaps my FWH is just too old?
xBrowse report oLbx:Report
This works in all versions. Need to include "report.ch" also. Parameters [code=fw:2oimy3cf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> Report<span style="color: #000000;">&#40;</span> cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF <span style="color: #000000;">&#41;</span></div>[/code:2oimy3cf]
xBrowse report oLbx:Report
Please see my modification.
xBrowse report oLbx:Report
Rao As always ... Thank you! Rick Lipkin
xBrowse resource Pelles window styles?=> Solved
Hi Same source code [code=fw:1h24ytgk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />...<br />oBrw:<span style="color: #000000;">lVScroll</span> := .T.<br />oBrw:<span style="color: #000000;">lHScroll</span> := .T.<br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:1h24ytgk] Pelles C Window styles "0x50000000" or "0x50810000" [img:1h24ytgk]http&#58;//www&#46;fivetech&#46;com&#46;tw/downloads/img/fwh/2017-01-09_180002&#46;jpg[/img:1h24ytgk] not show VScroll and HScroll Pelles C Window styles "0x50B10000" [img:1h24ytgk]http&#58;//www&#46;fivetech&#46;com&#46;tw/downloads/img/fwh/2017-01-09_180153&#46;jpg[/img:1h24ytgk] show VScroll and HScroll I want to Pelles C Window styles "0x50000000" or "0x50810000" show VScroll and HScroll Any suggestion?
xBrowse resource Pelles window styles?=> Solved
After redefining the browse, please try [code=fw:37yn9w7p]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:37yn9w7p]
xBrowse resource Pelles window styles?=> Solved
[quote="nageswaragunupudi":2vtw44o3]After redefining the browse, please try [code=fw:2vtw44o3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br /> </div>[/code:2vtw44o3][/quote:2vtw44o3] Mr.Rao Try this [code=fw:2vtw44o3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">lVScroll</span> := .T.<br />oBrw:<span style="color: #000000;">lHScroll</span> := .T.<br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2vtw44o3] or this [code=fw:2vtw44o3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">lVScroll</span> := .T.<br />oBrw:<span style="color: #000000;">lHScroll</span> := .T.<br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2vtw44o3] no response
xBrowse resource Pelles window styles?=> Solved
Please try [code=fw:5ciodpp8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:5ciodpp8]
xBrowse resource Pelles window styles?=> Solved
[quote="nageswaragunupudi":2ko476qn]Please try [code=fw:2ko476qn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br /> </div>[/code:2ko476qn][/quote:2ko476qn] no response if I set Pelles C Window styles "0x50B10000" and use below code [code=fw:2ko476qn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//oBrw:lVScroll := .T.</span><br /><span style="color: #B900B9;">//oBrw:lHScroll := .T.</span><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:2ko476qn] [code=fw:2ko476qn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//oBrw:lVScroll := .T.</span><br /><span style="color: #B900B9;">//oBrw:lHScroll := .T.</span><br />oBrw:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">301</span> <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nStyle</span>, WS_HSCROLL, WS_VSCROLL <span style="color: #000000;">&#41;</span><br /> </div>[/code:2ko476qn] Response Any idea? I use Set Resource To "CraneERP.dll"
xBrowse resource Pelles window styles?=> Solved
Mr.Rao Look it. [url:28rt2khm]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=31551&p=183851&hilit=0x50210000#p183851[/url:28rt2khm]
xBrowse retrieve current cell value
How can I retrieve the value of the highlighted xbrowse cell Many thanks Peter
xBrowse retrieve current cell value
I used normaly my datas in a array, I get de value with this form: For example I get de data of column number 4 = ? aData[ oBrw:nArrayAt, 4 ] Regards, Carito
xBrowse retrieve current cell value
oBrw:SelectedCol():Value
xBrowse retrieve current cell value
thanks to both Regards Peter
xBrowse seek improvement
Hello Nage, I have a xBrowse with a incremental seek , with a bOnChange that effects a select in a table , each key down a select. Is it posssible to have a seek that effects a select at the end of the search , ( like in Chrome when we press enter ) without adding external get ? Thank Maurizio ? <!-- w --><a class="postlink" href="http://www.nipeservice.it">www.nipeservice.it</a><!-- w -->
xBrowse setPos(nn) error
I a have an xBrowse listbox where I am calculating a column to go as in this code to replace the GoToCol(n) using oBrow:SetPos(1,47) where I want the cursor to go to the first row then 47th column and I get the following error .. using fwh 910 .. Any Ideas ?? Rick Lipkin [code=fw:z828x9wu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span><br />SET ORDER <span style="color: #0000ff;">to</span> TAG VNUMBER<br />GO TOP<br /><br />xALIAS := <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">&#40;</span> nCOL <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWNDCHILD <span style="color: #0000ff;">MDICHILD</span> &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">33</span>,<span style="color: #000000;">100</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">of</span> oWNDMDI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;NOSYSMENU &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp;NOZOOM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;NOMINIMIZE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Reservation Information"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oEMP <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"RESBROW"</span> <span style="color: #0000ff;">of</span> oWNDCHILD<br /><br />&nbsp; &nbsp;oEmp:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrow <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oEMP <span style="color: #0000ff;">ALIAS</span> xAlias ;<br />&nbsp; &nbsp; &nbsp; AUTOSORT <span style="color: #0000ff;">AUTOCOLS</span> FOOTERS FASTEDIT LINES CELL <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; oBROW:<span style="color: #000000;">nFREEZE</span> := <span style="color: #000000;">5</span><br />&nbsp; &nbsp; oBROW:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>, <span style="color: #000000;">47</span><span style="color: #000000;">&#41;</span> &nbsp; <-- error here<br /><br />&nbsp; &nbsp; oEMP:<span style="color: #000000;">oClient</span> := oBrow<br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oMOTORPOOL <span style="color: #0000ff;">var</span> cMOTORPOOL <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">of</span> oEMP<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oMOTOR <span style="color: #0000ff;">var</span> xMOTOR <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">of</span> oEMP<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oDATE1 <span style="color: #0000ff;">var</span> dDATE1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">119</span> <span style="color: #0000ff;">of</span> oEMP<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oDATE2 <span style="color: #0000ff;">var</span> dDATE2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">of</span> oEMP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">of</span> oEMP &nbsp; &nbsp;; &nbsp; &nbsp;<span style="color: #B900B9;">// details</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> _PtrpBrow<span style="color: #000000;">&#40;</span> CTOD<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"00/00/00"</span><span style="color: #000000;">&#41;</span>, A->VNUMBER, A->LICENSE <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _ReFrsh<span style="color: #000000;">&#40;</span> A->VNUMBER, dDATE1 <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbSelectArea<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:<span style="color: #000000;">UpStable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">117</span> <span style="color: #0000ff;">of</span> oEMP &nbsp; &nbsp;; &nbsp; &nbsp;<span style="color: #B900B9;">// add reservation</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> _PtrpBrow<span style="color: #000000;">&#40;</span> CTOD<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"00/00/00"</span><span style="color: #000000;">&#41;</span>, A->VNUMBER, A->LICENSE <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _ReFrsh<span style="color: #000000;">&#40;</span> A->VNUMBER, dDATE1 <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbSelectArea<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN3 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">115</span> <span style="color: #0000ff;">of</span> oEMP &nbsp; &nbsp;; &nbsp; &nbsp;<span style="color: #B900B9;">// quit</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbCloseAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FERASE<span style="color: #000000;">&#40;</span> xVOL+<span style="color: #ff0000;">"<span style="color: #000000;">\D</span>BTMP<span style="color: #000000;">\"</span>+SITEDBF+"</span>.DBF<span style="color: #ff0000;">" ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FERASE( xVOL+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEDBF+"</span>.CDX<span style="color: #ff0000;">" ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWNDCHILD:END(), _CleanUP() )<br /><br />&nbsp; &nbsp;REDEFINE BUTTON oBTN4 ID 116 of oEMP &nbsp; ; &nbsp; &nbsp; // change motorpool<br />&nbsp; &nbsp; &nbsp; &nbsp;ACTION ( _Chgmtrpool( "</span>BOGUS<span style="color: #ff0000;">", dDATE1 ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbSelectArea( 1 ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:REFRESH(.T.), SysReFresh(),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:SetFocus() &nbsp;)<br /><br />&nbsp; &nbsp;REDEFINE BUTTON oBTN5 ID 118 of oEMP &nbsp; ; &nbsp; &nbsp; // refresh<br />&nbsp; &nbsp; &nbsp; &nbsp;ACTION ( _ReFrsh( A->VNUMBER, dDATE1 ), ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbSelectArea( 1 ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:REFRESH(.T.), SysReFresh(),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBROW:SetFocus() &nbsp;)<br /><br />ACTIVATE DIALOG oEMP NOWAIT &nbsp; &nbsp;;<br />&nbsp; &nbsp; ON INIT ( oEMP:Move( 0, 0 ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF( (xSUPER = 'Y'.or. xMGR = 'Y'), ,oBTN4:HIDE() )) // , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * oBROW:SetPos(1, 47) )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* oBROW:GoToCol(nCOL) )<br /><br />ACTIVATE WINDOW oWNDCHILD ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON INIT ( oWndChild:SetSize( oEMP:nWIDTH,oEMP:nHEIGHT, .T. )) ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALID ( IIF( !lOK, CloseRes(.T.), .F. ))<br /><br />RETURN( NIL )<br /></span></div>[/code:z828x9wu] [code=fw:z828x9wu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\FOX\DHEC\VEHFWH\veh32.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">359</span>,<span style="color: #000000;">744</span> bytes<br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">16</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">06</span>/<span style="color: #000000;">30</span>/<span style="color: #000000;">2010</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">14</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1111</span> &nbsp;Argument error: <span style="color: #000000;">LEN</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U &nbsp; <br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> LEN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">LASTDISPLAYPOS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1793</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">SETPOS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2819</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">RESBROW</span>.PRG => _RESBROW<span style="color: #000000;">&#40;</span><span style="color: #000000;">227</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">TRIPMENU</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>_TRIPMENU<span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BUTTON</span>.PRG => TBUTTON:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">176</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TBUTTON:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1427</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3347</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> SENDMESSAGE<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">407</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">928</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3347</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> WINRUN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">966</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">MAIN</span>.PRG => MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">379</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:z828x9wu]
xBrowse setPos(nn) error
Hello Rick, Setting the Focus to a defined Cell ( Row = 5 / Col = 2 ), I use : [color=#0000FF:h5nxo76p]oLbx:nRowSel := 5 oLbx:nColSel := 2[/color:h5nxo76p] ---------------------------------------- oLbx := TXBrowse():New( oDlg ) oLbx:nMarqueeStyle := [color=#0000FF:h5nxo76p]MARQSTYLE_HIGHLCELL[/color:h5nxo76p] ... ... [color=#00BF00:h5nxo76p]oLbx:nRowSel := 5 oLbx:nColSel := 2[/color:h5nxo76p] [color=#FF0000:h5nxo76p]oLbx70:SetPos(5, 2) // Error !!! Application =========== Path and name: E:\T_T_XBRW\backgrd.exe (32 bits) Size: 1,916,928 bytes Time from start: 0 hours 0 mins 0 secs Error occurred at: 06/30/10, 21:41:17 Error description: Error BASE/1111 Argument error: LEN Args: [ 1] = U Stack Calls =========== Called from: => LEN(0) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LASTDISPLAYPOS(1892) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETPOS(2883) Called from: .\backgrd.PRG => MAIN(129)[/color:h5nxo76p] oLbx:CreateFromResource( 110 ) ... ... Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse setPos(nn) error
1. SetPos(..) should be used in ON INIT clause. 2. oLbx:nRowSel := 5 oLbx:nColSel := 2 also works in many cases. There is no Upstable method in xbrowse and it is not necessary. oBrw:Refresh() is enough.
xBrowse setPos(nn) error
Rao I took out the upstable .. I am trying to migrate hernans browse to xbrowse .. in the screen shots . June 27th is the day that should show up after the 5th column which is frozen : [url=http&#58;//img5&#46;imageshack&#46;us/i/correcti&#46;jpg/:33qr98eg][img:33qr98eg]http&#58;//img5&#46;imageshack&#46;us/img5/4213/correcti&#46;jpg[/img:33qr98eg][/url:33qr98eg] This is the xbrowse with this code : [code=fw:33qr98eg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oEMP <span style="color: #0000ff;">NOWAIT</span>    ;<br />    <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oEMP:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oBrow:<span style="color: #000000;">nColSel</span>:= nCOL,oBrow:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">//   oBrow:SetPos( 1, nCOL ),;</span><br />              <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>xSUPER = <span style="color: #ff0000;">'Y'</span>.or. xMGR = <span style="color: #ff0000;">'Y'</span><span style="color: #000000;">&#41;</span>, ,oBTN4:<span style="color: #000000;">HIDE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:33qr98eg] [url=http&#58;//img811&#46;imageshack&#46;us/i/reserve&#46;jpg/:33qr98eg][img:33qr98eg]http&#58;//img811&#46;imageshack&#46;us/img811/4432/reserve&#46;jpg[/img:33qr98eg][/url:33qr98eg] As you can see .. Jun 27th is more off to the right and barely visable .. I will try soem of the suggestions to get the column to line up correctly. nCOL is 47 in both cases. Rick
xBrowse setPos(nn) error
SetPos works for visible number of column. nColSel works if the column is already visible. Since your browse is very large, best thing to do is to oBrw:GoRight() 46 times. We can have a general function for this. [code=fw:3d83olsr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n<br /><br />&nbsp; &nbsp;nCol := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nCol, Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">2</span> <span style="color: #0000ff;">to</span> nCol<br />      oBrw:<span style="color: #000000;">GoRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3d83olsr]
xBrowse setPos(nn) error
I understand that you want to show the 47th column as the first column after the freeze. We can try this: [code=fw:11rby81p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">GoRightMost</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span> > nCol<br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">GoLeft</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:11rby81p]
xBrowse setPos(nn) error
Rao I modified your code and got the colummn to show up in the right place, but the cursor os off 3 columns to the right. Rick Lipkin [code=fw:10vhs9ld]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol1 <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n<br /><br />  * nCol1 := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nCol1, Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> Ncol1 <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> nCol1<br />        oBrw:<span style="color: #000000;">GoRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:10vhs9ld] [url=http&#58;//img248&#46;imageshack&#46;us/i/cursord&#46;jpg/:10vhs9ld][img:10vhs9ld]http&#58;//img248&#46;imageshack&#46;us/img248/4374/cursord&#46;jpg[/img:10vhs9ld][/url:10vhs9ld]
xBrowse setPos(nn) error
Mr Rick Please try the code in my last post
xBrowse setPos(nn) error
Rao Your last post gave this result : [code=fw:2cuink6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//--------------------------------------</span><br /><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol1 <span style="color: #000000;">&#41;</span><br /><br />   oBrw:<span style="color: #000000;">GoRightMost</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span> > nCol1<br />      oBrw:<span style="color: #000000;">GoLeft</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">enddo</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2cuink6h] [url=http&#58;//img192&#46;imageshack&#46;us/i/lastpost&#46;jpg/:2cuink6h][img:2cuink6h]http&#58;//img192&#46;imageshack&#46;us/img192/8207/lastpost&#46;jpg[/img:2cuink6h][/url:2cuink6h] The modified second verson got the correct column but the cursor went to the wrong cell .. [code=fw:2cuink6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol1 <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n<br /><br />  * nCol1 := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nCol1, Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />  * <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> Ncol1 <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> nCol1<br />        oBrw:<span style="color: #000000;">GoRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2cuink6h] [url=http&#58;//img203&#46;imageshack&#46;us/i/goright&#46;jpg/:2cuink6h][img:2cuink6h]http&#58;//img203&#46;imageshack&#46;us/img203/7892/goright&#46;jpg[/img:2cuink6h][/url:2cuink6h]
xBrowse setPos(nn) error
Mr Rick Please try this: [code=fw:3nwbntdc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol1 <span style="color: #000000;">&#41;</span><br /><br />   oBrw:<span style="color: #000000;">nColOffSet</span> := nCol1 - oBrw:<span style="color: #000000;">nFreeze</span><br />   oBrw:<span style="color: #000000;">nColSel</span>     := oBrw:<span style="color: #000000;">nFreeze</span> + <span style="color: #000000;">1</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3nwbntdc]
xBrowse setPos(nn) error
Rao It worked .. but had to add oBrw:ReFresh(),SysReFresh() .. Once the browse was refreshed .. the column and cursor lined up correctly .. Thanks Rick [code=fw:6k0lfet5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//-------------------------------------</span><br /><span style="color: #00C800;">function</span> XbrGoToCol<span style="color: #000000;">&#40;</span> oBrw, nCol1 <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nColOffSet</span> := nCol1 - oBrw:<span style="color: #000000;">nFreeze</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nColSel</span> &nbsp; &nbsp; := oBrw:<span style="color: #000000;">nFreeze</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:6k0lfet5]
xBrowse setPos(nn) error
SysRefresh() won't be necessary. I feel it is better to use oBrw:Refresh() separately after this function. In the ON INIT clause, we may use more instructions and at the end we can use oBrw:Refresh() once.
xBrowse setPos(nn) error
Thanks Roa !!
xBrowse shows <Binary> Fieldinfo of a Textfield ?
Hello, adding a Text, I get a Fieldinfo <Binary> from the 1. Record. The DBF-structure is ok, but cannot update the field. The GET shows the defined text. The 1. Record [img:1xj8mdla]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary1&#46;jpg[/img:1xj8mdla] The 2. Record [img:1xj8mdla]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary2&#46;jpg[/img:1xj8mdla] What could be wrong ? Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xBrowse shows <Binary> Fieldinfo of a Textfield ?
1. What are the exact contents of the field? 2. FWH Version?
xBrowse shows <Binary> Fieldinfo of a Textfield ?
Mr. Rao, FWH 12.3 xHarbour opend with a external viewer MTITLE = C 40 [img:13byq2qz]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary3&#46;jpg[/img:13byq2qz] Maybe it happens the first time, after creating a new DBF ( if not exists ) from a Metro-panel-preview. Closing and reopen, I could change the field and adding new templates. [img:13byq2qz]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary4&#46;jpg[/img:13byq2qz] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse shows <Binary> Fieldinfo of a Textfield ?
If xbrowse finds some binary characters then it shows <binary>, unless it is not a valid picture. I can test if there is any bug in this identification, if I can have the DBF containing the problem text.
xBrowse shows <Binary> Fieldinfo of a Textfield ?
Mr. Rao, another test with some changes filling the 1 record with the vars from the INI-file after the DBF is created ( still the same result ) all other fields are working fine. Fieldname [color=#0000FF:306nwcxm][b:306nwcxm]MTITLE[/b:306nwcxm][/color:306nwcxm] ( Panel-title ) [img:306nwcxm]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary5&#46;jpg[/img:306nwcxm] The Download of the DBF <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/Binary.zip">http://www.pflegeplus.com/fw_downloads/Binary.zip</a><!-- m --> Creating the new TEMPLATE-dbf and uses the INI to fill the 1. record : [Windows] Style=2 1.Color=16443068 2.Color=10899511 GradPos=0.2 Graddirect=.T. Brush=BluStone.Bmp Image=Fantasy2.Jpg [Panel] [color=#FF0000:306nwcxm]Text=Test Title[/color:306nwcxm] // shows <binary> in xbrowse Color=65535 Button=120 Caption=TFont():New("@Batang",,-24,.F.,.T.,,,,.T. ) Body=TFont():New("@Gulim",,-16,.F.,.T.,,,,.F. ) Title=TFont():New("Arial",,-24,.F.,.F. ,,,,.F.) [code=fw:306nwcxm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> NEW_DBF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> DBFARRAY := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"PROJECT"</span>,     <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MSTYLE"</span>,          <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MCOLORF"</span>,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MCOLORB"</span>,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MGRADP"</span>,              <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MGRADD"</span>,              <span style="color: #ff0000;">"L"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MBRUSH"</span>,          <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MIMAGE"</span>,          <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MTITLE"</span>,          <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MBTNSIZE"</span>,        <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MTFONT"</span>,          <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MTCOLOR"</span>,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CFONT"</span>,           <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BFONT"</span>,           <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Creates the SAME Var-name and adds a Value to the vars like : COLORF_1, COLORF_2 ......</span><br /><span style="color: #B900B9;">// this way < 494 > Fields are created</span><br />I := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">30</span> <span style="color: #B900B9;">// 30 Buttons created</span><br />    xxx := <span style="color: #ff0000;">"_"</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>I<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"COLORF"</span> + xxx,    <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"COLORB"</span> + xxx,    <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CAPTION"</span> + xxx,   <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CAPTCOL"</span> + xxx,   <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ALIGN"</span> + xxx,     <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"GROUP"</span> + xxx,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BITMAP"</span> + xxx,            <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMPAL"</span> + xxx,         <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"SIZEW"</span> + xxx,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"SIZEH"</span> + xxx,     <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BODYTXT"</span> + xxx,   <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"TXTALGN"</span> + xxx,   <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BACKGRD"</span> + xxx,   <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"LARGE"</span> + xxx,     <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MENU"</span> + xxx,      <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    AADD<span style="color: #000000;">&#40;</span>DBFARRAY, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ACTION"</span> + xxx,        <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br /><br />cDbfName := c_Path + <span style="color: #ff0000;">"<span style="color: #000000;">\T</span>EMPLATES.DBF"</span><br /><br />DELETE FILE &cDbfName<br /><br /><span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>DBFARRAY<span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBF Structure-Error"</span>, <span style="color: #ff0000;">"New Structure"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />DBCREATE<span style="color: #000000;">&#40;</span> cDbfName, DBFARRAY <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span> cDbfName <span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"New DBF created ! ( "</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>LEN<span style="color: #000000;">&#40;</span>DBFARRAY<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" Fields )"</span>, <span style="color: #ff0000;">"New Structure"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ELSE</span><br />    MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"New Project-File not created !"</span>,<span style="color: #ff0000;">"Project-File"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />NET_USE <span style="color: #000000;">&#40;</span>c_Path + <span style="color: #ff0000;">"<span style="color: #000000;">\T</span>EMPLATES.DBF"</span>, <span style="color: #000000;">3</span>,<span style="color: #000000;">5</span>,.T.<span style="color: #000000;">&#41;</span>  <br /><br /><span style="color: #B900B9;">// Appends 10 Records</span><br /><span style="color: #B900B9;">// the 1. record is filled with vars from INI-file</span><br /><br />I := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span><br />    xxx := LTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>I<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    NET_APPEND <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> NET_RLOCK<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> I = <span style="color: #000000;">1</span><br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MSTYLE := nMStyle<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MCOLORF := nMColorF<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MCOLORB := nMColorB<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MGRADP := nMGradpos<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MGRADD := lMDirect<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MBRUSH := cMBrush<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MIMAGE := cMImage<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MTITLE := cPText <span style="color: #B900B9;">// the <binary> Text !!!</span><br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MBTNSIZE := nPButton<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MTFONT := cPTFont<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->MTCOLOR := nMTColor<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CFONT := cPCFont<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->BFONT := cPBFont<br />        <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">IF</span> I < <span style="color: #000000;">10</span><br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->PROJECT := <span style="color: #ff0000;">" "</span> + xxx<br />        <span style="color: #00C800;">ELSE</span><br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->PROJECT := xxx<br />        <span style="color: #00C800;">ENDIF</span><br />        COMMIT<br />        NET_ULOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">NEXT</span><br />NET_CLOSE <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">5</span>,.T.<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:306nwcxm] I can save and restore Metro-styles to / from a DBF There is still my font-problem. to create a font from a DBF-field The preview of the first record shows, that the Panel-title is ok no < binary> [img:306nwcxm]http&#58;//www&#46;pflegeplus&#46;com/pictures/binary6&#46;jpg[/img:306nwcxm] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse simple Leftclick
how can i add action in a xbrowse for a single Left click ?Tx uwe D aus E
xBrowse simple Leftclick
In TxbrwColumn :DATA bLClickHeader,; // codeblock to be evaluated when left clicking on the header bLClickFooter,; // codeblock to be evaluated when left clicking on the footerMaybe you mean that bLClickData not exist. I suppose this can only be used to select a row or columnFrank
xBrowse simple Leftclick
Yes u are right i dont notice itAnother Idea i want a detailed view of this rowhow can i do that like tooltip which was shown after a few seconds
xBrowse simple Leftclick
Hello Frank,have you seen my private email about the-booking platform?Regards,Otto
xBrowse simple Leftclick
Otto,I have no idea , have you sent a private e-mail ?If so , it is not arrived.Frank
xBrowse simple Leftclick
[quote="Uwe Diemer":2w270swb]Yes u are right i dont notice it Another Idea i want a detailed view of this row how can i do that like tooltip which was shown after a few seconds[/quote:2w270swb]UweThis can be done , as oBrwB:bChange := {|Self,lUpDown| ShowLine(Self,lUpDown, @ShowDlg,oDlg) , SetActiveWindow(oDlg:hWnd) , oBrwb:SetFocus() )}The second parameter (lUpDownn) is .T. when the row is changed (.F. changing columns)When .T. , a Dialog (NOWAIT) can be build[code:2w270swb] PROC ShowLine&#40;oBrw,lUpDown,ShowDlg,oDlg&#41; ********************************** IF lUpDown IF ShowDlg<>nil ShowDlg&#58;end&#40;&#41; END DEFINE DIALOG ShowDlg OF oDlg &#46;&#46;&#46; &#46;&#46;&#46;&#46;&#46; ACTIVATE DIALOG ShowDlg NOWAIT END [/code:2w270swb]
xBrowse simple Leftclick
Frank, I sent on your fototeam address.Regards,Otto
xBrowse simple Leftclick
[quote="Otto":3n8659bm]Frank, I sent on your fototeam address. Regards, Otto[/quote:3n8659bm]Sorry otto , i don't know anything from a fototeam address
xBrowse simple Leftclick
Excuse me . Maybe I mix up something.Aren’t you Robert Frank?Regards,Otto
xBrowse small sample
Hi Friends: I'm looking for a small xbrowse sample with edit by cells, add regs, delete regs, change regs, etc. with recordset (Myql). Somebody can help me? With best regards
xBrowse small sample
Hi Friends: I'm looking for a small sample for xBrowse with edit cells and recordset. Somebody can help me? With best regards
xBrowse small sample
Hi Armando, I think your best bet will be to download tDolphin of Daniel Garcia Gil, this is a small sample: [code=fw:9i0f4pah]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//#include "hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"tdolphin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd <br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMenu<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oServer<br /><span style="color: #B900B9;">/* &nbsp; <br />&nbsp; &nbsp;MENU oMenu 2007<br />&nbsp; &nbsp; &nbsp; MENUITEM "testing" ACTION DataBrowse( oServer, oWnd )<br />&nbsp; &nbsp;ENDMENU<br />*/</span> &nbsp; <br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET DATE FORMAT <span style="color: #ff0000;">"dd/mm/yyyy"</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #B900B9;">//Activated Case sensitive</span><br />&nbsp; &nbsp;D_SetCaseSensitive<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Set_MyLang<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"esp"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> oServer := ConnectTo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #B900B9;">/* &nbsp; DEFINE WINDOW oWnd TITLE "Testing Dolphin - Fivewin" MENU oMenu<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;ACTIVATE WINDOW oWnd <br />*/</span> &nbsp; <br />&nbsp; &nbsp;oServer:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />PROCEDURE DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oQry <br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oData, oCol<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oQry = oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM alumnos ORDER BY apellidos ASC"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oWnd<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;SetDolphin<span style="color: #000000;">&#40;</span> oBrw, oQry <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">oClient</span> = oBrw <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oQry:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"connto.prg"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"setbrw.prg"</span></div>[/code:9i0f4pah] There are more samples that may have what you are looking for.... <!-- m --><a class="postlink" href="http://tdolphin.blogspot.com">http://tdolphin.blogspot.com</a><!-- m --> <!-- m --><a class="postlink" href="http://www.sitasoft.net/dolphin/files/tdolphin.zip">http://www.sitasoft.net/dolphin/files/tdolphin.zip</a><!-- m -->
xBrowse small sample
Bayron: Tanks so much but it's too late, my app has several PRGS with many Recordsets, anyway thanks for your suggestion. Regards
xBrowse sort
Hi all, i think it's better to start a seperate topic for this question. i have a 4 column xBrowse over an array. The xBrowse is set with AUTOCOLS and AUTOSORT. I found out that if i rebuild the array my column header names change to Col1, Col2 .... and the sort order is mixed up. How can i call the browse sort process for a certain column after rebuild of the source array? Thanks for all assistance. Regards, Detlef
xBrowse sort
Try this: [code:2ig0m6ix]oBrw&#58;aArrayData &#58;= aAnyArray oBrw&#58;refresh()[/code:2ig0m6ix]
xBrowse sort
Julio, many thanks for yor advice. But this doesn't start the sorting process of a specified column. Best regards, Detlef
xBrowse sort
Detlef, Maybe you need to set the column again! With this way, we can redefine the filled array into the header columns of xBrowse.
xBrowse sort
Julio, i'm sorry, but it dosn't work as you suppose. I just need to call a method of xBrowse to start the sorting process for a specified column. Unfortunately i didn't find such method in the xBrowse sources. Antonio, do you have an advice for me? Thanks and regards, Detlef
xBrowse sort
Detlef, Please, try this: [code:1vtwnlgk]oCol&#58;setOrder()[/code:1vtwnlgk]
xBrowse sort
Julio, yes!!!! you were right. Now i got it working with oBrw:aCols[ n ]:SetOrder() But be careful You will have to set [color=#FF0000:289ya563]oBrw:aCols[ 3 ]:cOrder := 'D'[/color:289ya563] after. Otherwise with every call you have alternating ascending and descending sort orders. Thanks again. Regards, Detlef
xBrowse sort
Detlef, Yes! you are right too! Is needed to define cOrder property before!
xBrowse standard keys
Hi, how can I define my own code blocks for some standard keys, e. g. K_RIGHT, , K_LEFT, K_DEL, or K_CTRL_DEL, in a xBrowse?
xBrowse standard keys
You can't use codeblocks, but you can try redefining them at the top of xbrowse.prg and compiling and linking it with your application. The downside is that you will have to update this with each new version of FWH. I don't recommend redefining these keys as they are standards and your users will be confused by it, and probably not happy. James
xBrowse standard keys
Don't know if you can trap left, right etc but you can do this: oBrw:bKeydown := { | nKey | BrowseKeys(nKey) } STATIC FUNCTION BrowseKeys(nKey) IF nKey == VK_F3 ENDIF RETURN NIL Regards, Pete
xBrowse standard keys
James, thank you for the quick answer. I agree with your opinion, regarding the standard navigation keys as follows: K_RIGHT, K_LEFT, K_UP, K_DOWN, K_PGUP, K_PGDN, K_HOME, K_END, ... So I will not redefine these keys. But what about these keys: K_DEL, K_CTRL_DEL, K_INS, K_CTRL_INS, ... These keys were not trapped by 'oBrw:bKeyChar', though the have no function inside xBrowse! Why? I also don't understand the reason why the keys K_CTRL_HOME and K_CTRL_END have the same function as K_HOME and K_END. I have a lot of browses with an active OrdScope() and hoped that I could use these keys to change the scope of the table to the first, respectively to the last range.
xBrowse standard keys
Frank, My apologies for saying you couldn't use a codeblock, I had a brain fade and forgot about bKeydown. Can I see the codeblock you have defined, and function you are using to trap the keys? James
xBrowse standard keys
Hello Peter, hello James doesn't know until now that there are two different methods, bKeyChar and bKeyDown, to catch key strokes, thank you Peter. Fortunately bKeyDown trap the keys K_DEL, K_CTRL_DEL, K_INS, K_CTRL_INS, ..., so my function can react on them. One more difference is the value of <nKey> in bKeyDown, so I have to fix my function as follows: [code=fw:1vngpmst]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> My_Keys<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">IF</span> nKey >= <span style="color: #000000;">97</span> .AND. nKey <= <span style="color: #000000;">122</span><br />      nKey := <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <br />   <span style="color: #00C800;">IF</span> nKey == K_CTRL_F .OR. nKey == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"F"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #B900B9;">// Filter setzen</span><br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />         My_Filter_FiveWin<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   ELSEIF nKey == K_CTRL_RETURN .OR. nKey == VK_RETURN <br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #B900B9;">// Edit all marked records</span><br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />         My_Edit_Dialogbox_FiveWin<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   ELSEIF nKey == K_CTRL_S<br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #B900B9;">// Toggle security flag</span><br />      <span style="color: #B900B9;">//</span><br />      Toggle_Schutz<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ELSEIF nKey == K_DEL .OR. nKey == VK_DELETE<br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #B900B9;">// Delete records</span><br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"The function for the key 'Strg-Entf' (K_CTRL_DEL) is not yet implemented!"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ELSE</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"The function for the key 'Entf' (K_DEL) is not yet implemented!"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   ELSEIF nKey == K_INS .OR. nKey == VK_INSERT<br />    <span style="color: #B900B9;">//</span><br />    <span style="color: #B900B9;">// Insert</span><br />    <span style="color: #B900B9;">//</span><br />      <span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"The function for the key 'Strg-Einfg' (K_CTRL_INS) is not yet implemented!"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ELSE</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"The function for the key 'Einfg' (K_INS) is not yet implemented!"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   ELSEIF nKey == VK_CONTROL .OR. nKey == VK_RETURN <br />    <span style="color: #B900B9;">//</span><br />    <span style="color: #B900B9;">// Do nothing</span><br />    <span style="color: #B900B9;">//</span><br />   <span style="color: #00C800;">ELSE</span><br />       <span style="color: #B900B9;">//MsgInfo( "The function for the key '" + AllTrim( Str( nKey ) ) + "' is not yet implemented!" )</span><br />   <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> nKey</div>[/code:1vngpmst] Maybe there are some more differences? If I still want to change the functionality for K_CTRL_HOME, K_CTRL_END and perhaps other standard keys, I have to change the 'METHOD KeyDown( nKey, nFlags ) CLASS TXBrowse' in xbrowse.prg. I've just tried it and it works. Of course, a better solution is to change the xBrowse class, having user defined codeblocks for all keys <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse standard keys
Frank, Yes the two methods, KeyDown() and KeyChar(), do make it more confusing. Perhaps Antonio can explain why there are two? It is probably a Windows thing. I don't think the "K_" values are necessary--they are either reduntant to the "VK_" values or not used (remember, unlike Harbour, in FW everything goes through the Window event handler. You may note that there are no "K_" values used in FW's own code. I do agree it would be nice to have one codeblock that we could use to trap all keys (or, at least most keys, since Windows does not allow trapping of certain keys like F1, F10, etc.). As an alternative interface idea, consider making a right-click pop-up menu with all your options on it. This is a Windows standard and users will automatically try this. Unless your users are expert users that use the program a lot, they will not remember the hot-keys. At the very least consider doing both. All hot-key options should also be on a menu anyway for less than expert users. James
xBrowse standard keys
Hello James, you wrote: [quote:4s2zwqhn]As an alternative interface idea, consider making a right-click pop-up menu with all your options on it. This is a Windows standard and users will automatically try this. Unless your users are expert users that use the program a lot, they will not remember the hot-keys. At the very least consider doing both. All hot-key options should also be on a menu anyway for less than expert users.[/quote:4s2zwqhn] Yes, I totally agree upon. So all functions will be – in any case – in the menu of the application, special functions are reachable via toolbar and/or right-click pop-up menu! Cause it is an MDI app, only with one main menu – not a separate menu/toolbar for each module, I have to adjust the menu/toolbar when the user switch between already opened windows or open new ones. Although I don’t want to discuss the pros and cons of SDI/MDI apps anymore, I appreciate to get some more tips or ‘best practices’ to manage the above described scenario from you or other forum members. Meanwhile I have analyzed key trapping in an active xBrowse/[b:4s2zwqhn]bKeyDown[/b:4s2zwqhn] in more detail and find out that I have to handle keys in four different ways: [list:4s2zwqhn]1. For ‘Normal’ hotkeys, e. g. ALT-A…Z, CTRL-A…Z, etc., only a menu item is necessary 2. Hotkeys which aren’t trapped by the menu, but by [b:4s2zwqhn]bKeyDown [/b:4s2zwqhn]like K_DEL, K_CTRL_DEL, K_INS, K_CTRL_INS, ..., 3. Hotkeys which were trapped by [b:4s2zwqhn]bKeyDown [/b:4s2zwqhn]after modifying ‘METHOD KeyDown()’, like K_RIGHT, K_LEFT, K_UP, K_DOWN, K_PGUP, K_PGDN, K_HOME, K_END, ... Example: For trapping K_CTRL_LEFT, modify the case condition to ‘nKey == VK_LEFT .AND. !GetKeyState( VK_CONTROL )’ 4. For the key K_ESC and perhaps some others, the user defined function have to be placed directly in the method ‘METHOD KeyDown()’! This doesn’t work:, ‘oBrw:bKeyDown := { | nKey | IIf( nKey == VK_ESCAPE, oWnd2:End(), My_Keys( oBrw, nKey ) ) }’! One more difference compared with [b:4s2zwqhn]bKeyChar[/b:4s2zwqhn][/list:u:4s2zwqhn]
xBrowse standard keys
When I create a menu for Child window, it automatically replaces main menu when Child window has focus. You can also have a toolbar on each window.
xBrowse standard keys
Gale, thank you for the tip, which direct me in the right direction.
xBrowse start indexed
so she opens indexed by column 1 @ 000,000 XBROWSE oZoom ; HEADERS "Placa","Carro" ; OF oWndZoom ; JUSTIFY .F.,.F. ; ARRAY aCarros AUTOSORT AUTOCOLS wanted to open xbrowse indexed by column 2, how to do?
xBrowse start indexed
oBrw:aCols[ 2 ]:SetOrder oBrw:GoTop()
xBrowse start indexed
yes, thanks oBrw:aCols[ 3 ]:SetOrder() or oBrw:aCols[ 4 ]:SetOrder()
xBrowse sum help? (SOLVED)
Hi, I want to sum one column in xbrowse. If I sum all of records, there is not any problem using below. [img:1bkzu3z5]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/xbrowse1&#46;png[/img:1bkzu3z5] [code=fw:1bkzu3z5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Ödeme Yeri"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT<br />    oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br />    oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">70</span><br />    oCol:<span style="color: #000000;">bStrData</span>:=<span style="color: #000000;">&#123;</span>|o| IIF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>->OD_YERI=<span style="color: #ff0000;">"H"</span>,<span style="color: #ff0000;">"Havale"</span>,<span style="color: #ff0000;">"Büroda"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <br />    oCol:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">"Toplam"</span>+CRLF+<span style="color: #ff0000;">"Havale"</span>+CRLF+<span style="color: #ff0000;">"Büroda"</span><br /><span style="color: #00C800;">endif</span><br /> <br /><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Tutar"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">90</span><br />    oCol:<span style="color: #000000;">nTotal</span>      := <span style="color: #000000;">0</span><br />    oCol:<span style="color: #000000;">lTotal</span>      := .t.<br /><span style="color: #00C800;">endif</span> <br /><br />oBrw:<span style="color: #000000;">lFooter</span> := .T.<br />oBrw:<span style="color: #000000;">nFooterLines</span> := <span style="color: #000000;">3</span></div>[/code:1bkzu3z5] But I want to sum "Havale", "Büroda" and "all" records in "Ödeme Yeri" like that [code=fw:1bkzu3z5]<div class="fw" id="{CB}" style="font-family: monospace;">Toplam <span style="color: #000000;">700</span><br />Havale <span style="color: #000000;">225</span><br />Büroda <span style="color: #000000;">475</span></div>[/code:1bkzu3z5] Any help?
xBrowse sum help? (SOLVED)
[code=fw:1drmdcqj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Tutar"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">90</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /><span style="color: #B900B9;">// &nbsp; &nbsp;oCol:nTotal &nbsp; &nbsp; &nbsp;:= 0</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp;oCol:lTotal &nbsp; &nbsp; &nbsp;:= .t.</span><br /><span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:1drmdcqj] and finally, [code=fw:1drmdcqj]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1drmdcqj]
xBrowse sum help? (SOLVED)
Thank you Mr. Rao, I have changed your advice but there is not any change. As I said before, I should sum three condition. 1. all, 2. Header Ödeme Yeri = "Büroda", 3 - Header Ödeme Yeri = "Havale" and I want to show three total in footer "Tutar" column.
xBrowse sum help? (SOLVED)
XBrowse does not natively support multiple totals in a single column. We need to use workaround. Please try this sample: [code=fw:2xlcozvv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;USE CUSTOMER<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-15</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"CUSTOMER"</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"MARRIED"</span>, <span style="color: #ff0000;">"SALARY"</span>, <span style="color: #ff0000;">"SALARY AS SALU"</span> ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #000000;">100</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">120</span> ;<br />&nbsp; &nbsp; &nbsp; LINES NOBORDER FASTEDIT FOOTERS<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nFooterLines</span> &nbsp;:= <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br /><br />&nbsp; &nbsp; &nbsp; WITH OBJECT :<span style="color: #000000;">Married</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"Total"</span> + CRLF + <span style="color: #ff0000;">"Married"</span> + CRLF + <span style="color: #ff0000;">"Unmarried"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nFootStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp; &nbsp; WITH OBJECT :<span style="color: #000000;">Salary</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">cEditPicture</span> &nbsp;:= <span style="color: #ff0000;">"@E 999,999,999.99"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nFooterType</span> &nbsp; := AGGR_SUM<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">Married</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">&#123;</span> |o| TRANSFORM<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nTotal</span> + oBrw:<span style="color: #000000;">SalU</span>:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSFORM<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSFORM<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SalU</span>:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp; &nbsp; WITH OBJECT :<span style="color: #000000;">SalU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nFooterType</span> &nbsp; := AGGR_SUM<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> || !oBrw:<span style="color: #000000;">Married</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lHide</span> &nbsp; &nbsp; &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;CLOSE CUSTOMER<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2xlcozvv] [url=https&#58;//imageshack&#46;com/i/poIjGazMp:2xlcozvv][img:2xlcozvv]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/924/IjGazM&#46;png[/img:2xlcozvv][/url:2xlcozvv] Please use similar logic in your program.
xBrowse sum help? (SOLVED)
[quote="nageswaragunupudi":1srs5p8z]XBrowse does not natively support multiple totals in a single column. We need to use workaround. Please try this sample: [code=fw:1srs5p8z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   USE CUSTOMER<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;">-15</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE <span style="color: #ff0000;">"CUSTOMER"</span> ;<br />      COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"MARRIED"</span>, <span style="color: #ff0000;">"SALARY"</span>, <span style="color: #ff0000;">"SALARY AS SALU"</span> ;<br />      COLSIZES <span style="color: #000000;">100</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">120</span> ;<br />      LINES NOBORDER FASTEDIT FOOTERS<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nStretchCol</span>   := <span style="color: #000000;">1</span><br />      :<span style="color: #000000;">nFooterLines</span>  := <span style="color: #000000;">3</span><br />      :<span style="color: #000000;">nEditTypes</span>    := EDIT_GET<br /><br />      WITH OBJECT :<span style="color: #000000;">Married</span><br />         :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         :<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"Total"</span> + CRLF + <span style="color: #ff0000;">"Married"</span> + CRLF + <span style="color: #ff0000;">"Unmarried"</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">nFootStrAlign</span> := AL_RIGHT<br />      END<br /><br />      WITH OBJECT :<span style="color: #000000;">Salary</span><br />         :<span style="color: #000000;">cEditPicture</span>  := <span style="color: #ff0000;">"@E 999,999,999.99"</span><br />         :<span style="color: #000000;">nFooterType</span>   := AGGR_SUM<br />         :<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">Married</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">bFooter</span> := <span style="color: #000000;">&#123;</span> |o| TRANSFORM<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nTotal</span> + oBrw:<span style="color: #000000;">SalU</span>:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />                           TRANSFORM<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />                           TRANSFORM<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SalU</span>:<span style="color: #000000;">nTotal</span>, o:<span style="color: #000000;">cEditPicture</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      END<br /><br />      WITH OBJECT :<span style="color: #000000;">SalU</span><br />         :<span style="color: #000000;">nFooterType</span>   := AGGR_SUM<br />         :<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> || !oBrw:<span style="color: #000000;">Married</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">lHide</span>         := .t.<br />      END<br /><br />      :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   CLOSE CUSTOMER<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1srs5p8z] [url=https&#58;//imageshack&#46;com/i/poIjGazMp:1srs5p8z][img:1srs5p8z]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/924/IjGazM&#46;png[/img:1srs5p8z][/url:1srs5p8z] Please use similar logic in your program.[/quote:1srs5p8z] Thank you very much Mr. Rao. I have done like you described.
xBrowse sumar columna segun criterio
Hola buenas tardes, necesito totalizar una columna siempre que no este anulada, de hecho la dejo visible por cuestiones de auditoria. [code=fw:b4bamn0u]<div class="fw" id="{CB}" style="font-family: monospace;">                *-----------------------------------------------------------<br />                oCol := ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                   oCol:<span style="color: #000000;">cHeader</span>       := <span style="color: #ff0000;">"Importe"</span><br />                   oCol:<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">110</span><br />                   oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />                   oCol:<span style="color: #000000;">bEditValue</span>    := <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">oQry</span>:<span style="color: #000000;">importe</span> <span style="color: #000000;">&#125;</span><br />                   oCol:<span style="color: #000000;">cEditPicture</span>  := <span style="color: #ff0000;">"@Z 9,999.99"</span><br />                   oCol:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span>         <span style="color: #B900B9;">// 0=Izquierda   1=Derecha   2=Centrado</span><br />                   oCol:<span style="color: #000000;">nFootStrAlign</span> := <span style="color: #000000;">1</span><br />                   oCol:<span style="color: #000000;">nTotal</span>        := <span style="color: #000000;">0</span><br />                   oCol:<span style="color: #000000;">lTotal</span>        := .T.<br />                   oCol:<span style="color: #000000;">nFooterType</span>   := AGGR_TOTAL<br />                *-----------------------------------------------------------<br /> </div>[/code:b4bamn0u] Quiero que sume la columna importe siempre que no este anulada SI ::oQry:anulado=="A" ENTONCES ESTA ANULADA Saludos Marcelo
xBrowse sumar columna segun criterio
A ver si te vale [quote:16u4pgyx] Class TXBrwColumn bSumCondition B Format: { |@value,oCol| lIncludeInTotals } Used for conditional / calculated totals by MakeTotals(). If specified, the cell value is included in totals only if the block returns .t.. In addition, the block can set the 1st parameter to a different calculated value to be included in totals. Also see method ::SumValue() [/quote:16u4pgyx]
xBrowse sumar columna segun criterio
Hola Cristobal, lo solucione asi: [code=fw:3hwoajwa]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bSumCondition</span> := <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">oQry</span>:<span style="color: #000000;">anulado</span><><span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#125;</span></div>[/code:3hwoajwa] por si alguno le sirve. Saludos Marcelo
xBrowse tab key error with EDIT_LISTBOX
To All I get this error with FWH1203 as well as FWH 1408 .. when I navigate to the EDIT_LISTBOX and hit the letter P ( for parts ) the drop down listbox finds the correct line, if I hit the TAB key to navigate to the next cell I get this error. The error only occurs if I TAB through the Listbox .. if I hit the ENTER key I have no problems .. see screen shots and error code. Any suggestions would be welcome! Rick Lipkin [url=http&#58;//postimage&#46;org/:7wawdjtn][img:7wawdjtn]http&#58;//s24&#46;postimg&#46;org/7qe0avs1x/Browse1&#46;jpg[/img:7wawdjtn][/url:7wawdjtn] [url=http&#58;//postimage&#46;org/:7wawdjtn][img:7wawdjtn]http&#58;//s4&#46;postimg&#46;org/782czx02l/browse2&#46;jpg[/img:7wawdjtn][/url:7wawdjtn] [code=fw:7wawdjtn]<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;">C</span>:\Fox\SaLite\Saw32.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">5</span>,<span style="color: #000000;">009</span>,<span style="color: #000000;">408</span> bytes<br />   Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Build <span style="color: #000000;">20131030</span><span style="color: #000000;">&#41;</span><br />   FiveWin  Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">14.08</span><br />   Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">36</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">10</span>/<span style="color: #000000;">08</span>/<span style="color: #000000;">2014</span>, <span style="color: #000000;">16</span>:<span style="color: #000000;">38</span>:<span style="color: #000000;">50</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span>  <span style="color: #00C800;">Class</span>: <span style="color: #ff0000;">'NIL'</span> has no exported <span style="color: #00C800;">method</span>: <span style="color: #000000;">NLASTKEY</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U   <br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => NLASTKEY<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">POSTEDIT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11905</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBRWCOLUMN:<span style="color: #000000;">SHOWBTNLIST</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11803</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #000000;">KEYDOWN</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2677</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">KEYDOWN</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1047</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">LISTBOX</span>.PRG => TLISTBOX:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">570</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3291</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1015</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">322</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:7wawdjtn] [code=fw:7wawdjtn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #B900B9;">// type pull down codeblock</span><br />oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>    := EDIT_LISTBOX<br />oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> := aType<br />oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span>  := <span style="color: #000000;">&#123;</span>|o,v| _GetPullDown<span style="color: #000000;">&#40;</span> v,oLbxB,oRsDetail <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #B900B9;">//-----------------</span><br /><span style="color: #00C800;">Static</span> Func _GetPullDown<span style="color: #000000;">&#40;</span> v,oLbxB,oRsDetail <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Local</span> Saying<br /><br /><span style="color: #B900B9;">// do not allow update if LockedDown is true</span><br /><br /><span style="color: #00C800;">If</span> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"LockedDown"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> = .t.<br />   <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Else</span><br /><br />   <span style="color: #00C800;">If</span> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"IsLabor"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> = .t.<br />      <span style="color: #00C800;">If</span> v = <span style="color: #ff0000;">"Labor"</span><br />      <span style="color: #00C800;">Else</span><br />         Saying := <span style="color: #ff0000;">"Sorry .. you can not change the type because there"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         Saying += <span style="color: #ff0000;">"is Labor Itemized against this Line"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> Saying <span style="color: #000000;">&#41;</span><br />         v := <span style="color: #ff0000;">"Labor"</span><br />         <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">Endif</span><br />   <span style="color: #00C800;">Endif</span><br /><br /><br />   oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Inventory Type"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := v<br />   oRsDetail:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:7wawdjtn]
xBrowse tab key error with EDIT_LISTBOX
Thanks for pointing out. We are looking into this.
xBrowse table Tree
Dear all, I have this xBrowse tree with single level on my dbfs for some time now.. I'd like to make this tree to branch-out depending on the column I would like to define as sub-tree.. here: [img:3ldvv5ru]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/tree1_zps6f315437&#46;png[/img:3ldvv5ru] [code=fw:3ldvv5ru]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">SetTree</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'Expand16'</span>, <span style="color: #ff0000;">'Collapse16'</span>, <span style="color: #ff0000;">''</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:3ldvv5ru] result: [img:3ldvv5ru]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/tree2_zps89d77377&#46;png[/img:3ldvv5ru] How can I branch a tree to 'common'? like: MIS | + --- common | + --- C01 --- E01
xBrowse table Tree
Dear All, I am trying to do is like this on a single table with xbrowse [img:50b1hzxc]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/tree3_zps738f977f&#46;png[/img:50b1hzxc]
xBrowse table Tree
RAO?
xBrowse table Tree
Here you have it [code=fw:3ejpwxhd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />*<br />*  XbTree2.Prg<br />*  G.N.Rao<br />*<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ord.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />REQUEST DBFCDX<br /><br />#xtranslate bmp<span style="color: #000000;">&#40;</span> <c> <span style="color: #000000;">&#41;</span> => <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16"</span> + chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">92</span><span style="color: #000000;">&#41;</span> + <c> + <span style="color: #ff0000;">".bmp"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------// </span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   CreateTestData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   TreeBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #0000ff;">init</span> procedure PrgInit<br /><br />   SET DATE ITALIAN<br />   SET CENTURY <span style="color: #0000ff;">ON</span><br />   SET TIME FORMAT <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HH:MM:SS"</span><br />   SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">YEAR</span><span style="color: #000000;">&#40;</span>DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-50</span><br /><br />   SET DELETED <span style="color: #0000ff;">ON</span><br />   SET EXCLUSIVE OFF<br /><br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />   XbrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'A'</span>, .t. <span style="color: #000000;">&#41;</span><br />   SetKinetic<span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span><br />   SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />exit procedure PrgExit<br /><br />   SET RESOURCES <span style="color: #0000ff;">TO</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> TreeBrowse<br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oTree<br />   <span style="color: #00C800;">local</span> aTot  := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> aColors  := <span style="color: #000000;">&#123;</span>  <span style="color: #000000;">&#123;</span> CLR_WHITE,   CLR_GREEN         <span style="color: #000000;">&#125;</span>, ;<br />                        <span style="color: #000000;">&#123;</span> CLR_BLACK,   RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">180</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span>, ;<br />                        <span style="color: #000000;">&#123;</span> CLR_BLACK,   CLR_WHITE         <span style="color: #000000;">&#125;</span>  <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #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;">-12</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;">250</span>,<span style="color: #000000;">600</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Xbrowse Tree"</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   oTree    := MakeTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><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 oTree ;<br />      HEADERS <span style="color: #ff0000;">"Mis Info"</span> ;<br />      CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> bmp<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"open"</span> <span style="color: #000000;">&#41;</span>, bmp<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"folder"</span> <span style="color: #000000;">&#41;</span>, bmp<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"spurce"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">bClrStd</span>          := <span style="color: #000000;">&#123;</span> || aColors<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">nLevel</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">nStretchCol</span>      := <span style="color: #000000;">1</span><br />      :<span style="color: #000000;">lHScroll</span>         := .f.<br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   oBrw:<span style="color: #000000;">oTree</span>:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MakeTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   field MIS,COMMON,INFO<br />   <span style="color: #00C800;">local</span> oTree<br />   <span style="color: #00C800;">local</span> cMis, cCommon<br /><br />   USE FRAXZI <span style="color: #00C800;">NEW</span> SHARED<br />   <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> MIS+COMMON+INFO TAG MISTREE <span style="color: #0000ff;">TO</span> TMP MEMORY<br />   SET FILTER <span style="color: #0000ff;">TO</span> !EMPTY<span style="color: #000000;">&#40;</span>COMMON<span style="color: #000000;">&#41;</span> .AND. !EMPTY<span style="color: #000000;">&#40;</span>INFO<span style="color: #000000;">&#41;</span><br />   GO TOP<br /><br />   TREE oTree<br /><br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> .not. eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      TREEITEM <span style="color: #ff0000;">"MIS:"</span> + MIS<br />      cMis     := MIS<br /><br />      TREE<br />      <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> MIS == cMis<br />         TREEITEM <span style="color: #ff0000;">"Common:"</span> + COMMON<br />         cCommon  := COMMON<br /><br />         TREE<br />         <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> COMMON == cCommon<br />            TREEITEM INFO<br />            SKIP<br />         <span style="color: #00C800;">enddo</span><br />         ENDTREE<br /><br />      <span style="color: #00C800;">enddo</span><br />      ENDTREE<br /><br />   <span style="color: #00C800;">enddo</span><br />   ENDTREE<br /><br />   CLOSE FRAXZI<br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> createTestData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   field MIS,COMMON,INFO<br /><br />   <span style="color: #00C800;">local</span> aCols := <span style="color: #000000;">&#123;</span>  ;<br />      <span style="color: #000000;">&#123;</span>  <span style="color: #ff0000;">"MIS"</span>,     <span style="color: #ff0000;">"C"</span>,   <span style="color: #000000;">3</span>,   <span style="color: #000000;">0</span>  <span style="color: #000000;">&#125;</span>, ;<br />      <span style="color: #000000;">&#123;</span>  <span style="color: #ff0000;">"COMMON"</span>,  <span style="color: #ff0000;">"C"</span>,   <span style="color: #000000;">3</span>,   <span style="color: #000000;">0</span>  <span style="color: #000000;">&#125;</span>, ;<br />      <span style="color: #000000;">&#123;</span>  <span style="color: #ff0000;">"INFO"</span>,    <span style="color: #ff0000;">"C"</span>,  <span style="color: #000000;">10</span>,   <span style="color: #000000;">0</span>  <span style="color: #000000;">&#125;</span>  <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">local</span> i,n,m<br /><br />   DbCreate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"FRAXZI.DBF"</span>, aCols, <span style="color: #ff0000;">"DBFCDX"</span>, .t., <span style="color: #ff0000;">"FRX"</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">20</span><br /><br />      APPEND BLANK<br />      n           := HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />      MIS         := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FAP"</span>,<span style="color: #ff0000;">"RIR"</span>,<span style="color: #ff0000;">"TDG"</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      m           := HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />      COMMON      := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"C01"</span>,<span style="color: #ff0000;">"D01"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"E01"</span>,<span style="color: #ff0000;">"F01"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"G01"</span>,<span style="color: #ff0000;">"L01"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#91;</span> n, m <span style="color: #000000;">&#93;</span><br />      INFO        := <span style="color: #ff0000;">"1411"</span> + Str<span style="color: #000000;">&#40;</span> HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1111111</span>,<span style="color: #000000;">2999911</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">next</span> i<br /><br />   CLOSE FRX<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:3ejpwxhd][url=https&#58;//imageshack&#46;com/i/id9YWIjOj:3ejpwxhd][img:3ejpwxhd]http&#58;//imagizer&#46;imageshack&#46;us/v2/xq90/661/9YWIjO&#46;jpg[/img:3ejpwxhd][/url:3ejpwxhd]
xBrowse table Tree
Dear RAO, Great example! <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> This is more than I expected <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> I will try to improved this and will post it here. Good god we have you here.
xBrowse template creator (Uwe)
Hello Uwe, I did some work today with your xBrowse template creator. This is really a very useful tool. Thank you for sharing. Is the sourcecode of the creator available? If not would you be so kind to prepare a version for me with opens in a size of 800*600 or a little smaller. Thanks in advance Otto
xBrowse template creator (Uwe)
Uwe: Where I can download the tool ? Thank you.
xBrowse template creator (Uwe)
You can Download from here. <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/brwtools5.zip">http://www.pflegeplus.com/fw_downloads/brwtools5.zip</a><!-- m --> Read something about the Update : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=13831&p=71403#p71403">viewtopic.php?f=3&t=13831&p=71403#p71403</a><!-- l --> Otto, there will be a new xBrowse-Tool-Update in a short time with some more functions : Gradient-selection, Multiline-Header... A Screen-resolution to a lower size is possible. Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse tipo excel
Maestro Antonio Linares cambie la clase xBrowse para que trabaje en forma de edición tipo excel el trabaja con las tecla direccionales cuando presiono la tecla direccional el se va para la columna o fila y queda en modo edición, cada vez que presiono enter el se va a la columna siguiente y si es la ultima columna pasa a la siguiente fila primera columna quedando siempre en forma de edición, tome en cuenta si se existe el Freezer. La ventaja es que el valid queda activo y en el caso que uno quiera puede actualizar el valor de la base de datos como esta en el ejemplo dadopuede ser una buena contribución para el forum.<!-- m --><a class="postlink" href="http://www.accasoft.net/Ejemplo%20xBrowse%20Estilo%20Excel.zip">http://www.accasoft.net/Ejemplo%20xBrow ... 0Excel.zip</a><!-- m -->
xBrowse tipo excel
Con F2 puede mover las teclas direccionales dentro del get
xBrowse to EXCEL
If I export from xBrowse to Excel with the build in :toEXCEL() method I get with values with a decimal place wrong values in EXCEL. Could someone please help. Thanks in advance Otto [img:1oelofrj]http&#58;//www&#46;atzwanger-software&#46;com/fw/excelexport&#46;jpg[/img:1oelofrj]
xBrowse to EXCEL
Otto XbrNumFormat( 'E', .T. ) Hth Richard CHIDIAK
xBrowse to EXCEL
[quote="Richard Chidiak":1atqmh9y]Otto XbrNumFormat( 'E', .T. ) Hth Richard CHIDIAK[/quote:1atqmh9y] Mr Otto If the above advice of Mr. Richard does not work, please try setting oBrw:lExcelCellWise := .t. while defining the browse. Please let us know the results.
xBrowse to EXCEL
Thank you Richard, thank you Mr. Rao, The suggestion from Mr. Rao (oBrw:lExcelCellWise := .t.) is working. XbrNumFormat has no effect. Thank you again. Best regards, Otto
xBrowse to Excel how to bring ON TOP ?
Hello, 1. I have a browser inside a FOLDER. 2. a print and EXCEL-button from the main-dialog. The report is shown on top but it is impossible, to bring EXCEL on top. [img:2v4xtz1o]http&#58;//www&#46;pflegeplus&#46;com/pictures/xbrexcel&#46;jpg[/img:2v4xtz1o] how to bring EXCEL on top ? [color=#0000FF:2v4xtz1o][b:2v4xtz1o]@ 245, 240 BTNBMP oBtn2 OF oDlg ; SIZE 50, 25 PIXEL; NOBORDER ; PROMPT "&Excel " ; ACTION IIF( oFld:nOption = 1, oBrw1:ToExcel(,1), oBrw2:ToExcel() ) ; FILENAME c_path1 + "Excel.Bmp" ; FONT oFont1 2007 ; LEFT oBtn2:lTransparent := .t. oBtn2:cToolTip = { "Export " + CRLF + "to EXCEL","EXPORT", 1, CLR_BLACK, 14089979 } oBtn2:SetColor( 0, )[/b:2v4xtz1o][/color:2v4xtz1o] Defined inside a FOLDER-page. oBrw1 is STATIC [color=#FF0000:2v4xtz1o][b:2v4xtz1o]@ 30, 30 XBROWSE oBrw1 SIZE 265, 173 PIXEL OF oFld:aDialogs[ 1 ] ; COLUMNS 1, 2, 3, 4, 5, 6, 7, 8 ; HEADERS "CHR","ASC", "CHR","ASC", "CHR","ASC", "CHR","ASC" ; COLSIZES 50, 50, 50, 50, 50, 50, 50, 50 FONT oFont1 ; ARRAY aPrint1 LINES FASTEDIT CELL oBrw1:lHScroll := .F. WITH OBJECT oBrw1 :nEditTypes := EDIT_GET :CreateFromCode() END I := 1 FOR I := 1 to 8 oBrw1:aCols[ I ]:nDataStrAlign := AL_CENTER NEXT[/b:2v4xtz1o][/color:2v4xtz1o] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->