topic
stringlengths
1
63
text
stringlengths
1
577k
xbrowse drag multiple cells
Hello I would like to select multiple cells with the cursor, drag them and drop at another location ? Has anyone done it with xbrowse ? Can you share a sample ? It is ok for me to drag and drop one cell, i have it working, Thanks for your help, Richard
xbrowse drag multiple cells
Me long expecting too! Maybe xbrowse should add a new data selected rows & cols, different to selected rows only. Regards! Shuming Wang
xbrowse e registros borrados
Olá, xbrowse no pinta correctamente la barra vertical se hay registros borrados. Hay alguma manera sem usar lo ! Deleted() en el indice?Gracias.
xbrowse e registros borrados
[quote="Wanderson":ui6tkr8q]Olá, xbrowse no pinta correctamente la barra vertical se hay registros borrados. Hay alguma manera sem usar lo ! Deleted() en el indice? Gracias.[/quote:ui6tkr8q]index on clave tag clave for !deleted()
xbrowse edit column
Hi, I have a array xbrowse, how i can turn a cell editable and process a function when finish edit and make total this column? Thanks in advance.
xbrowse edit column
Set oCol:nEditType := EDIT_GET. That makes the cell editable. If you are not using a very old version of FWH, retotalling is automatically done by XBrowse. When
xbrowse edit column
[quote="nageswaragunupudi":1m8v0sda]Set oCol:nEditType := EDIT_GET. That makes the cell editable. If you are not using a very old version of FWH, retotalling is automatically done by XBrowse. When[/quote:1m8v0sda] Thanks for the answer but is not column totals, other totals in gets with many expressions. I want to do after edit the cell.
xbrowse edit column
[code=fw:3kwep7ds]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">&#123;</span> |oCol, uOldValue| yourfunction<span style="color: #000000;">&#40;</span> oCol, uOldValue <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:3kwep7ds]
xbrowse edit column
[quote="nageswaragunupudi":1k5j0jtd][code=fw:1k5j0jtd]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">&#123;</span> |oCol, uOldValue| yourfunction<span style="color: #000000;">&#40;</span> oCol, uOldValue <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:1k5j0jtd][/quote:1k5j0jtd] Thank you! Works great!
xbrowse edit columns
Can not edit a column of a one row of xbrowse ? I explain you I have this xbrowse [img:2vwgch1v]https&#58;//s9&#46;postimg&#46;cc/jj80u0adb/image&#46;jpg[/img:2vwgch1v] I wish edit only for the first row only the columns I draw on green box it's possible ?
xbrowse edit columns
See oCol:nEditType := any value > 0 like EDIT_GET, EDIT_BUTTON, etc for the columns you want to edit. Retain oCol:nEditType := 0 for other columns. What else am I missing?
xbrowse edit columns
Sorry perhaps I not explain good Look the picture please for the [b:1fv4ko86]first record[/b:1fv4ko86] I wish edit only the columns 8 and 9 ( dates) and this record must not deleted from second record to all records I wish edit only the column 4 and 5 , 8 and 9 ( and can be deleted) thanks
xbrowse edit columns
For columns 4,5,8 and 9, set nEditType := EDIT_GET or EDIT_BUTTON or etc. For columns 8 and 9 also add [code=fw:el5275gs]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCol:<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">BookMark</span> == <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:el5275gs] Deletion has to be handled in the program code.
xbrowse edit columns
WITH OBJECT oBrw:aCols[ 5] :AddBmpFile(".\bitmaps\sh_plus.bmp") :nBtnBmp := 1 :nwidth := 60 :nDataStrAlign := AL_CENTER :nHeadStrAlign := AL_CENTER :nEditType := EDIT_BUTTON :bEditBlock := { ||RES->QUANTITY++ } :lBtnTransparent := .t. [b:39btt9cw] :bEditWhen := { || oBrw:BookMark == 1 }[/b:39btt9cw] END not run it add the quantity also the record number 1 I think ed something of :bEditWhen := { ||oBrw:aArrayData:nat<>1 } where 1 is the first record If you see the picture I wish the final user can edit only date for the first line of xbrowse I wish also the final user cannot delete the first line
xbrowse edit columns
I tried also with :nEditType := EDIT_BUTTON :bEditBlock := { |o|Msginfo("") } :bEditWhen := { || oBrw:nArrayAt<>1 } I wish when on first line of the browse thefinal user cannot edit the cell the user can edit only from second line
xbrowse edit columns
Please try :bEditWhen := { || oBrw:KeyNo == 1 }
xbrowse edit columns
This is possible in 18.04: [url=https&#58;//imageshack&#46;com/i/pm8xqYCDp:3uwvn6ju][img:3uwvn6ju]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/922/8xqYCD&#46;png[/img:3uwvn6ju][/url:3uwvn6ju] For Gets also.
xbrowse edit columns
[quote="nageswaragunupudi":1n7w8la6]This is possible in 18.04: [url=https&#58;//imageshack&#46;com/i/pm8xqYCDp:1n7w8la6][img:1n7w8la6]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/922/8xqYCD&#46;png[/img:1n7w8la6][/url:1n7w8la6] For Gets also.[/quote:1n7w8la6] [size=200:1n7w8la6]GOOD[/size:1n7w8la6] [size=200:1n7w8la6]RAO YOU'RE FANTASTIC[/size:1n7w8la6] tha value must be on center!
xbrowse edit columns
Rao :bEditWhen := { || oBrw:KeyNo == 1 } I tried also with :bEditWhen := { || oBrw:KeyNo <>1 } it continue to process the editblock on first line
xbrowse edit columns
Rao if you try this test [code=fw:n6tj41b6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw<br /><br />   USE c:\work\FWH\SAMPLES\CUSTOMER   <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;">700</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<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 DATASOURCE <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      :<span style="color: #000000;">nEditType</span>     := EDIT_BUTTON<br />      :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"OPEN"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">nBtnBmp</span>       := <span style="color: #000000;">1</span><br />      :<span style="color: #000000;">bEditBlock</span>    := <span style="color: #000000;">&#123;</span> || test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">beditwhen</span>    := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">keyno</span> <> <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />   END<br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"modified"</span></div>[/code:n6tj41b6] it modified the record inserting "modified" I wish no modify the first record How I can resolve ? [b:n6tj41b6]beditwhen[/b:n6tj41b6] must make as this function Function test(oBrw) IF oBrw:keyno =1 Msginfo(" I cannot mofified") else return "modified" endif return nil but it not run ok Now I correct with :bEditBlock := { ||IF(oBrw:KeyNo=1,,RES->QUANTITY++) } but I cannot use bwhenedit codeblock
xbrowse edit columns
Now with these lines seem run ok [code=fw:23yhndch]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br />            :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>h_minus.bmp"</span><span style="color: #000000;">&#41;</span><br />            :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br />            :<span style="color: #000000;">nwidth</span>    := <span style="color: #000000;">40</span><br />            :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br />            :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span> ||IF<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">KeyNo</span>=<span style="color: #000000;">1</span>,,IIF<span style="color: #000000;">&#40;</span>RES->QUANTITY><span style="color: #000000;">1</span>, RES->QUANTITY--,RES->QUANTITY:= <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />            :<span style="color: #000000;">lBtnTransparent</span> := .t.<br />            :<span style="color: #000000;">lBmpStretch</span> := .t.<br />            :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br />            :<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />         END<br /><br /><br />          WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br />            :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>h_plus.bmp"</span><span style="color: #000000;">&#41;</span><br />            :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br />            :<span style="color: #000000;">nwidth</span>    := <span style="color: #000000;">60</span><br />            :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br />            :<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />            :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br />            :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span> ||IF<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">KeyNo</span>=<span style="color: #000000;">1</span>,,RES->QUANTITY++<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />            :<span style="color: #000000;">lBtnTransparent</span> := .t.<br />           END</div>[/code:23yhndch] is there a bug on bwhenedit codeblock ?
xbrowse edit columns
[quote:47mkkfzn]is there a bug on bwhenedit codeblock ? [/quote:47mkkfzn] You are right. bEditWhen is not preventing button action of EDIT_BUTTON. This is now fixed in 18.04.
xbrowse edit columns
thanks
xbrowse edit columns
Saludos estoy necesitando poner un button en el xbrowse que me lleve a una consulta de movimientos del documento seleccionado todo funciona bien le he puesto una imagen al button pero cuando abandono la aplicación se me cuelga comento ese configuracion de la columna y termina normal. /* WITH OBJECT aBrw:aCols[ 1 ] :addbmpfile( op:bmp16+"eye.bmp" ) :nBtnBmp := 1 :nEditType := EDIT_BUTTON :bEditBlock := {|| VerItems( cCodigo,cQry:tipo,cQry:ord_comp )} :lBtnTransparent := .t. :lBmpStretch := .t. END */ he tenido que solucionarlo usando :aCols[01]:bLDClickData := { || VerItems( cCodigo,cQry:tipo,cQry:ord_comp ) } version de FWH 1801 hay alguna razon ??
xbrowse edit columns
Friends, how to do this with 2 buttons + - REGARDS
xbrowse edit columns
hello
xbrowse edit columns
please search Rao's sample test from 18.04: [code=fw:zurte0da]<div class="fw" id="{CB}" style="font-family: monospace;">   <br />WITH OBJECT oBrowse:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br />          :<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">100</span><br />          :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br />          :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> FW_BmpPlus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, FW_BmpMinus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />          <span style="color: #B900B9;">// Right Button</span><br />         :<span style="color: #000000;">nEditType</span>     := EDIT_BUTTON<br />         :<span style="color: #000000;">bEditBlock</span>    := <span style="color: #000000;">&#123;</span> |r,c,oCol|IIF<span style="color: #000000;">&#40;</span>!oBrowse:<span style="color: #000000;">nArrayAt</span> = <span style="color: #000000;">1</span>, oCol:<span style="color: #000000;">Value</span> + <span style="color: #000000;">1</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">nBtnBmp</span>       := <span style="color: #000000;">1</span><br />         :<span style="color: #000000;">lBtnTransparent</span>  := .t.<br /><br />         <span style="color: #B900B9;">// Left Button</span><br />           :<span style="color: #000000;">bBmpData</span>      := <span style="color: #000000;">&#123;</span> |v,lSel| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lSel, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />           :<span style="color: #000000;">bBmpAction</span>    := <span style="color: #000000;">&#123;</span> |oCol|  IIF<span style="color: #000000;">&#40;</span>!oBrowse:<span style="color: #000000;">nArrayAt</span> = <span style="color: #000000;">1</span>,IIF<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">Value</span>><span style="color: #000000;">0</span>,oCol:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">Value</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />           :<span style="color: #000000;">bOnChange</span> := bCalcRow<br />           :<span style="color: #000000;">lBmpTransparent</span> := .T.<br />        END</div>[/code:zurte0da]
xbrowse edit dbcombo
Hello, I am trying to get a dbcombo functional in this xbrowse sample by Mr. Nages The oRec:drvr displays fine ,but without any functional dbcombo. Don't know if I've chosen the proper form of dbcombo or have the syntax correct. Any help appreciated. Bruce [code=fw:2v732in1]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">Local</span> oTruc, oBrw, oDlg, oRec<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// path_seg defined static above &nbsp; </span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oTruc := TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oTruc := TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> , cPath_seg + <span style="color: #ff0000;">'TRUC'</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">100</span>&nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" Tdatabase Test"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">12</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;">-30</span> &nbsp;<span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp;FIELDS oTruc:<span style="color: #000000;">TAG</span> &nbsp;, oTruc:<span style="color: #000000;">Que_dte</span>, oTruc:<span style="color: #000000;">Shp_dte</span>, oTruc:<span style="color: #000000;">org</span> &nbsp;, oTruc:<span style="color: #000000;">DrpA</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTruc:<span style="color: #000000;">DrpB</span> , oTruc:<span style="color: #000000;">DrpC</span> &nbsp;, &nbsp;oTruc:<span style="color: #000000;">Drvr</span> &nbsp; , oTruc:<span style="color: #000000;">Qty1</span> , oTruc:<span style="color: #000000;">Desc1</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTruc:<span style="color: #000000;">Qty2</span> &nbsp;, &nbsp;oTruc:<span style="color: #000000;">Desc2</span> &nbsp;, oTruc:<span style="color: #000000;">Trip_num</span>,oTruc:<span style="color: #000000;">Notes</span> ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;HEADERS <span style="color: #ff0000;">"Tag"</span>,<span style="color: #ff0000;">"Que Date"</span>,<span style="color: #ff0000;">"Ship Date"</span>, <span style="color: #ff0000;">"Orgin"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"DR"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Qty1"</span>,<span style="color: #ff0000;">"Desc1"</span>,<span style="color: #ff0000;">"Qty2"</span>,<span style="color: #ff0000;">"Desc2"</span>, <span style="color: #ff0000;">"Trip #"</span>, <span style="color: #ff0000;">"Notes"</span> ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;FIELDSIZES <span style="color: #000000;">30</span> &nbsp;, <span style="color: #000000;">60</span> &nbsp; &nbsp; &nbsp; , <span style="color: #000000;">60</span> &nbsp; &nbsp; &nbsp; &nbsp;, &nbsp;<span style="color: #000000;">45</span>, &nbsp; &nbsp; <span style="color: #000000;">45</span>, &nbsp;<span style="color: #000000;">45</span>, &nbsp;<span style="color: #000000;">45</span>, <span style="color: #000000;">40</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">30</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">160</span> ;<br />&nbsp; &nbsp; &nbsp;OBJECT oTruc ;<br />&nbsp; &nbsp; &nbsp;AUTOSORT ;<br />&nbsp; &nbsp; &nbsp;CELL LINES NOBORDER <br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; :<span style="color: #000000;">bEdit</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> |oRec| CustEditDlg<span style="color: #000000;">&#40;</span> oRec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// reconfigures edit() &nbsp; </span><br />&nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// seems to need this to make xbrowse display</span><br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">170</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Add"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRec := TDataRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oTruc, <span style="color: #00C800;">nil</span>, .t. <span style="color: #000000;">&#41;</span>, oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">170</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Edit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRec := TDataRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oTruc <span style="color: #000000;">&#41;</span>, oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<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 />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oTruc:<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 /><span style="color: #B900B9;">//---------------------------------------//</span><br /><span style="color: #B900B9;">// downloaded 02/09/15 FW</span><br /><span style="color: #B900B9;">// 09/08/13 cust edit dialog nages - Xbrow, add, edit, modify, delete</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> CustEditDlg<span style="color: #000000;">&#40;</span> oRec <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oGrp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDrv, oDbc2 &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oDrv := TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oDrv := TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> , cPath_seg + <span style="color: #ff0000;">'T_drv'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">618</span>,<span style="color: #000000;">382</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"EDIT MILL"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">4</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">168</span>, <span style="color: #000000;">305</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">12</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Tag:"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Tag</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">26</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Que Dte:"</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">24</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Que_dte</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Shp_dte:"</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">38</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">shp_dte</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">54</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Org:"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">13</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">52</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">org</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">68</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp A:"</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">19</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">66</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpA</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">82</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp B:"</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">80</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpB</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp C:"</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">29</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">94</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpC</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">44</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">124</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drvr:"</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> &nbsp;oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 122, 44 GET &nbsp;oRec:Drvr OF oDlg SIZE 12, 12 PIXEL UPDATE PICTURE &nbsp;"99"</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">146</span>, <span style="color: #000000;">40</span> dbcombo oDBC2 <span style="color: #0000ff;">var</span> oRec:<span style="color: #000000;">Drvr</span> <span style="color: #0000ff;">of</span> oDlg;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">alias</span> oDrv:<span style="color: #000000;">cAlias</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">size</span> <span style="color: #000000;">75</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">pixel</span>;<br />&nbsp; &nbsp; &nbsp; itemfield <span style="color: #ff0000;">"DRVR"</span> ;<br />&nbsp; &nbsp; &nbsp; listfield <span style="color: #ff0000;">"TNAME"</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">update</span> &nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">138</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Qty 1:"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">136</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Qty1</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">PICTURE</span> &nbsp;<span style="color: #ff0000;">"999999.99"</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">152</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Desc 1:"</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">150</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Desc1</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">172</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Undo"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">UnDo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">172</span>, <span style="color: #000000;">219</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Save"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">172</span>, <span style="color: #000000;">263</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> CANCEL <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Save Changes ?"</span> <span style="color: #000000;">&#41;</span>, oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> |o| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">ClassName</span> == <span style="color: #ff0000;">"TGET"</span>, o:<span style="color: #000000;">bValid</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#125;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">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;oDrv:<span style="color: #000000;">close</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></div>[/code:2v732in1]
xbrowse edit dbcombo
Please indicate version of FWH you are using
xbrowse edit dbcombo
1) Please substitute this [code=fw:6ymsvaci]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; FIELDS oTruc:<span style="color: #000000;">TAG</span> &nbsp;, oTruc:<span style="color: #000000;">Que_dte</span>, oTruc:<span style="color: #000000;">Shp_dte</span>, oTruc:<span style="color: #000000;">org</span> &nbsp;, oTruc:<span style="color: #000000;">DrpA</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTruc:<span style="color: #000000;">DrpB</span> , oTruc:<span style="color: #000000;">DrpC</span> &nbsp;, &nbsp;oTruc:<span style="color: #000000;">Drvr</span> &nbsp; , oTruc:<span style="color: #000000;">Qty1</span> , oTruc:<span style="color: #000000;">Desc1</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTruc:<span style="color: #000000;">Qty2</span> &nbsp;, &nbsp;oTruc:<span style="color: #000000;">Desc2</span> &nbsp;, oTruc:<span style="color: #000000;">Trip_num</span>,oTruc:<span style="color: #000000;">Notes</span> ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;</div>[/code:6ymsvaci] with [code=fw:6ymsvaci]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"TAG"</span>, <span style="color: #ff0000;">"Que_dte"</span>, <span style="color: #ff0000;">"Shp_dte"</span>, <span style="color: #ff0000;">"org"</span>, <span style="color: #ff0000;">"DrpA"</span>, <span style="color: #ff0000;">"DrpB"</span>, <span style="color: #ff0000;">"DrpC"</span>, <span style="color: #ff0000;">"Drvr"</span>, <span style="color: #ff0000;">"Qty1"</span>, <span style="color: #ff0000;">"Desc1"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Qty2"</span>, <span style="color: #ff0000;">"Desc2"</span>, <span style="color: #ff0000;">"Trip_num"</span>,<span style="color: #ff0000;">"Notes"</span> ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;</div>[/code:6ymsvaci] and try. 2) Please never use FIELDS clause. Please use COLUMNS clause only always. Please let me know if you still have problems.
xbrowse edit dbcombo
FWH 14.11 Harbour 3.2.0dev ( r1406271520 ) bcc582 Bruce
xbrowse edit dbcombo
Mr. Nages, I made the changes as suggested ( fields to columns ), but that hasn't had any effect on the dbcombo displaying properly in the CustEditDlg function. Bruce
xbrowse edit dbcombo
I shall prepare and post a very similar sample for you. Please wait
xbrowse edit dbcombo
I do not have your DBFs. But customer.dbf and states.dbf in \fwh\samples folder are very similar to your example I prepared the sample using these two DBFs. If your FWH installation path is different, please change the path in the program [code=fw:1v66xov4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> XbrAddEdit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCust, oStates<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aStates<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBar, oBrw, oFont<br /><br /><br />&nbsp; &nbsp;RddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET DELETED <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;oStates &nbsp;:= TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\\</span>fwh<span style="color: #000000;">\\</span>samples<span style="color: #000000;">\\</span>states.dbf"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates &nbsp;:= <span style="color: #000000;">&#40;</span> oStates:<span style="color: #000000;">nArea</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> FW_DbfToArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oStates:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oCust &nbsp; &nbsp;:= TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\\</span>fwh<span style="color: #000000;">\\</span>samples<span style="color: #000000;">\\</span>customer.dbf"</span> <span style="color: #000000;">&#41;</span><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;">-12</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">32</span> <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Add"</span> &nbsp; &nbsp; <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Edit"</span> &nbsp; &nbsp;<span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Delete"</span> &nbsp;<span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oCust ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"STREET"</span>,<span style="color: #ff0000;">"CITY"</span>,<span style="color: #ff0000;">"STATE"</span>,<span style="color: #ff0000;">"ZIP"</span>,<span style="color: #ff0000;">"HIREDATE"</span>,<span style="color: #ff0000;">"MARRIED"</span>,<span style="color: #ff0000;">"AGE"</span>,<span style="color: #ff0000;">"SALARY"</span>,<span style="color: #ff0000;">"NOTES"</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetChecks</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bEdit</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> |oRec| EditDlg<span style="color: #000000;">&#40;</span> oRec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"STATE"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">aEditListTxt</span> &nbsp;:= aStates<br />&nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">brclicked</span> := <span style="color: #000000;">&#123;</span> || EditDlg<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//</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;oWnd:<span style="color: #000000;">oClient</span> &nbsp; &nbsp; &nbsp;:= oBrw<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp;oCust:<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: #00C800;">static</span> <span style="color: #00C800;">function</span> EditDlg<span style="color: #000000;">&#40;</span> oRec <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGrp, oBtn, oStates<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lSave := .f.<br /><br />&nbsp; &nbsp;oStates &nbsp;:= TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"STATES"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">820</span>,<span style="color: #000000;">380</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oRec:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oFont</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">RecNo</span> == <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"ADD "</span>, <span style="color: #ff0000;">"EDIT "</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"CUSTOMER"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">4</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">168</span>, <span style="color: #000000;">405</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">12</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"First:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">First</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">26</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Last:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">24</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Last</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Street:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">38</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Street</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">54</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"City:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">13</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">52</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">City</span> &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">68</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">19</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">66</span>, <span style="color: #000000;">44</span> DBCOMBO oRec:<span style="color: #000000;">State</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> oStates:<span style="color: #000000;">cAlias</span> ITEMFIELD <span style="color: #ff0000;">"CODE"</span> LISTFIELD <span style="color: #ff0000;">"NAME"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">82</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Zip:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">80</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Zip</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hiredate:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">29</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">94</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Hiredate</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">44</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">108</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">CHECKBOX</span> oRec:<span style="color: #000000;">Married</span> &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Married:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">43</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">124</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Age:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">122</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Age</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> &nbsp;<span style="color: #ff0000;">"99"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">138</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Salary:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">136</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Salary</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> &nbsp;<span style="color: #ff0000;">"999,999.99"</span> &nbsp;<span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">152</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Notes:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">150</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Notes</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">355</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">172</span>, <span style="color: #000000;">275</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Undo"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">Undo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Update</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: #000000;">172</span>, <span style="color: #000000;">319</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Save"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lSave := .T.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">172</span>, <span style="color: #000000;">363</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> &nbsp; CANCEL <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lSave<br />&nbsp; &nbsp; &nbsp; oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRec:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oStates:<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 />&nbsp;</div>[/code:1v66xov4]
xbrowse edit dbcombo
Mr. Rao, thank You very much. Your sample is great and very useful for my new project. best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xbrowse edit dbcombo
Mr. Rao, adding some logic for practical uses to Your sample : I explain There is a CUSTOMER.dbf and PRODUCTS.dbf ( instead of STATE.dbf ) CUSTOMER.dbf includes 4 new fields [color=#0000FF:2kodkl8i]PRODUCT VALUE QUANTUM AMOUNT[/color:2kodkl8i] 1.) The user selects a product with the combo 2.) Selecting a product, the price from PRODUCTS is added to column CUSTOMER-VALUE from the combo-selection 3.) The user defines the QUANTUM 4.) The field AMOUNT is calculated VALUE * QUANTUM = AMOUNT 5.) TOTAL of column AMOUNT on FOOTER that makes it VERY useful and saves a lot of input-time !!! maybe there is any sample <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> , otherwise I have to carry on testing. [img:2kodkl8i]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrCombo1&#46;jpg[/img:2kodkl8i] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xbrowse edit dbcombo
Mr. Nages, The dbcombo sample code you supplied, compiles and runs fine. I will implement it in my code and persue. ------- Using Tdatabase() is new to me and the burning question is, what setup is needed to use your example in a multiuser environment. ( lShared, lBuffer ? ). Is there a sample somewhere, I could reference ? Gratefully, Bruce S.
xbrowse edit dbcombo
[quote="brewster":3n6nci3l]Mr. Nages, The dbcombo sample code you supplied, compiles and runs fine. I will implement it in my code and persue. ------- Using Tdatabase() is new to me and the burning question is, what setup is needed to use your example in a multiuser environment. ( lShared, lBuffer ? ). Is there a sample somewhere, I could reference ? Gratefully, Bruce S.[/quote:3n6nci3l] TDatabase by default is set for multiuser use and is buffered. I suggest you do not do anything. Just use it. You can work directly with RDD too. The above sample code works directly with RDD also. Why do u want to use TDataBase?
xbrowse edit dbcombo
Mr. Nages, >>>Why do u want to use TDataBase? Your original posted sample used Tdatabase and I thought I'd try and become familiar with it. I am relatively new to FWH. I have converted all(most) of my Clipper programs to FWH and want to make them all into multiuser applications. I'm familiar with record /file locking the old way, but knew the next step was to take advantage of ADO, ADS, SQL, etc. of which I know nothing about. Also, using ADO examples in the forum, I have built working applications. The wrestling with above samples helps me to begin to even ask valid questions. I'd like to stay with .dbfs and apply something with a decent learning curve. The vaque question is, which one do I choose ? Recently, Jeff Barnes and others threads have provided food for thought. Regards, Bruce S.
xbrowse edit message (solved)
I need to edit a column under conditions my code oBrw:aCols[5]:nEditType := EDIT_GET oBrw:aCols[5]:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, (IF(! DET->SDETAIL,EDITLU(v,OBRW,@TABPARAM,,LCOPY,LMODE,TABSEC,@TABTOT), ) ), ) } oBrw:aCols[5]:beditwhen := {|o, v, n| IF(DET->SDETAIL,.F. , .T.) } when i dbl click on the column (when not allowed to edit) it is ok nothing happens if i press on the enter key twice i get the following message ocol:aeditlisttxt not defined fivewin class txbrwcolumn any idea ? solution in changing method keydown xbrowse.prg case nKey == VK_RETURN oCol := ::SelectedCol() if oCol:oEditGet != nil PostMessage( oCol:oEditGet:hWnd, WM_KEYDOWN, nKey ) //VK_RETURN ) elseif oCol:lEditable .and. ! oCol:hChecked .and. ::lEnterKey2Edit .and. ! ( oCol:nEditType == EDIT_LISTBOX .or. oCol:nEditType == EDIT_GET_LISTBOX ) return oCol:Edit() elseif (oCol:nEditType != EDIT_LISTBOX .or. oCol:nEditType != EDIT_GET_LISTBOX) .AND. oCol:lEditable // chidiak //Simulate Click over button for no lost focus PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONDOWN, 1, 1 ) PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONUP, 1, 1 ) elseif ::oTreeItem!=nil If( ::oTreeItem:oTree != nil,( ::oTreeItem:Toggle(), ::Refresh() ),) else ::GoRight() endif
xbrowse ejemplo basico soy principiante
Saludos comunidad: Requiero de su ayuda, para cnfigurar mi xbrowse como lo hacia en clipper, viendo ejemplo ya hize que mi DBF se vea en el xbrowse pero ahora quiero filtrar mi DBFS que tiene un campo llamado TIPO_DOC esta campo tiene como valores FA = factura, DV = Devolucion, TA = Talon y X mas Quiero que mi xbrowse Solo visualiza el Rango de FA o el Rango de DV mi funcion es la siguiente: PROCEDURE VerBrowse LOCAL oDlg, oBto1, oBto2, oChk, lChk := .F., oLbs, oVis, lVis := .F. PRIVATE m_Serie, m_Fac, Abre_Ok, oBrw Abre_Ok := .T. * Abrimos bases de datos ABRE("VENTA") * Si no pudo crear la base temporal regresa a MENUSYS IF !Abre_Ok CLOSE ALL RETURN ENDIF SELECT VENTA SET ORDER TO 1 VENTA->(DbSeek("FA") DEFINE DIALOG oDlg TITLE "browse" FROM 01, 01 TO 30, 30 OF oWnd @ 01, 01 XBROWSE oBrw ; FIELDS VENTA->Tipo_Doc, VENTA->No_Serie, VENTA->No_Referen ; HEADERS 'Doc', 'Serie', 'Numero'; SIZES 020, 070, 050 ; SIZE 300, 200 PIXEL ALIAS 'venta' OF oDlg oBrw:nRowDividerStyle = LINESTYLE_NOLINES oBrw:nColDividerStyle = LINESTYLE_BLACK oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW oBrw:CreateFromCode() ACTIVATE DIALOG oDlg CENTERED CLOSE ALL RETURN Tengo que poner un codeblock para especificar el inicio de GOTOP de inicio que segun yo seria: oBrw:bGoTop := { || VENTA->Tipo_Doc = "FA" } oBrw:bGoBottom := { || VENTA->Tipo_Doc = "FA" } Pero me siguen apareciendo los DV y los TA me pueden ayudar Saludos, Soy principiante en Estoy de FIVEWIN apenas estoy pasando mis programas de CLIPPER a FIVEWIN <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
xbrowse ejemplo basico soy principiante
Si estás usando índices CDX sería algo tan sencillo como esto para establecer el rango que quieres: // VENTA->(ordscope(TOPSCOPE, "FA")) VENTA->(ordscope(BOTTOMSCOPE, "FA")) y para ihabilitarlo: VENTA->(ordscope(TOPSCOPE, NIL)) VENTA->(ordscope(BOTTOMSCOPE, NIL)) //
xbrowse ejemplo basico soy principiante
Estoy usando Indices NTX por el momento. pero deja indago como crear los CDX para hacer la prueba si es mas fail con CDX voy a tener que migrar todos mis Indices <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Gracias <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> porque llevo 15 Dias que estoy conociendo como se programa en FIVEWIN <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
xbrowse ejemplo basico soy principiante
[code=fw:tcl7lufp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#xcommand @ <nRow>, <nCol> <span style="color: #000000;">&#91;</span> COLUMN <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">XBROWSE</span>  <oBrw>  ;<br />               ...<br />               <span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#91;</span> FIELDS <span style="color: #000000;">&#93;</span> <Flds,...><span style="color: #000000;">&#93;</span> ;<br />               <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SELECT</span> <cField> <span style="color: #00C800;">FOR</span> <uValue1> <span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">TO</span> <uValue2> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />               ...<br /> </div>[/code:tcl7lufp] En tu caso: [code=fw:tcl7lufp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">01</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">XBROWSE</span> oBrw ;<br />   FIELDS VENTA->Tipo_Doc, VENTA->No_Serie, VENTA->No_Referen ;<br />   HEADERS <span style="color: #ff0000;">'Doc'</span>, <span style="color: #ff0000;">'Serie'</span>, <span style="color: #ff0000;">'Numero'</span>;<br />   SIZES <span style="color: #000000;">020</span>, <span style="color: #000000;">070</span>, <span style="color: #000000;">050</span> ;<br />   <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'venta'</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />   <span style="color: #0000ff;">SELECT</span> VENTA->Tipo_Doc <span style="color: #00C800;">FOR</span> <span style="color: #ff0000;">"FA"</span> <br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:tcl7lufp] Existiendo un índice sobre el campo TIPO_DOC y estando seleccionado
xbrowse ejemplo basico soy principiante
:0 bien y en este Caso puedo seguir usando los indices NTX sin ningun problema y me jala en el browse solo lo que Tenga FA y tengo que poner mi DBF en el puntero de Inicio del FA y listo.
xbrowse en fwppc
El xbrowse aun no se encuentra implementado en fwppc ? Me da unos errores de enlazado. En caso de no estar implementado como puedo hacer un freeze con wbrowse y como puedo meter una imagen en una columna ? Saludos.
xbrowse en fwppc
Simón, No, aún no está disponible. Puedes mostrar un bitmap en el browse como se hace en el ejemplo FWPPC\samples\tutor10.prg De momento no puedes hacer freeze. Habría que buscar en estos foros por freeze y ver si se a publicado algo de como hacerlo con un TWBrowse.
xbrowse en fwppc
Gracias.
xbrowse error
Que tal, escribo este post, como novato de este excelente lenguaje de desarrollo estoy practicando con el x browse con el siguiente codigo: [code:5xse0xhu] DBUSEAREA&#40;&#46;T&#46;, , "DEMO", "DEMO" ,&#46;T&#46;, &#46;F&#46;&#41; SET INDEX TO "DEMO" ORDSETFOCUS&#40;"ID"&#41; DBGOTOP&#40;&#41; DEFINE WINDOW oWndP TITLE "Módulo" OF oWnd MDICHILD oBrwP &#58;= TXBrowse&#40;&#41;&#58;New&#40; oWndP &#41; oBrwP&#58;cAlias &#58;= "DEMO" oCol &#58;= oBrwP&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;=&#123; ||PASIENTE->ID &#125; oCol&#58;cHeader &#58;= "Id" oCol&#58;nDataStrAlign &#58;= AL_CENTER oCol&#58;nHeadStrAlign &#58;= AL_CENTER oCol&#58;lAllowSizing &#58;= &#46;f&#46; oCol&#58;oDataFont &#58;= oFontP oCol&#58;oHeaderFont &#58;= oFntBrP oCol&#58;nWidth &#58;= 50 oCol&#58;nHeadBmpAlign &#58;= AL_LEFT oCol&#58;nHeadBmpNo &#58;= 2 oCol&#58;bClrHeader &#58;= &#123;|| &#123;CLR_WHITE, CLR_BLUE&#125; &#125; oCol&#58;bLClickHeader &#58;= &#123; || MSGAlert&#40;"Tavo"&#41; &#125; oCol&#58;AddBmpHandle&#40; FwBmpAsc&#40;&#41; &#41; oCol&#58;AddBmpHandle&#40; FwBmpDes&#40;&#41; &#41; oCol&#58;bLDClickData &#58;= &#123;|| MSGAlert&#40;"Tavo"&#41; &#125; oBrwPacientes&#58;SetRDD&#40;&#41; oBrwPacientes&#58;CreateFromCode&#40;&#41; oBrwPacientes&#58;oClient &#58;= oWndP ACTIVATE WINDOW oWndP VALID SaleP&#40;"DEMO"&#41;; [/code:5xse0xhu] pero al pasar el mouse por ensima del grid me marca el siguiente error [code:5xse0xhu]Error description&#58; Error BASE/41 Scope violation &#40;hidden&#41;&#58; TXBROWSE&#58;CHECKTOOLTIP [/code:5xse0xhu] este es la pila de llamados [code:5xse0xhu]Stack Calls =========== Called from&#58; => TXBROWSE&#58;CHECKTOOLTIP&#40;0&#41; Called from&#58; => TWINDOW&#58;MOUSEMOVE&#40;0&#41; Called from&#58; => TCONTROL&#58;MOUSEMOVE&#40;0&#41; Called from&#58; => TXBROWSE&#58;MOUSEMOVE&#40;2684&#41; Called from&#58; => TWINDOW&#58;HANDLEEVENT&#40;0&#41; Called from&#58; => TXBROWSE&#58;HANDLEEVENT&#40;0&#41; Called from&#58; &#46;\source\classes\WINDOW&#46;PRG => _FWH&#40;0&#41; Called from&#58; => WINRUN&#40;0&#41; Called from&#58; => TMDIFRAME&#58;ACTIVATE&#40;0&#41; Called from&#58; D&#58;\fivewin\Proy\Dentista\Prg\dent&#46;prg => MAIN&#40;36&#41; [/code:5xse0xhu] le he buscado pero no encuentro el problema cualquier ayuda le agradeceria. Saludos.
xbrowse error
Estás usando Harbour ó xHarbour ? Que versión de FWH ?
xbrowse error
uso Harbour y la versión de FWH es la de April 7.04 2007 build
xbrowse error
Gustavo, Has modificado alguna clase de FWH ? Por favor construye samples\testxbrw.prg y prueba si te da el mismo error. Aqui funciona bien
xbrowse error
No he modificado clase alguna de FWH, y este ejemplo si corre correctamente, voy a copiar y pasar a la aplicacion que estoy haciendo. a ver que pasa muchisimas gracias, una cosa mas es un excelente trabajo el tuyo, felicidades y lo mejor de los mejor en el futuro.
xbrowse error fwh 8.08
I get the following error with xbrowse fwh 8.08Any idea ? same code working ok in fwh 8.07thanks for the help, Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286) Called from: => TXBROWSE:KEYCOUNT(0) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600)
xbrowse error fwh 8.08
Richard,What RDD are you using ?It fails as oBrw:bKeyCount is nil. It should be oBrw:bKeyCount := {|| ( oBrw:cAlias )->( OrdKeyCount() ) }Please try to define it yourself and try it again, thanks
xbrowse error fwh 8.08
AntonioI am using dbfcdx and the same code has been working for some time, works ok in fwh 08.07oBrw:bKeyCount is nil it should not defining it does not fix the problem,here is the code belowRegardsRichard[code:14yd9u16] IF OBRWPLA == NIL INITRANS13&#40;@TRANS&#41; @ wndpmain&#58;nHeight - 90,05 BUTTONBMP TRANS&#91;28&#93;&#91;13&#93; PROMPT "SEMAINE" OF wndpMAIN PIXEL SIZE 150,30 FONT TRANS&#91;09&#93;&#91;1&#93; ; ACTION PLANHEBDO&#40;@TRANS,OBRWPLA,TPAR&#41; @ 10,200 XBROWSE oBrwpla ; OF wndpmain ; SIZE wndpmain&#58;nwidth - 200,wndpmain&#58;nHeight - 30 PIXEL ; ALIAS TRANS&#91;04&#93; oCol &#58;= oBrwPLA&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;|| &#40;TRANS&#91;04&#93;&#41;->PLAGE&#125; AEval&#40; TABVAR&#91;15&#93;, &#123; |DLIB,X | CRECOL&#40;x,@TRANS,@OBRWPLA&#41; &#125; &#41; oBrwPLA&#58;nMarqueeStyle &#58;= 1 oBrwpla&#58;nColDividerStyle &#58;= LINESTYLE_INSET oBrwPLA&#58;lColDividerComplete &#58;= &#46;T&#46; oBrwPLA&#58;bClrStd &#58;= &#123;|| &#123; CLR_BLUE, CLR_WHITE &#125; &#125; oBrwPLA&#58;bClrHEADER &#58;= &#123;|| &#123; CLR_BLUE, COULDLG&#40;"TD"&#41; &#125; &#125; oBRWPLA&#58;blDblClick &#58;= &#123; | nRow, nCol, nKey | EditCel&#40;@TRANS, OBRWPLA,@TPAR,nRow,nCol&#41; &#125; FOR I = 1 TO LEN&#40;oBrwPLA&#58;aCols&#41; oBrwPLA&#58;aCols&#91;I&#93;&#58;nWidth &#58;= TRANS&#91;10&#93;&#91;I&#93; oBrwPLA&#58;aCols&#91;i&#93;&#58;bRClickData &#58;= &#123;|| Menucopy&#40;@TRANS,OBRWPLA&#41; &#125; NEXT AEVAL&#40;oBrwPLA&#58;aCols, &#123; |DLIB,X | SETCOLBRW&#40;x,@TRANS,@OBRWPLA&#41; &#125; &#41; obrwPLA&#58;nRowHeight &#58;= AGPREF->HCELL oBrwPLA&#58;ndatalines &#58;= 4 oBrwPLA&#58;nHeaderLines &#58;= 2 OBRWPLA&#58;nFreeze &#58;= 1 oBrwPLA&#58;nCOLSEL &#58;= 2 oBrwPLA&#58;nCOLoffset &#58;= 1 oBrwPLA&#58;nROWSEL &#58;= 1 oBrwPLA&#58;bGotFocus &#58;= &#123;|| IF&#40; FILE&#40;TRANS&#91;04&#93; + "&#46;DBF"&#41;,dbSelectArea&#40;TRANS&#91;04&#93;&#41;, &#41; &#125; OBRWPLA&#58;bKeyDown &#58;= &#123;|nKey| iif&#40;nKey=VK_DELETE,SUPCEL&#40;@OBRWPLA,@TRANS, &#46;T&#46;&#41; , &#41; &#125; oBrwPLA&#58;bKeyCount &#58;= &#123;|| &#40; oBrwPLA&#58;cAlias &#41;->&#40; OrdKeyCount&#40;&#41; &#41; &#125; // this has been added OBRWPLA&#58;lAllowColHiding &#58;= &#46;F&#46; OBRWPLA&#58;lAllowRowSizing &#58;= &#46;F&#46; OBRWPLA&#58;l2007 &#58;= &#46;T&#46; oBrwPLA&#58;CreateFromCODE&#40;&#41; oBrwPLA&#58;oDragCursor &#58;= TRANS&#91;12&#93; oBrwPLA&#58;bDragBegin &#58;= &#123; |nRow,nCol,nFlags| DragBegin&#40; nRow, nCol, nFlags, @TRANS, @oBrwPLA &#41; &#125; oBrwPLA&#58;bDropOver &#58;= &#123; |uDropInfo, nRow, nCol, nFlags| DropOver&#40; uDropInfo, nRow, nCol, nFlags, @TRANS, @oBrwPLA &#41; &#125; ENDIF OBRWPLA&#58;SETFOCUS&#40;&#41; [/code:14yd9u16]
xbrowse error fwh 8.08
Richard,Please try it again setting it after CreateFromCode() call: oBrwPLA:CreateFromCODE() oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) } // this has been added
xbrowse error fwh 8.08
Anotnio,it does not help as the error occurs from createfromcode()this is the error.log regardsRichard Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286) Called from: => TXBROWSE:KEYCOUNT(0) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600)
xbrowse error fwh 8.08
Richard,Yes, you are right. I didn't noticed that it was getting called from CreateFromCode().We are working to provide you a solution asap, thanks
xbrowse error fwh 8.08
Richard,Please call oBrw:SetRdd() before calling oBrw:CreateFromCode(): oBrw:SetRdd() oBrw:CreateFromCode()without it, we get your same error. We are doing changes and enhancements in the Class TXBrowse and some required changes may be needed. We apologize for these inconveniencies.Here this example is working fine:[code:1a51mvn5] #include "FiveWin&#46;ch" #include "XBrowse&#46;ch" function Main&#40;&#41; local oWnd, oBrw, oCol USE Customer DEFINE WINDOW oWnd @ 0, 0 XBROWSE oBrw OF oWnd ALIAS "Customer" oCol = oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData = &#123; || Customer->First &#125; oCol&#58;cHeader = "First" oBrw&#58;SetRdd&#40;&#41; oBrw&#58;CreateFromCode&#40;&#41; oWnd&#58;oClient = oBrw ACTIVATE WINDOW oWnd return nil [/code:1a51mvn5]
xbrowse error fwh 8.08
Richard,In order to not modify your source code, you can add this code to Class TXBrowse in lines 674 (Method Initiate()):[code:2ql9dva2] endif // existing endif for&#58; if Empty&#40; &#58;&#58;nDataType &#41; &#46;or&#46; Empty&#40; &#58;&#58;aCols &#41; if &#40; ! Empty&#40; &#58;&#58;cAlias &#41; &#41; &#46;and&#46; &#40; Empty&#40; &#58;&#58;bKeyCount &#41; &#46;or&#46; Empty&#40; &#58;&#58;bKeyNo &#41; &#41; &#58;&#58;SetRdd&#40;&#41; endif [/code:2ql9dva2]
xbrowse error fwh 8.08
After compiling with 8-08 iI have this error:Regards,OttoApplication=========== Path and name: C:\xWINHOTEL\xRECHNUNG.exe (32 bits) Size: 2,684,928 bytes Time from start: 0 hours 0 mins 3 secs Error occurred at: 28.08.2008, 12:41:58 Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => (b)TXBROWSE:TXBROWSE(281) Called from: => TXBROWSE:KEYCOUNT(0) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:ADJUST(771) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:INITIATE(679) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:CREATEFROMCODE(589) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => EXEC_ZIRECHNUNG(3929) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => ZIRECHNUNG(411) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => (b)MAIN(359) Called from: c:\develop8\WH_Fwh\xRg\window.prg => TMDIFRAME:ACTIVATE(876) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => MAIN(359)
xbrowse error fwh 8.08
Richard, Otto,Please download a new FWH 8.08 build that fixes this bug. It will be available in just some minutes (we are uploading it now).We apologize for these inconveniencies
xbrowse error fwh 8.08
AntonioIt is working ok now <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Thank youRegardsRichard
xbrowse error fwh 8.08
Richard,Many thanks for the feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xbrowse error fwh 8.08
AntonioWhen a dbf is filtered the method refresh is not working properly (error message) Error occurred at: 03/09/2008, 09:13:14 Error description: Error BASE/1003 Variable does not exist: DTYPEStack Calls=========== Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:DELREPOS(874) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:REFRESH(838) This is the offending line bFilter := ( ::cAlias )->( &cFilter )HthRichard
xbrowse error fwh 8.08
XBrowse nowhere uses a variable DTYPE.Probably it is a variable in the filter in the application program, which is out of scope. Is it a local or static variable in the application program used in the filter experession?It appears that XBrowse assumes that the filter set by the programmer as retrieved from DbSetfilter() can always be converted to a valid codeblock. This assumption fails when the filter set in the application program uses local variables, which would not be available within Xbrowse.prg.Till this issue is solved in the library I suggest a temporary fix.to comment our lines out lines from 871 to 879.
xbrowse error wih lMergeVert
Hi Guys, I have a xbrowse built over a mysql rowset and using lMergeVert. It´s working fine. Always I try to do an oRs:Requery() to update data. Is Happening the error bellow: [code=fw:39jfn5wk]<div class="fw" id="{CB}" style="font-family: monospace;">Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r2008190002<span style="color: #000000;">&#41;</span><br />   FiveWin  Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">21.04</span><br />   Windows version: <span style="color: #000000;">10.0</span>, Build <span style="color: #000000;">19045</span> <br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">26</span> mins <span style="color: #000000;">12</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">21</span>/<span style="color: #000000;">12</span>/<span style="color: #000000;">2023</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">34</span>:<span style="color: #000000;">01</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span>  Bound error: <span style="color: #000000;">array</span> access<br />   Last Query:    <span style="color: #0000ff;">SELECT</span> COLUMN_NAME, REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME<br />   <span style="color: #0000ff;">FROM</span> information_schema.KEY_COLUMN_USAGE<br />   <span style="color: #0000ff;">WHERE</span> TABLE_SCHEMA = <span style="color: #ff0000;">'saga_sgv'</span><br />   AND   TABLE_NAME   = <span style="color: #ff0000;">'tmovgpes'</span><br />   AND   REFERENCED_TABLE_NAME IS NOT <span style="color: #00C800;">NULL</span><br /> <span style="color: #000000;">&#91;</span> SUCCESS <span style="color: #000000;">&#93;</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = A   <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N   <span style="color: #000000;">1</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">MERGEAREA</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">17094</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTCELLBACK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">14394</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTCELL</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">14477</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTDATA</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">14322</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2495</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2167</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">CONTROL</span>.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1793</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11993</span> <span style="color: #000000;">&#41;</span></div>[/code:39jfn5wk] IF I try it with the most recent version of FWH, only the line of the error is being changed. As you can see bellow: [code=fw:39jfn5wk]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">MERGEAREA</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">17718</span> <span style="color: #000000;">&#41;</span></div>[/code:39jfn5wk]
xbrowse error wih lMergeVert
Wondering how can I test this program at my end.
xbrowse features
I can group the data of a stored archive into an xbrowse by pressing a button and do it online (from the end user) for example by taking the customer.dbf archive I could group the archive by state, city, and show partial totals
xbrowse features
I think I posted a few samples like this. Please search
xbrowse features
ok Now I remember there was somthing
xbrowse features
Nages, I found it ( your sample) but I wish it on line from symply to tree and viceversa
xbrowse features
I found this but it init from tree I wish show the customers normally and then if if the final user press a button make the group the final user can select the type of groups for eah field he wants ( or the field I can set as selection) [code=fw:34ys361s]<div class="fw" id="{CB}" style="font-family: monospace;"><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 /><span style="color: #00C800;">static</span> cFwhPath   := <span style="color: #ff0000;">"c:<span style="color: #000000;">\w</span>ork<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\"</span><br /><br />//----------------------------------------------------------------------------//<br /><br />function Main()<br /><br />   BrowseTree( MakeTree() )<br /><br />return (0)<br /><br />//----------------------------------------------------------------------------//<br /><br />init procedure PrgInit<br /><br />   SET DATE ITALIAN<br />   SET CENTURY ON<br />   SET TIME FORMAT TO "</span>HH:<span style="color: #000000;">MM</span>:<span style="color: #000000;">SS</span><span style="color: #ff0000;">"<br />   SET EPOCH TO YEAR(DATE())-50<br /><br />   SET DELETED ON<br />   SET EXCLUSIVE OFF<br /><br />   RDDSETDEFAULT( "</span>DBFCDX<span style="color: #ff0000;">" )<br /><br />   XbrNumFormat( 'E', .t. )<br />   SetKinetic( .f. )<br />   SetGetColorFocus()<br />   SetBalloon( .t. )<br /><br />return<br /><br />//----------------------------------------------------------------------------//<br /><br />static function MakeTree()<br /><br />   field STATE,CODE,CITY<br /><br />   local cPath    := cFwhPath + "</span>samples\\<span style="color: #ff0000;">"<br />   local oTree, oState, oCity<br /><br />   USE ( cPath + "</span>STATES<span style="color: #ff0000;">" ) NEW SHARED<br />   INDEX ON CODE TAG CODE TO STMP MEMORY<br />   USE ( cPath + "</span>CUSTOMER<span style="color: #ff0000;">" ) NEW ALIAS CUST SHARED<br />   INDEX ON STATE+CITY TAG STATE TO CTMP MEMORY<br />   SET RELATION TO STATE INTO STATES<br />   GO TOP<br /><br />   TREE oTree<br />   oTree:Cargo    := { "</span><span style="color: #ff0000;">", 0, 0.00, 0 }<br />   do while ! CUST->( eof() )<br />      TREEITEM oState PROMPT STATES->NAME CARGO { CTOD( "</span><span style="color: #ff0000;">" ), 0, 0.00, 0 }<br />      TREE<br />         do while STATES->NAME == oState:cPrompt .and. ! CUST->( eof() )<br />            TREEITEM oCity PROMPT CUST->CITY ;<br />               CARGO { CUST->HIREDATE, CUST->AGE, CUST->SALARY, CUST->( RECNO() ) }<br />            oState:Cargo[ 2 ]    += oCity:Cargo[ 2 ]<br />            oState:Cargo[ 3 ]    += oCity:Cargo[ 3 ]<br />            CUST->( DbSkip( 1 ) )<br />         enddo<br />         TREEITEM "</span>Sub-Total<span style="color: #ff0000;">" CARGO oState:Cargo<br />         oTree:Cargo[ 2 ]  += oState:Cargo[ 2 ]<br />         oTree:Cargo[ 3 ]  += oState:Cargo[ 3 ]<br />      ENDTREE<br /><br />   enddo<br />   ENDTREE<br /><br />return oTree<br /><br />//----------------------------------------------------------------------------//<br /><br />static function BrowseTree( oTree )<br /><br />   local oDlg, oBrw, oFont<br />   local nGrpClr     := RGB(255,250,220)<br />   local nTotClr     := RGB(200,255,200)<br /><br />   DEFINE FONT oFont NAME "</span>TAHOMA<span style="color: #ff0000;">" SIZE 0,-14<br />   DEFINE DIALOG oDlg SIZE 620,700 PIXEL FONT oFont ;<br />      TITLE "</span>EDITABLE TREE BROWSE WITH SUBTOTALS<span style="color: #ff0000;">"<br /><br />   @ 20,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE oTree ;<br />      COLUMNS 1, 2, 3 ;<br />      HEADERS "</span>State/City<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">", "</span>Number<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">" ;<br />      PICTURES nil, nil, nil, NumPict ( 12, 2 ) ;<br />      CELL LINES FOOTERS FASTEDIT NOBORDER<br /><br />   WITH OBJECT oBrw<br />      :nStretchCol         := 1<br />      :lDisplayZeros       := .f.<br />      :bChange             := { || CUST->( DBGOTO( oBrw:oTreeItem:Cargo[ 4 ] ) ) }<br />      :bLock               := { || CUST->( RLOCK() ) }<br />      :bUnLock             := { || CUST->( DBUNLOCK() ) }<br /><br />      :bClrStd             := { || { CLR_BLACK, If( oBrw:oTreeItem:nLevel == 1, nGrpClr, ;<br />                                                If( oBrw:oTreeItem:cPrompt == "</span>Sub-Total<span style="color: #ff0000;">", nTotClr, ;<br />                                                CLR_WHITE ) ) } }<br />      // Bitmaps<br />      WITH OBJECT :aCols[ 1 ]<br />         :AddBitmap( {  FWRArrow(), FWDArrow(), cFwhPath + "</span><span style="color: #0000ff;">bitmaps</span>\16x16\reset.bmp<span style="color: #ff0000;">" } )<br />         :cFooter          := "</span>GRAND TOTAL<span style="color: #ff0000;">"<br />      END<br />      // When Group is closed show totals. When open show totals at bottom<br />      // Allow edit of columns and save data to DBF, update group and grand totals<br />      WITH OBJECT :aCols[ 3 ]<br />         :bEditValue       := { |x| If( oBrw:oTreeItem:lOpened, 0, ;<br />                                    If( x == nil, oBrw:oTreeItem:Cargo[ 2 ], ;<br />                                    CUST->AGE := oBrw:oTreeItem:Cargo[ 2 ] := x ) ) }<br />         :nTotal           := oTree:Cargo[ 2 ]<br />         //<br />         :nEditType        := EDIT_GET<br />         :bEditWhen        := { || oBrw:oTreeItem:nLevel > 1 .and. oBrw:oTreeItem:cPrompt != "</span>Sub-Total<span style="color: #ff0000;">" }<br />         :bOnChange        := { |o,nOld| oBrw:oTreeItem:Parent():Cargo[ 2 ] += ( o:Value - nOld ), oBrw:Refresh() }<br />      END<br />      WITH OBJECT :aCols[ 4 ]<br />         :bEditValue       := { |x| If( oBrw:oTreeItem:lOpened, 0, ;<br />                                    If( x == nil, oBrw:oTreeItem:Cargo[ 3 ], ;<br />                                    CUST->SALARY := oBrw:oTreeItem:Cargo[ 3 ] := x ) ) }<br />         :nTotal           := oTree:Cargo[ 3 ]<br />         //<br />         :nEditType        := EDIT_GET<br />         :bEditWhen        := { || oBrw:oTreeItem:nLevel > 1 .and. oBrw:oTreeItem:cPrompt != "</span>Sub-Total<span style="color: #ff0000;">" }<br />         :bOnChange        := { |o,nOld| oBrw:oTreeItem:Parent():Cargo[ 3 ] += ( o:Value - nOld ), oBrw:Refresh() }<br />      END<br />      //<br />      :CreateFromCode()<br />   END<br /><br />   Eval( oBrw:bChange )<br /><br />   ACTIVATE DIALOG oDlg CENTERED<br />   RELEASE FONT oFont<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /></span></div>[/code:34ys361s] But this sample I see a group of states ok but for each state I wish show from first column of Browse Fist,Last,street,city,zip and order for first I mean as this [img:34ys361s]https&#58;//s4&#46;postimg&#46;org/6m27w72b1/Immagine&#46;jpg[/img:34ys361s]
xbrowse footer y mysql
Por favor (ya lei los ejeplos de la carpeta samples) podrian decirme como se hace sensillamente para mostrar en un xbrowse que la ultima columna sea sumada y me muestre "el total de deuda" que tiene? porque la verdad estoy dando tantas vueltas que ya ni se que es lo que hay q hacer, solo copio y pego y no entiendo el funcionbamiento del maketotals gracias.
xbrowse footer y mysql
goosfancito Intenta asi: [code=fw:23ltn5b7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//En xBrowse</span><br />oBrw:<span style="color: #000000;">lFooter</span>=.T.<br /><br />&nbsp; oCol:=oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">DEBE</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp; := <span style="color: #ff0000;">"DEBE"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bfooter</span>:=<span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"TOTAL DEBE: "</span>+Trans<span style="color: #000000;">&#40;</span>TotalDebe,<span style="color: #ff0000;">"99,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp;</div>[/code:23ltn5b7] Saludos, Adhemar
xbrowse footer y mysql
Adhemar... Este query está mal: [code=fw:2tlpi8l9]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:2tlpi8l9] Debería ser: [code=fw:2tlpi8l9]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:2tlpi8l9] Saludos,
xbrowse footer y mysql
les comento. el importe que esta en la columna que necesito acumular se calcula por dos campos mas y el iva y ganancia... por lo que apunta a una funcion donde lee una tabla y hace el calculo. [code=fw:1aojzfdm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> a<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>b = a + iva + ganancia<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1aojzfdm] el problema que no se como implementar el acumulador del footer. porque? porque cada vez que repinta el xbrowse me vuelve a acumular todo. pense que al usar el maketotals sobre esa columna solo hacia el calculo...
xbrowse footer y mysql
goosfancito Tendrías que recorrer tu tabla e ir cargándola a un Array luego tu array lo mostras en el browse. Saludos, Adhemar
xbrowse footer y mysql
[quote="jrestojeda":vy7vhp2q]Adhemar... Este query está mal: [code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:vy7vhp2q] Debería ser: [code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:vy7vhp2q] Saludos,[/quote:vy7vhp2q] Realmente el "AS" es opcional, la sentencia de Adhemar es correcta este ejemplo me funciona usando DBF, con una columna calculada, con MySql deberia ser igual, puedes ejecutarlo desde la carpeta samples de fivewin [code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span> <br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />   <span style="color: #00C800;">local</span> oWnd, oBrw, oCol <br /><br />   USE clientes <br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br />    <br />   @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"clientes"</span> <br />    <br />   oBrw:<span style="color: #000000;">lFastEdit</span> = .T. <br />   oBrw:<span style="color: #000000;">lFooter</span>   = .T.<br />   <br />    <br />   oCol             = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   oCol:<span style="color: #000000;">bEditValue</span>    = <span style="color: #000000;">&#123;</span> || clientes->Nombre <span style="color: #000000;">&#125;</span> <br />   oCol:<span style="color: #000000;">cHeader</span>     = <span style="color: #ff0000;">"Nombre"</span> <br /> <br />   oCol             = oBrw:<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;">"Monto"</span> <br />   oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || importe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oCol:<span style="color: #000000;">cEditPicture</span> = <span style="color: #ff0000;">"999,999.99"</span><br />   oCol:<span style="color: #000000;">nTotal</span>       = <span style="color: #000000;">0</span><br />   oCol:<span style="color: #000000;">nWidth</span>      =  <span style="color: #000000;">60</span><br />   oCol:<span style="color: #000000;">lTotal</span>      = .T.<br />   <br />   oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   oCol:<span style="color: #000000;">bEditValue</span>    = <span style="color: #000000;">&#123;</span> || clientes->Direccion <span style="color: #000000;">&#125;</span> <br />   oCol:<span style="color: #000000;">cHeader</span>     = <span style="color: #ff0000;">"Direcccion"</span> <br />    <br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />    <br />   oWnd:<span style="color: #000000;">oClient</span> = oBrw <br />   oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">function</span> importe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> nCalculo <br />    nCalculo = clientes->edad * clientes->nivel<br /><span style="color: #00C800;">return</span> nCalculo<br /> </div>[/code:vy7vhp2q]
xbrowse footer y mysql
Gracias. Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable.
xbrowse footer y mysql
[quote="Daniel Garcia-Gil":4v1cwuj6][quote="jrestojeda":4v1cwuj6]Adhemar... Este query está mal: [code=fw:4v1cwuj6]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:4v1cwuj6] Debería ser: [code=fw:4v1cwuj6]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">&#41;</span></div>[/code:4v1cwuj6] Saludos,[/quote:4v1cwuj6] Realmente el "AS" es opcional, la sentencia de Adhemar es correcta[/quote:4v1cwuj6] Daniel... y el "*" sin poner una coma antes del Sum(DEBE)?? Yo pruebo un query similar y da error...
xbrowse footer y mysql
[quote="goosfancito":1jfmut28]Gracias. Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable.[/quote:1jfmut28] En el ejemplo no he colocado ninguna columna editable
xbrowse footer y mysql
[quote="Daniel Garcia-Gil":2hv3hu9p][quote="goosfancito":2hv3hu9p]Gracias. Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable.[/quote:2hv3hu9p] En el ejemplo no he colocado ninguna columna editable[/quote:2hv3hu9p] Estas en lo cierto
xbrowse freeze and goto column
To All I am trying to migrate all my listboxes to xbrowse .. specifically 2 commands in Hernans txbrowse .. I need to go to a specific column on dialog init .. oBrow:GoToCol(nCOL ) [code=fw:nohq5e9r]<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>,;<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> .or. xADMIN = <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>, ;<br />                  oBROW:<span style="color: #000000;">GoToCol</span><span style="color: #000000;">&#40;</span>nCOL<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:nohq5e9r] and to freeze 5 columns to the left of the scrolling listbox .. oBROW:nFREEZE := 5 Thanks in advance Rick Lipkin
xbrowse freeze and goto column
XBrowse: oBrw:nFreeze := 5 // same syntax in xbrowse too Instead of oBrw:GotoCol, XBrowse has a more powerful method: oBrw:SetPos( nRow, nCol, [ lPixel DEFAULT .f. ] ) You can say oBrw:SetPos( 1, 6 ) to position cursor in the 1st row 6th column.
xbrowse freeze and goto column
Rao Good to hear back from an old friend .. I have been out of the FWH community for some time and have decided to do some contracting work and perhaps market many of my applications I have built over the many years .. Human Resources, Time and reporting, Inventory, Sales and route mgmt, Accounts receivable\payables, Property Mgmt, fleet Vehicle reservations, church and organizational memberships, purchasing and requisitions .. Thinking about forming a company ( limited liability corporation 'llc' ) and need a business partner .. if you have a desire to come to South Carolina, USA .. let me know !!! I have a new e-mail address <!-- e --><a href="mailto:r1.1955@live.com">r1.1955@live.com</a><!-- e --> .. Thanks for your quick help ! Rick Lipkin [img:1uvieul4]http&#58;//img689&#46;imageshack&#46;us/img689/339/mywork1&#46;jpg[/img:1uvieul4] [img:1uvieul4]http&#58;//img42&#46;imageshack&#46;us/img42/7719/rickswork&#46;jpg[/img:1uvieul4]
xbrowse function toCalc
hi, I have this xbrowse: [url=https&#58;//imgur&#46;com/APp21O5:1zxi2e6i][img:1zxi2e6i]http&#58;//i&#46;imgur&#46;com/APp21O5&#46;jpg[/img:1zxi2e6i][/url:1zxi2e6i] I try to export in Excel(obrw:toexcel) and OpenOffice (oBrw:tcalc()). in Excel it's ok: [url=https&#58;//imgur&#46;com/sOmjG0B:1zxi2e6i][img:1zxi2e6i]http&#58;//i&#46;imgur&#46;com/sOmjG0B&#46;jpg[/img:1zxi2e6i][/url:1zxi2e6i] but in Calc I get this: [url=https&#58;//imgur&#46;com/VpyQD4X:1zxi2e6i][img:1zxi2e6i]http&#58;//i&#46;imgur&#46;com/VpyQD4X&#46;jpg[/img:1zxi2e6i][/url:1zxi2e6i] column ARTICOLO become Numeric rounded. any help? thank you
xbrowse function toCalc
I tested the following code and found that I am getting the right result in Calc [code=fw:1onz5079]<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: #B900B9;">//---------------------------------------------</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">Local</span> oDlg,oBrw,aData,oBar<br />    <br />    aData:=<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"F305"</span>, <span style="color: #ff0000;">"73.0024.61,7"</span>, <span style="color: #000000;">368</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    <br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test ToCalc"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br />    <br />       @<span style="color: #000000;">50</span>,<span style="color: #000000;">01</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-0</span>,<span style="color: #000000;">-0</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">STYLE</span> <span style="color: #000000;">2013</span> <span style="color: #0000ff;">UPDATE</span>  ;        <br />        DATASOURCE aData ;<br />        COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>  ;<br />        HEADERS <span style="color: #ff0000;">"CD.PIANIFICIAZONE"</span>, <span style="color: #ff0000;">"ARTICOLO"</span> , <span style="color: #ff0000;">"RESIDUO"</span> ;<br />        CELL LINES FOOTERS AUTOSORT NOBORDER<br />        <br />        WITH OBJECT oBrw<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;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oBrw:<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">56</span>,<span style="color: #000000;">44</span> <span style="color: #000000;">2013</span>       <br />        <br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br />          <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Excel"</span> ;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">ToExcel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>        <br />          <br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br />          <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Calc"</span> ;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">ToCalc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>              <br />    <br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span></div>[/code:1onz5079] Tested using OpenOffice 3.1.0 [url=https&#58;//imgbb&#46;com/:1onz5079][img:1onz5079]https&#58;//image&#46;ibb&#46;co/nMNHOV/Dlg&#46;png[/img:1onz5079][/url:1onz5079] Calc Result [url=https&#58;//imgbb&#46;com/:1onz5079][img:1onz5079]https&#58;//image&#46;ibb&#46;co/kK9QAA/Calc-Result&#46;png[/img:1onz5079][/url:1onz5079] openOffice Version [url=https&#58;//imgbb&#46;com/:1onz5079][img:1onz5079]https&#58;//image&#46;ibb&#46;co/eJ3Dxq/Open-Office-Version&#46;png[/img:1onz5079][/url:1onz5079]
xbrowse function toCalc
thank you anserkk, I'll try your example
xbrowse fwh2006 sqlrdd erro
segue o erro [img:17kmfbkh]https&#58;//uploaddeimagens&#46;com&#46;br/images/002/772/739/original/WhatsApp_Image_2020-07-15_at_20&#46;11&#46;50&#46;jpeg?1594855645[/img:17kmfbkh] [code=fw:17kmfbkh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SQLRDD_SaveState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">SQLRDD_hState</span> == <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">SQLRDD_hState</span>   := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />      HSetCaseMatch<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">SQLRDD_hState</span>, .f. <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nLen"</span> <span style="color: #000000;">&#93;</span>     := ::<span style="color: #000000;">nLen</span><br />   ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"IndexOrd"</span> <span style="color: #000000;">&#93;</span> := INDEXORD<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"descend"</span> <span style="color: #000000;">&#93;</span>  := OrdDescend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp;erro</span><br />   ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"recno"</span> <span style="color: #000000;">&#93;</span>    := RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nKeyNo"</span> <span style="color: #000000;">&#93;</span>   := ::<span style="color: #000000;">SQLRDD_nKeyNo</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:17kmfbkh]
xbrowse fwh2006 sqlrdd erro
Is the function OrdDescend() not supported by SQLRDD ?
xbrowse fwh2006 sqlrdd erro
Intente con: [code=fw:ika9507m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />EXTERNAL DESCEND<br /><br />tubanco-><span style="color: #000000;">&#40;</span> ORDDESCEND<span style="color: #000000;">&#40;</span> , , .T.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:ika9507m] Saludos.
xbrowse fwh2006 sqlrdd erro
I haven't detected the problem so far. Yes, SQLRDD supports OrdDescend() Anyway, without a self-contained example it is impossible to debug.
xbrowse fwh2006 sqlrdd erro
OrdDescend() does not require the EXTERNAL DESCEND
xbrowse fwh2006 sqlrdd erro
[quote="MOISES":nkk3tccu]I haven't detected the problem so far. Yes, SQLRDD supports OrdDescend() Anyway, without a self-contained example it is impossible to debug.[/quote:nkk3tccu] In our tests, OrdDescend() is working well with SQLRDD. Can some body explain to me the error in English? What does the error say?
xbrowse fwh2006 sqlrdd erro
[url:nu8544c4]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/download/file&#46;php?id=383&sid=5325ef2eb76c463d6c3d9dd09229718c[/url:nu8544c4]
xbrowse fwh2006 sqlrdd erro
Workarea not in use EMG
xbrowse fwh2006 sqlrdd erro
[quote="Enrico Maria Giordano":7oy0zc37]Workarea not in use EMG[/quote:7oy0zc37] Thank you very much. That means the application program closed the dbf, even before xbrowse is destroyed. So, when the xbrowse got focus, the method KeyCount() is executed and the alias is not in use anymore. Mr. Sistem Can you please make this modification and try again? [code=fw:7oy0zc37]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SQLRDD_SaveState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">SQLRDD_hState</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span> &nbsp; := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; HSetCaseMatch<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">SQLRDD_hState</span>, .f. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nLen"</span> <span style="color: #000000;">&#93;</span> &nbsp; &nbsp; := ::<span style="color: #000000;">nLen</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"IndexOrd"</span> <span style="color: #000000;">&#93;</span> := INDEXORD<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"descend"</span> <span style="color: #000000;">&#93;</span> &nbsp;:= OrdDescend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp;erro</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"recno"</span> <span style="color: #000000;">&#93;</span> &nbsp; &nbsp;:= RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nKeyNo"</span> <span style="color: #000000;">&#93;</span> &nbsp; := ::<span style="color: #000000;">SQLRDD_nKeyNo</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:7oy0zc37]
xbrowse fwh2006 sqlrdd erro
fiz um video mostrado o erro. (acho que acontece o erro quando se tem um xbrowse aberto e abre outro e fechando em seguinda... não sei explicar, o video explica) a correção não trabalha bem. trava o xbrowse <!-- m --><a class="postlink" href="https://youtu.be/aDBEQd3Z53Y">https://youtu.be/aDBEQd3Z53Y</a><!-- m -->