topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xbrowse command not working properly -- MR. RAO | So the problem is with TMSQeuery's FieldPos() method.
You need to resolve this error with the authors.
To make sure, please directly test
[code=fw:ga7ukb03]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? oTb:<span style="color: #000000;">FieldPos</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"CODIGO"</span> <span style="color: #000000;">)</span><br /> </div>[/code:ga7ukb03]
It is better you check all other methods I mentioned above. |
xbrowse command not working properly -- MR. RAO | In the meantime try
[code=fw:18sjnok2]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <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 ;<br /> DATASOURCE oTb ;<br /> COLUMS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> ;<br /> HEADERS <span style="color: #ff0000;">"CODIGO"</span>, <span style="color: #ff0000;">"NOMBRE"</span> ;<br /> LINES CELL <br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:18sjnok2] |
xbrowse command not working properly -- MR. RAO | In the XBrowse.prg, Line no:7371
[code=fw:harlrvl3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> cName <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:harlrvl3]
Change this as:
[code=fw:harlrvl3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TMSQUERY"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> nCol <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> cName <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:harlrvl3] |
xbrowse command not working properly -- MR. RAO | [quote:1dqahsus]Silly question , for xbrowse class, FieldGet is character or number? Same for FieldName data type??
[/quote:1dqahsus]
Following DBF syntax, FileldGet method in the classes also is meant to be used with column number only.
So, if we want to get the value of a field by name, we need to write
[code=fw:1dqahsus]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? o:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> o:<span style="color: #000000;">FieldPos</span><span style="color: #000000;">(</span> fieldname <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:1dqahsus]
But the reduce the work of programmer, many classes and all FWH classes allow use of either field number or field name. So, with these classes
[code=fw:1dqahsus]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? o:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> fieldname <span style="color: #000000;">)</span><br /> </div>[/code:1dqahsus]
also works.
FWH goes further.
We can even use expressions:
[code=fw:1dqahsus]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? o:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"QUANTITY * PRICE"</span> <span style="color: #000000;">)</span><br /> </div>[/code:1dqahsus]
where QUANTITY and PRICE are field names.
Now, you may ask. Why did we write fieldGet( name ) in the beditvalue but not fieldget( ncol ).
At that time we were getting problem with fieldget( ncol ) with the version of TMySql we were using, but fieldget( name ) was working. |
xbrowse command not working properly -- MR. RAO | [quote="nageswaragunupudi":1g3ooiut]In the XBrowse.prg, Line no:7371
[code=fw:1g3ooiut]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> cName <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:1g3ooiut]
Change this as:
[code=fw:1g3ooiut]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TMSQUERY"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> nCol <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> cName <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:1g3ooiut][/quote:1g3ooiut]
Hello Mr. Rao
Same issue
[quote:1g3ooiut]
Called from E1FIELDGET(0)
Called from TMSQUERY:FIELDGET(639) in source\prg\msquery.prg
Called from MXCTAALM(26) in source\Mxctaalm.prg
Called from (b)CLINICA32WIN(69) in source\Clinica32win.prg
Called from TBTNBMP:CLICK(713) in .\source\classes\BTNBMP.PRG
Called from TBTNBMP:LBUTTONUP(999) in .\source\classes\BTNBMP.PRG
Called from TCONTROL:HANDLEEVENT(1817) in .\source\classes\CONTROL.PRG
Called from TBTNBMP:HANDLEEVENT(2051) in .\source\classes\BTNBMP.PRG
Called from _FWH(3559) in .\source\classes\WINDOW.PRG
Called from WINRUN(0)
Called from TMDIFRAME:ACTIVATE(1097) in .\source\classes\WINDOW.PRG
Called from CLINICA32WIN(138) in source\Clinica32win.prg
Called from MAIN(6) in source\Clinica32.prg
------------------------------------------------------------------------
[/quote:1g3ooiut]
This is FieldGet method
[code=fw:1g3ooiut]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Devuelve el valor de la columna en formato xBase</span><br /><br /><span style="color: #00C800;">METHOD</span> FieldGet<span style="color: #000000;">(</span> nFld <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TMSQuery <br /><span style="color: #00C800;">return</span><span style="color: #000000;">(</span> E1FieldGet<span style="color: #000000;">(</span> ::<span style="color: #000000;">hMySQL</span>, nFld <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:1g3ooiut] |
xbrowse command not working properly -- MR. RAO | Mr Rao
I did this
[code=fw:3sjnj8ng]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? oTb:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> oTb:<span style="color: #000000;">FieldPos</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"CODALM"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:3sjnj8ng]
And I got this
[url=https://imgbb.com/:3sjnj8ng][img:3sjnj8ng]https://i.ibb.co/GTvhMtJ/Screenshot-2.png[/img:3sjnj8ng][/url:3sjnj8ng] |
xbrowse command not working properly -- MR. RAO | Then
[code=fw:2fvf7v1m]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> nCol <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:2fvf7v1m]
this should work. Right? Unless the value is invalid ( like 0, nil, etc )
It may help us to put a trace
[code=fw:2fvf7v1m]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? n<br /> </div>[/code:2fvf7v1m]
before this line.
We see the value of "nCol" when the xbrowse command is being executed |
xbrowse command not working properly -- MR. RAO | [quote="nageswaragunupudi":2ldqmdhl]Then
[code=fw:2ldqmdhl]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">DEFAULT</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> |x| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> x == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">(</span> nCol <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oMySql</span>:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> nCol, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:2ldqmdhl]
this should work. Right? Unless the value is invalid ( like 0, nil, etc )
It may help us to put a trace
[code=fw:2ldqmdhl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? n<br /> </div>[/code:2ldqmdhl]
before this line.
We see the value of "nCol" when the xbrowse command is being executed[/quote:2ldqmdhl]
With the police
[url=https://ibb.co/TYndQPR:2ldqmdhl][img:2ldqmdhl]https://i.ibb.co/LYqHT96/Screenshot-3.png[/img:2ldqmdhl][/url:2ldqmdhl]
And then
[quote:2ldqmdhl]
Application
===========
Path and name: C:\clinica32\Clinica32.exe (32 bits)
Size: 4,612,608 bytes
Compiler version: Harbour 3.2.0dev (r2104281802)
FiveWin version: FWH 20.12
C compiler version: Microsoft Visual C 19.29.30133 (32-bit)
Windows version: 10.0, Build 19043
Time from start: 0 hours 0 mins 18 secs
Error occurred at: 23/02/2022, 12:43:03
Error description: Error BASE/1068 Argument error: array access
Args:
[ 1] = A {TXBRWCOLUMN,TXBRWCOLUMN} length: 2
[ 2] = U
Stack Calls
===========
Called from: source\xbrowse.prg => TXBROWSE:COLATPOS( 4544 )
Called from: source\xbrowse.prg => (b)TXBROWSE( 709 )
Called from: source\xbrowse.prg => TXBROWSE:SELECTEDCOL( 0 )
Called from: source\xbrowse.prg => TXBROWSE:PAINT( 2181 )
Called from: source\xbrowse.prg => TXBROWSE:DISPLAY( 2126 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1793 )
Called from: source\xbrowse.prg => TXBROWSE:HANDLEEVENT( 11821 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TMSQUERY:ERROR( 148 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 77 )
Called from: ../../../tobject.prg => TMSQUERY:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TMSQUERY:CSORT( 142 )
Called from: source\xbrowse.prg => TXBRWCOLUMN:ADJUST( 12803 )
Called from: source\xbrowse.prg => TXBROWSE:ADJUST( 1490 )
Called from: source\xbrowse.prg => TXBROWSE:INITIATE( 1334 )
Called from: source\xbrowse.prg => TXBROWSE:CREATEFROMCODE( 1176 )
Called from: source\Mxctaalm.prg => MXCTAALM( 76 )
Called from: source\Clinica32win.prg => (b)CLINICA32WIN( 69 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1097 )
Called from: source\Clinica32win.prg => CLINICA32WIN( 138 )
Called from: source\Clinica32.prg => MAIN( 6 )
[/quote:2ldqmdhl] |
xbrowse command not working properly -- MR. RAO | Hello Mr. RAO
Any advise? Do you need something else?? |
xbrowse command not working properly -- MR. RAO | Hello forum,
After some time, Mr Rao has managed to include Eagle1 in [b:1gj4pjj6]Xbrowse[/b:1gj4pjj6] and [b:1gj4pjj6]Datarow[/b:1gj4pjj6] making it more compatible and taking full advantage of all the facilities of the class.
Thank you very much Mr. Rao and Manu Esposito for making this possible.
[code=fw:1gj4pjj6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//#include "Eagle1.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"calendar.ch"</span><br /><br /><span style="color: #B900B9;">//#define REVD</span><br /><br /><span style="color: #00C800;">static</span> ntmp<br /><br /><span style="color: #00C800;">STATIC</span> oQry<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oCn, oDlg, oFont, oBrw<br /> <span style="color: #00C800;">local</span> oConnect <span style="color: #B900B9;">// Connection object</span><br /> <span style="color: #00C800;">local</span> oQry <span style="color: #B900B9;">// DataSet or RecordSet object</span><br /> <span style="color: #00C800;">local</span> cHost := <span style="color: #ff0000;">"127.0.0.1"</span><br /> <span style="color: #00C800;">local</span> cUser := <span style="color: #ff0000;">"root"</span><br /> <span style="color: #00C800;">local</span> cPassword := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> cDbName := <span style="color: #ff0000;">"fwhdemo"</span><br /> <span style="color: #00C800;">local</span> cTable := <span style="color: #ff0000;">"customers"</span> <span style="color: #B900B9;">//"wwonders" //"customers" //"customer"</span><br /> <span style="color: #00C800;">local</span> cPort, oRec<br /><br /> FWNumFormat<span style="color: #000000;">(</span> <span style="color: #ff0000;">"A"</span>, .t. <span style="color: #000000;">)</span><br /> SetGetColorFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// Create the "connection" object</span><br /> oConnect := TMSConnect<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// We connect to the server</span><br /> <span style="color: #00C800;">if</span> !oConnect:<span style="color: #000000;">Connect</span><span style="color: #000000;">(</span> cHost, cUser, cPassword, cDbName <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"There is no connection with the server"</span>, <span style="color: #ff0000;">"Operation Canceled"</span> <span style="color: #000000;">)</span><br /> oConnect:<span style="color: #000000;">Free</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span><span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> oQry := TMsTable<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oConnect, cTable <span style="color: #000000;">)</span><br /> oQry:<span style="color: #000000;">SetTinyAsLogical</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// We open the table, we bring the result to our client</span><br /> <span style="color: #00C800;">if</span> !oQry:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot open table: "</span> + cTable, <span style="color: #ff0000;">"Operation Cancelled"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span><span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-15</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">750</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> oQry:<span style="color: #000000;">ClassName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">50</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> DATASOURCE oQry COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span>, <span style="color: #ff0000;">"SALARY"</span>, <span style="color: #ff0000;">"AGE"</span>, <span style="color: #ff0000;">"MARRIED"</span> ;<br /> CELL LINES NOBORDER FOOTERS FASTEDIT AUTOSORT<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">{</span> |oRec| CtrDatos<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">Salary</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> :<span style="color: #000000;">Age</span>:<span style="color: #000000;">nFooterType</span> := AGGR_AVG<br /> :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> @ <span style="color: #000000;">10</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;">80</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Mod"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">190</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Del"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span> <br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> oQry:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oConnect:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> procedure CtrDatos<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> lNew := <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">RecNo</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">77</span>;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Mantenimiento de la tabla Test - "</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lNew, <span style="color: #ff0000;">"ADD"</span>, <span style="color: #ff0000;">"EDIT"</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">01</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"First"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">02</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">First</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">01</span>, <span style="color: #000000;">26.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Last"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">02</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Last</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">2.8</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Street"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Street</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">2.8</span>, <span style="color: #000000;">26.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"City"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">City</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">State</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K XX"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">5.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Zip"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Zip</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K 99999-9999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">13.9</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hiredate"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">78</span>, <span style="color: #000000;">83</span> DTPICKER oRec:<span style="color: #000000;">Hiredate</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">11</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Hiredate</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">5.7</span>, <span style="color: #000000;">22</span> <span style="color: #0000ff;">CHECKBOX</span> oRec:<span style="color: #000000;">Married</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Married"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">33</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Age"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">24.5</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Age</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K 999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">37.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Salary"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Salary</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@KE 9,999,999.999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><span style="color: #B900B9;">//..................... El campo MEMO...............................................</span><br /> @ <span style="color: #000000;">6.4</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Notes"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">8.1</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Notes</span> MEMO <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">270</span>, <span style="color: #000000;">65</span><br /><span style="color: #B900B9;">//..................................................................................</span><br /><br /> @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Save"</span>;<br /> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br /> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span>;<br /> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">Undo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Exit"</span>;<br /> <span style="color: #0000ff;">OF</span> oDlg;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure FuncVale<span style="color: #000000;">(</span> lNew <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nRec<br /><br /> <span style="color: #00C800;">if</span> lNew<br /> oQry:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /> oQry:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> nRec := oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oQry:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /> oQry:<span style="color: #000000;">GoTo</span><span style="color: #000000;">(</span> nRec <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure Borrar<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nRecNo := oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Realmente quiere borrar el registro "</span> + Str<span style="color: #000000;">(</span> oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"?"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oQry:<span style="color: #000000;">Delete</span><span style="color: #000000;">(</span> , <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Borrado en el servidor"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Refresca la lista?"</span> <span style="color: #000000;">)</span><br /> oQry:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oQry:<span style="color: #000000;">GoTo</span><span style="color: #000000;">(</span> nRecNo <span style="color: #000000;">)</span><br /> oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"No se ha borrado..."</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br />func strnum<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> Ltrim<span style="color: #000000;">(</span> str<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:1gj4pjj6]
[url=https://ibb.co/f4kdMT5:1gj4pjj6][img:1gj4pjj6]https://i.ibb.co/gzSZycp/Screenshot-3.png[/img:1gj4pjj6][/url:1gj4pjj6]
[url=https://ibb.co/RSLL0FJ:1gj4pjj6][img:1gj4pjj6]https://i.ibb.co/Ctxx7cS/Screenshot-4.png[/img:1gj4pjj6][/url:1gj4pjj6]
[url=https://ibb.co/Xt0jp7H:1gj4pjj6][img:1gj4pjj6]https://i.ibb.co/njd6f7p/Screenshot-5.png[/img:1gj4pjj6][/url:1gj4pjj6] |
xbrowse como capturo la tecla presionada en una celda? | hola.
como hago para capturar la tecla que se presionó en la celda de una xbrowse?
gracias. |
xbrowse como capturo la tecla presionada en una celda? | Goos,
oLbx:bKeyDown := {|nKey| TuFuncion( nKey ) }
TuFuncion( nKey )
if nKey == VK_KF9
....
endif
return nil
Saludos |
xbrowse como capturo la tecla presionada en una celda? | gracias |
xbrowse con IsBinaryData y FITypeFromMemory | He encontrado problemas usando estas funciones
En la primera he cambiado
[code=fw:ln8dw9dv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> c < <span style="color: #ff0000;">' '</span> .and. !<span style="color: #000000;">(</span> c $ Chr<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> <span style="color: #000000;">13</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:ln8dw9dv]por
[code=fw:ln8dw9dv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> c < <span style="color: #ff0000;">' '</span> .and. !<span style="color: #000000;">(</span> c $ Chr<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> <span style="color: #000000;">13</span> <span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> <span style="color: #000000;">26</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:ln8dw9dv]
Ya que me estaba dando problemas en la visualización de campos memos
En la segunda he cambiado
[code=fw:ln8dw9dv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">return</span> nFormat</div>[/code:ln8dw9dv] por [code=fw:ln8dw9dv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">return</span> IfNil<span style="color: #000000;">(</span>nFormat, <span style="color: #000000;">-1</span><span style="color: #000000;">)</span></div>[/code:ln8dw9dv]
Por lo mismo. Algunos campos memos me los detecta como imagenes y llamar a la función FITypeFromMemory, como es lógico no puede hacer a la imagen, y nFormat tenía valor NIL |
xbrowse con IsBinaryData y FITypeFromMemory | Including Chr(26) is a very important fix. Hope this will be fixed in the next release.
But is it really necessary to change the return value of FITypeFromMemory(<c>) function? Is there any character value for which this function returns NIL ? So far I have not found any. Can you please provide a sample character string for which this function returns NIL ? |
xbrowse con IsBinaryData y FITypeFromMemory | nageswaragunupudi,
Gracias por la respuesta,
Voy a intentar generar un ejemplo con el problema. |
xbrowse con IsBinaryData y FITypeFromMemory | No consigo volver a reproducir el error.
Elimino la modificación en la función FITypeFromMemory.
Si me vuelve a pasar lo comento.
Muchas gracias. |
xbrowse con MultiSelec y Bitmaps | Amigos:Necesito un ejemplo con multiselec, bitmaps.Ademas no veo como mostrar los registros seleccionadosMuchas gracias.Ruben Fernandez(Usaba el de HDC, por eso los molesto.) |
xbrowse con MultiSelec y Bitmaps | Hola Rubén:No se si será esto lo que buscas:<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/forums/viewtopic.php?p=55176&highlight=#55176">http://www.fivetechsoft.com/forums/view ... ght=#55176</a><!-- m -->Hay un link a un ejemplo.[quote="Ruben D. Fernandez":s3idt2sl]Amigos:
Necesito un ejemplo con multiselec, bitmaps.
Ademas no veo como mostrar los registros seleccionados
Muchas gracias.
Ruben Fernandez
(Usaba el de HDC, por eso los molesto.)[/quote:s3idt2sl] |
xbrowse con MultiSelec y Bitmaps | Exelente Manuel, Muchas graciasSaludosRuben Fernandez. |
xbrowse con arreglos | Amigos del Foro
Como puedo generar una fila en blanco cuando me encuentro en la ultima columna del browse, utilizando la flecha abajo o el enter, utilizo arreglos.
Gracias de antemano
Atentamente
Oscar |
xbrowse con columnas variables | buenos dias :
he construido un select cuyo resultado puede tener una cantidad variable de columnas ( los nombres de las columnas pueden cambiar segun la empresa que lo use )
ejemplo ... mes, v_alma01, v_alma02, v_alma03, v_alma04, v_alma05
mes, v_hist, v_proy, v_trans
este select contiene las ventas mensuales por cada tienda
Enero, 100, 150, 120
febrer0, 200,150,130
como puedo hacer para construir un xbrowse que me muestre las columnas obtenidas ( que como indique anteriormente son variables )
gracias por la atencion |
xbrowse con columnas variables | Busca en el foro AddCol, es justo lo que necesitas, puedes definir el xbrowse vacio o con algunas columnas y despues ir añadiendo según tus necesidades
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=37456&p=223908#p223906">viewtopic.php?f=6&t=37456&p=223908#p223906</a><!-- l --> |
xbrowse con columnas variables | aTdas ... es un arreglo de las tiendas de una empresa ( este arreglo puede ser variable, es decir hoy tiene 3 y luego puede tener 5, 6, o mas )
TEM_T ... es una tabla (producto de un select) donde tiene las valores de las ventas de las tiendas
necesito un browse con las ventas de las tiendas, pero solo obtengo 0,00 en el browse ( las cabeceras si se muestran correctamente )
for i := 1 to len(aTdas)
WITH OBJECT oCol := oBrwT:AddCol()
:bStrData := { || cValToChar( TEM_T->( FieldGet( i ) ) ) }
:cHeader := trim(aTdas[i,1])
END WITH
next i
favor su ayuda ... |
xbrowse con columnas variables | [quote="hpoliz":1jemiiv6]aTdas ... es un arreglo de las tiendas de una empresa ( este arreglo puede ser variable, es decir hoy tiene 3 y luego puede tener 5, 6, o mas )
TEM_T ... es una tabla (producto de un select) donde tiene las valores de las ventas de las tiendas
necesito un browse con las ventas de las tiendas, pero solo obtengo 0,00 en el browse ( las cabeceras si se muestran correctamente )
for i := 1 to len(aTdas)
WITH OBJECT oCol := oBrwT:AddCol()
:bStrData := { || cValToChar( TEM_T->( FieldGet( i ) ) ) }
:cHeader := trim(aTdas[i,1])
END WITH
next i
favor su ayuda ...[/quote:1jemiiv6]
Qué versión de Fwh utilizas?
Mira a ver si utilizando una variable intermedia te funciona
[code=fw:1jemiiv6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>aTdas<span style="color: #000000;">)</span><br /> WITH OBJECT oCol := oBrwT:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cDato := cValToChar<span style="color: #000000;">(</span> TEM_T-><span style="color: #000000;">(</span> FieldGet<span style="color: #000000;">(</span> i <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || cDato <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">cHeader</span> := trim<span style="color: #000000;">(</span>aTdas<span style="color: #000000;">[</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> END WITH<br /> <span style="color: #00C800;">next</span> i<br /> </div>[/code:1jemiiv6] |
xbrowse con columnas variables | Estimado cnavarro :
estoy usando fwh 17.09 y no funciono usando la variable intermedia que sugeriste. <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
Se agradece tu sugerencia |
xbrowse con columnas variables | Qué error te da? |
xbrowse con columnas variables | Estimado cnavarro :
disculpa si me exprese mal ..
No hay error en la sentencia ... me referia a que no visualizo los datos ... solo veo 0,00
Colocando de esta forma si se visualizan los valores, pero como no se cuantas columnas tendra la tabla necesito que el browse sea variable
ADD COLUMN TO XBROWSE oBrwT ;
DATA TEM_T->V_ALMA01 ;
HEAD "ALMA01" SIZE 80
ADD COLUMN TO XBROWSE oBrwT ;
DATA TEM_T->V_ALMA02 ;
HEAD "ALMA02" SIZE 80
ADD COLUMN TO XBROWSE oBrwT ;
DATA TEM_T->V_ALMA03 ;
HEAD "ALMA03" SIZE 80 |
xbrowse con columnas variables | El problema seguramente es lo que se denomina "detached" local, busca en el foro y si no ves como solucionarlo, seguimos con ello |
xbrowse con columnas variables | Estimado cnavarro :
Gracias por la atencion ... revisare lo sugerido |
xbrowse con columnas variables | hpoliz (no se tu nombre)
Hago algo muy, pero muy parecido a lo que expones, solo que con dbfs.
Intenta adaptar el siguiente codigo, en el que claramente se ve que la tabla InfoVtas sería como el resultado de tu consulta Sql.
[code=fw:j69350d4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//------------------------------------//FranciscoA</span><br /><span style="color: #00C800;">Function</span> Ventas<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//Ej. Todos los PtosVta: "BAR","RES","RCH","COM","PIS"</span><br /> <span style="color: #00C800;">local</span> aPtoVtas:=<span style="color: #000000;">{</span><span style="color: #ff0000;">"BAR"</span>,<span style="color: #ff0000;">"RCH"</span><span style="color: #000000;">}</span> <span style="color: #B900B9;">//Ptos/Vta que deseamos informar</span><br /> <span style="color: #00C800;">local</span> aVentas, aStruct:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span>, cCampo, n, cPto, dFecha, nVtas:=<span style="color: #000000;">0</span><br /><br /> DBUsearea<span style="color: #000000;">(</span>.t.,,<span style="color: #ff0000;">"Ventas"</span>,<span style="color: #ff0000;">"Ventas"</span>,.t.<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->PUNTOVTA + DTOS<span style="color: #000000;">(</span>field->FECHA<span style="color: #000000;">)</span> <span style="color: #0000ff;">TO</span> PF TEMPORARY<br /><br /> aadd<span style="color: #000000;">(</span> aStruct, <span style="color: #000000;">{</span><span style="color: #ff0000;">"FECHA"</span>, <span style="color: #ff0000;">"D"</span>, <span style="color: #000000;">8</span>,<span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>aPtoVtas<span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aStruct, <span style="color: #000000;">{</span> aPtoVtas<span style="color: #000000;">[</span>n<span style="color: #000000;">]</span>, <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">10</span>,<span style="color: #000000;">2</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /><br /> DbCreate<span style="color: #000000;">(</span> <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>nfovtas"</span>, aStruct <span style="color: #000000;">)</span> <br /><br /> DBUsearea<span style="color: #000000;">(</span>.t.,,<span style="color: #ff0000;">".<span style="color: #000000;">\I</span>nfoVtas"</span>,<span style="color: #ff0000;">"InfoVtas"</span>,.f.<span style="color: #000000;">)</span><br /><br /> DbSelectArea<span style="color: #000000;">(</span><span style="color: #ff0000;">"Ventas"</span><span style="color: #000000;">)</span><br /> dbgotop<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>aPtoVtas<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Ventas-><span style="color: #000000;">(</span> DbSeek<span style="color: #000000;">(</span> cPto := aPtoVtas<span style="color: #000000;">[</span>n<span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">While</span> alltrim<span style="color: #000000;">(</span>field->PuntoVta<span style="color: #000000;">)</span> == cPto<br /> dFecha := field->Fecha<br /> nVtas := <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">While</span> field->fecha = dFecha<br /> nVtas += Field->ValorFact<br /> dbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Enddo</span><br /> <br /> InfoVtas-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> InfoVtas->Fecha := dFecha<br /> InfoVtas->&cPto := nVtas<br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">Enddo</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">next</span><br /><br /> Ventas-><span style="color: #000000;">(</span>DbCloseArea<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> BrwVentas<span style="color: #000000;">(</span><span style="color: #ff0000;">"INFOVTAS"</span>,aPtoVtas<span style="color: #000000;">)</span><br /><br /> INFOVTAS-><span style="color: #000000;">(</span>DBCLOSEAREA<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> FERASE<span style="color: #000000;">(</span><span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NFOVTAS.DBF"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//------------------------------------//</span><br /><span style="color: #00C800;">Function</span> BrwVentas<span style="color: #000000;">(</span>cTblName,aHeaders<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ventas por Tienda"</span><br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">280</span>,<span style="color: #000000;">140</span> ;<br /> DATASOURCE cTblName ;<br /> HEADERS aHeaders ;<br /> FOOTERS CELL LINES <br /><br /> WITH OBJECT oBrw <br /> :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> :<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> END<br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span><span style="color: #000000;">40</span>,<span style="color: #000000;">20</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:j69350d4]
Saludos. |
xbrowse con diferentes fuentes y tipos de letra | Hola,es posible en un xbrowse crear lineas que tengan distintos tipos o colores de letra en la misma linea ? Algo como esto: <!-- m --><a class="postlink" href="http://widefido.com/products/todopaper/">http://widefido.com/products/todopaper/</a><!-- m -->Saludos, |
xbrowse con diferentes fuentes y tipos de letra | en la misma linea si es posible... en la misma celda no creo...para definir distintos font en una misma linea (Row)Para los tipos de Letra...[code:32iujmu6]
DEFINE FONT aFont[ 1 ] NAME 'arial' SIZE 0,-8
DEFINE FONT aFont[ 2 ] NAME 'arial' SIZE 0,-10 italic
DEFINE FONT aFont[ 3 ] NAME 'arial' SIZE 0,-12 bold
....
for j = 1 to len( oBrw:aArraydata )
oBrw:aCols[ j ]:oDataFont := {|| if ( oBrw:aRow[ MB_NIVEL ] == 1, aFont[ 1 ],;
( if ( oBrw:aRow[ MB_NIVEL ] == 2, aFont[ 2 ], aFont[ 3 ] ) ) ) }
next
[/code:32iujmu6]
Para los Colores
[code:32iujmu6]
oBrw:aCols[ MB_SALDO ]:bClrStd := {|| if ( val( oBrw:aRow[ MB_SALDO ] ) > 0, {negro, blanco}, {rojo,blanco} )}
[/code:32iujmu6] |
xbrowse con diferentes fuentes y tipos de letra | Aprovechando el Tips de FONT, como puedo modificar el FONT cuando estoy en edicion de celda bajo xBrowse..? se ve muy pequeño, gracias..saluods... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> PostData: MCFOX, ya hice algunas adaptaciones y pruebas en la edicion de celdas del xBw. y el uso de las teclas UP y DOWN, te la envio para que lo veas a tu privado, solo falta adaptar lo de cambiar los BITMAPS en los botones cuando edito...GET_BUTTON, para que no salgan los "...", me perdi haciendo los cambios, seguire intentando.gracias..saludos. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xbrowse con diferentes fuentes y tipos de letra | creo que no se le puede cambiar el font en la edicion, pero te doy una solucion...en la clase TXBrwColumn agrega una nueva data[b:2hxo6ga8]oEditFont[/b:2hxo6ga8]en el metodo Adjust()[code:2hxo6ga8]
DEFAULT ::oDataFont := ::oBrw:oFont,;
::oHeaderFont := ::oBrw:oFont,;
::oFooterFont := ::oBrw:oFont,;
::oEditFont := ::oBrw:oFont //<====agrega esto
[/code:2hxo6ga8]
en el metodo Edit()
[code:2hxo6ga8]
local oFont // < == agregar
if ValType ( ::oEditFont ) == "B" // <== agregar
oFont = Eval( ::oEditFont, Self ) // <== agregar
else // <== agregar
oFont = ::oEditFont // <== agregar
endif // <== agregar
[/code:2hxo6ga8]
en el mismo metodo agregar el objeto oFont al crear el get
[code:2hxo6ga8]
if Empty( cPic ) .and. ::oBrw:nDataLines > 1
::oEditGet := TMultiGet():New( 0,0,{ | u | If(PCount()==0,uValue,uValue:= u ) },;
::oBrw,0,0,oFont,.F.,aColors[ 1 ],aColors[ 2 ];
,,.F.,,.F.,,lCenter,lRight,.F.,,,.F.,.T.,.T. )
else
::oEditGet := TGet():New( 0,0,{ | u | If(PCount()==0,uValue,uValue:= u ) },;
::oBrw,0,0,cPic,,aColors[ 1 ],aColors[ 2 ];
,oFont,.F.,,.F.,,.F.,,lCenter,lRight,,.F.,.f.,.T.,,.F.,,,,)
endif
[/code:2hxo6ga8]si detallas bien esta incluido el objeto oFont en la creacion de GET.la data oEditFont se puede usar como code block u objetooBrw:aCols[ 1 ]:oEditFont = oFont // objetooBrw:aCols[ 1 ]:oEditFont = {|| if ( verdadero, oFont1, oFont2 } // code block |
xbrowse con diferentes fuentes y tipos de letra | Jose Luis,<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/forums/viewtopic.php?t=12026&highlight=">http://www.fivetechsoft.com/forums/view ... highlight=</a><!-- m -->[quote="Carles":1r2asv9j][url=http://imageshack.us:1r2asv9j][img:1r2asv9j]http://img154.imageshack.us/img154/153/image1vm8.jpg[/img:1r2asv9j][/url:1r2asv9j][/quote:1r2asv9j] |
xbrowse con diferentes fuentes y tipos de letra | [quote="Carles":28qx7jta]Jose Luis,
<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/forums/viewtopic.php?t=12026&highlight=">http://www.fivetechsoft.com/forums/view ... highlight=</a><!-- m -->
[quote="Carles":28qx7jta][url=http://imageshack.us:28qx7jta][img:28qx7jta]http://img154.imageshack.us/img154/153/image1vm8.jpg[/img:28qx7jta][/url:28qx7jta][/quote:28qx7jta][/quote:28qx7jta]CARLES, gracias man, pero alli esta en edicion de celda, haciendo GET o GET_BUTTON..?, eso lo hace pero navegando en el browse... como MCFOX hizo quedo listo, es decir puedo usar el FONT que quiera cuando hago edicion de columnas cambiando tipo y tamaño ....igual si tienes algun ejemplo o lo que sea sobre xBROWSE sera bienvenido... le estoy dando duro a la clase para usar en FACTURACION con la edicion por celda...saludos. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xbrowse con diferentes fuentes y tipos de letra | Gracias, |
xbrowse con diferentes fuentes y tipos de letra | Jose Luis,Piensa que con el nuevo metodo ::bPaintText puedes controlar toda la celda y pintar lo que te de la gana[url=http://imageshack.us:waqzh2ag][img:waqzh2ag]http://img123.imageshack.us/img123/3538/browsezc7.jpg[/img:waqzh2ag][/url:waqzh2ag] |
xbrowse con diferentes fuentes y tipos de letra | gracias Carles, yo en lo personal no me habia percatado de esa posibilidad, a pesar de que he estudiado bastante la clase y me parece increible, el problema de Jose Luis era que queria cambiar el tipo de letra al momento de editar. |
xbrowse con diferentes fuentes y tipos de letra | [quote="Carles":3eh2j0k9]Jose Luis,
Piensa que con el nuevo metodo ::bPaintText puedes controlar toda la celda y pintar lo que te de la gana
[url=http://imageshack.us:3eh2j0k9][img:3eh2j0k9]http://img123.imageshack.us/img123/3538/browsezc7.jpg[/img:3eh2j0k9][/url:3eh2j0k9][/quote:3eh2j0k9]Carles, gracias por tu informacion, eso se ve super, el detalle cmo dijo MCFOX es que queria cambiar el FONT al momento de hacer edicion de celda, ahora puedo hacer ambas cosas, cambiar los FONT como me explicas al momento de navegar y al hacer la edicion de celdas, gracias a ambos por sus aportes y ayudas....saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xbrowse con maridadb SIN posibilidad de refresh | hola.
Estoy frenado por esta situacion,
tengo un xbrowse con mariadb y cuando quiero que me refresque el xbrowser no lo hace.
ya probe hacer un setfocus antes de refresh y nada.
alguien que tenga un ejemplo de como soluciono esto por favor.
NO USO ROWSET
[quote:1u35yrf0] Time from start: 0 hours 0 mins 20 secs
Error occurred at: 06/10/2021, 07:53:34
Error description: Error BASE/1132 Error de rango: acceso al array
Args:
[ 1] = A {1,1,"ASSDASDASD ... } length: 5
[ 2] = N 6
Stack Calls
===========
Called from: .\source\internal\FWMARIA.PRG => (b)FWMARIAROWSET( 1287 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:LAPPENDBLANK( 0 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:CANCELAPPEND( 4764 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:SORTDATA( 2981 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:REQUERY( 3468 )
Called from: Source\TProductos.prg => TPRODUCTOS:GRABAR( 367 )[/quote:1u35yrf0]
gracias. |
xbrowse con maridadb SIN posibilidad de refresh | Muestre siempre el código para Mister Rao ojear.
Saludos. |
xbrowse con maridadb SIN posibilidad de refresh | El error parece indicar un problema con un elemento del array que deberia ser dato y no array
Enviado desde mi Redmi Note 9S mediante Tapatalk |
xbrowse con maridadb SIN posibilidad de refresh | Misma respuesta de la pregunta anterior.
Muestranos como llamas a tu consulta, debes tomqr en cuenta que refresh o requery funciona si lo haces sobre jn objeto tipo query/recordset.
No tenemis claro como lo eatas usando, si usay array o que.
Por ello te pido nos muestres como lo usas... |
xbrowse con maridadb SIN posibilidad de refresh | No miro problema alguno, lo unico es verificar si el query retorna datos, suponiendo que si, efectivamente el oQry:Refresh() debria funcionar,
podemos ver en remoto para salir de dudas? Karlos.vargas at gmail.com |
xbrowse con maridadb SIN posibilidad de refresh | [quote="carlos vargas":1x62qxav]Misma respuesta de la pregunta anterior.
Muestranos como llamas a tu consulta, debes tomqr en cuenta que refresh o requery funciona si lo haces sobre jn objeto tipo query/recordset.
No tenemis claro como lo eatas usando, si usay array o que.
Por ello te pido nos muestres como lo usas...[/quote:1x62qxav]
[code=fw:1x62qxav]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">TEXT</span> into cSql<br /> <span style="color: #0000ff;">Select</span><br /> a.<span style="color: #0000ff;">id</span> AS c1,<br /> a.idfactura AS c2,<br /> a.fecha AS c3,<br /> a.idcontacto AS c4,<br /> b.<span style="color: #0000ff;">id</span> AS c5,<br /> b.nombre AS c6,<br /> b.telefono AS c7,<br /> a.subtotal AS c8,<br /> a.descuento AS c9,<br /> a.total AS c10<br /> <span style="color: #0000ff;">FROM</span> tbfacturados a<br /> <span style="color: #0000ff;">Left</span> <span style="color: #0000ff;">JOIN</span> tbcontactos b<br /> <span style="color: #0000ff;">ON</span> a.idcontacto = b.<span style="color: #0000ff;">id</span><br /> <span style="color: #0000ff;">ORDER BY</span> a.idfactura<br /> ENDTEXT<br /><br /> oQry := ::<span style="color: #000000;">oCnx</span>:<span style="color: #000000;">QUERY</span><span style="color: #000000;">(</span> cSql <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"DLGMENU"</span><br /><br /> <span style="color: #B900B9;">//----------( )----------</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oDlg</span> ;<br /> DATASOURCE oQry ;<br /> COLUMNS <span style="color: #ff0000;">"c1"</span>, <span style="color: #ff0000;">"c6"</span>, <span style="color: #ff0000;">"c3"</span>, <span style="color: #ff0000;">"c2"</span>, <span style="color: #ff0000;">"c8"</span>, <span style="color: #ff0000;">"c9"</span>, <span style="color: #ff0000;">"c10"</span><br /><br /> WITH OBJECT ::<span style="color: #000000;">oBrw</span><br />...<br /><br />ese es mi codiigo, y una vez que hago un insert hago:<br />::<span style="color: #000000;">oQry</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />::<span style="color: #000000;">oBrw</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:1x62qxav] |
xbrowse con maridadb SIN posibilidad de refresh | [quote="carlos vargas":26krl8pp]No miro problema alguno, lo unico es verificar si el query retorna datos, suponiendo que si, efectivamente el oQry:Refresh() debria funcionar,
podemos ver en remoto para salir de dudas? Karlos.vargas at gmail.com[/quote:26krl8pp]
dale! gracias. |
xbrowse con maridadb SIN posibilidad de refresh | Una pregunta Gustavo
Porque utilizas la sintaxis ::oBrw , ::oDlg, etc sino es necesario.
Algún motivo especial ?
Saludos
Jose
Enviado desde mi Lenovo TB-J606F mediante Tapatalk |
xbrowse con maridadb SIN posibilidad de refresh | [quote="jvtecheto":1ygcplfz]Una pregunta Gustavo
Porque utilizas la sintaxis ::oBrw , ::oDlg, etc sino es necesario.
Algún motivo especial ?
Saludos
Jose
Enviado desde mi Lenovo TB-J606F mediante Tapatalk[/quote:1ygcplfz]
Porque utilizo objetos:
[code=fw:1ygcplfz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">[</span>code<span style="color: #000000;">]</span><span style="color: #00C800;">CLASS</span> TProductos <span style="color: #0000ff;">FROM</span> TDistribuidores, TSucursal<br /> <span style="color: #00C800;">DATA</span> oCnx<br /> <span style="color: #00C800;">DATA</span> nId<br /> <span style="color: #00C800;">DATA</span> nIdPrecio<br /> <span style="color: #00C800;">DATA</span> nAccion<br /> <span style="color: #00C800;">DATA</span> aRespuesta<br /><br /> <span style="color: #00C800;">DATA</span> oGets<br /> <span style="color: #00C800;">DATA</span> vGets<br /> <span style="color: #00C800;">DATA</span> oBtns<br /> <span style="color: #00C800;">DATA</span> oBrw<br /> <span style="color: #00C800;">DATA</span> oSays<br /> <span style="color: #00C800;">DATA</span> oBrwFechas<br /> <span style="color: #00C800;">DATA</span> oQry<br /><span style="color: #000000;">[</span>/code<span style="color: #000000;">]</span></div>[/code:1ygcplfz] |
xbrowse con mysql empotrado no me refresca | eso.
no me refresca, uso windows 10.
en un xbrowse muestro una tabla (no esta relacionada, solo tiene 4 cmapos)
hago un select filtrando por fecha,
hago un obrw:refresh()
y no me muestra los datos (y me aseguro por un debugview que los datos estan) |
xbrowse con mysql empotrado no me refresca | Amigo, é um BROWSE de array ou objeto?
se for de array faça:
obrw:setarray(aDados)
obrw:refresh()
se possível mostre uma parte do código. |
xbrowse con mysql empotrado no me refresca | Hola!
he probado con array y con objetos.
este es el codigo completo.
Seleccionar 01/11/2017 para que muestre 2 registros, son los unicos que tiene.
gracias!
[url:2jk4rg4h]https://drive.google.com/file/d/18fpSPrNXWdp-FblO5d5imWw2iASPdfbR/view?usp=sharing[/url:2jk4rg4h] |
xbrowse con recurso se pierde la barra vertical y horizontal | xbrowse con recurso se pierde la barra vertical y horizontal, se pierde no apacese. Cuando se usa @ 0,0 xbrowse ... si muestra la barra vertical y horizontal.
Ejemplo.
[code=fw:2104f646]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ....<br /> <br /> oLbx := TXBrowse<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oDlgbrow <span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">(</span> <span style="color: #000000;">4001</span> <span style="color: #000000;">)</span><br /><br /> oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"planta"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">value</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Planta"</span><br /> oCol:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">" "</span><br /> oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">50</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT <span style="color: #B900B9;">//AL_RIGHT AL_CENTER</span><br /> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT <br /> <br /> oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"nom_proceso"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">value</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Proceso"</span><br /> oCol:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">" "</span><br /> oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">160</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT <span style="color: #B900B9;">//AL_RIGHT AL_CENTER</span><br /> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT <br /> <br /> oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"codmez"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">value</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Cod.Form"</span><br /> oCol:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">" "</span><br /> oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">60</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT <span style="color: #B900B9;">//AL_RIGHT AL_CENTER</span><br /> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT <br /><br /> <br /> oCol := oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"nombre_mez"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">value</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Nombre.Formulacion"</span><br /> oCol:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">" "</span><br /> oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">280</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_LEFT <span style="color: #B900B9;">//AL_RIGHT AL_CENTER</span><br /> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT <br /><br /> oLbx:<span style="color: #000000;">lHScroll</span> := .t.<br /> oLbx:<span style="color: #000000;">lVScroll</span> := .t.<br /><br /> oLbx:<span style="color: #000000;">SetAdo</span><span style="color: #000000;">(</span>oDbfxls<span style="color: #000000;">)</span> <span style="color: #B900B9;">//oBrw:SetRDD()</span><br /> oLbx:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />.....<br /><br /><br /> </div>[/code:2104f646] |
xbrowse con recurso se pierde la barra vertical y horizontal | ruben Dario,
no es que no aparezca, en FWH en las ultimas versiones los scroll no aparecen cuando en versiones anteriores creo que antes de la 10.6 si aparecian.
Para que aparezcan hay que modificar la propiedad:
Windows Style (del recurso)
con:
0x50B10000
aqui la B indica que se mostraran los dos browse, tanto vertical como horizontal.
Si le aplicas A se mostrara solo uno.
Espero lo corrijan para que se pueda usar los scrolles como antes y a gusto para no depender de los recursos. |
xbrowse con recurso se pierde la barra vertical y horizontal | [quote="wmormar":z8hrtnc0]ruben Dario,
no es que no aparezca, en FWH en las ultimas versiones los scroll no aparecen cuando en versiones anteriores creo que antes de la 10.6 si aparecian.
Para que aparezcan hay que modificar la propiedad:
Windows Style (del recurso)
con:
0x50B10000
aqui la B indica que se mostraran los dos browse, tanto vertical como horizontal.
Si le aplicas A se mostrara solo uno.
Espero lo corrijan para que se pueda usar los scrolles como antes y a gusto para no depender de los recursos.[/quote:z8hrtnc0]
Gracias por la respuesta Willian,
Eso veo que hay cambios.
Por lo menos yo hize el salto de la 8.03 a la 10.7.
Con la 10.7 no fuenciona este codigo y con 8.03 si.
[code=fw:z8hrtnc0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLbx ; <br /> COLUMNS <span style="color: #ff0000;">"tipmod"</span>, <span style="color: #ff0000;">"Nombre"</span>,<span style="color: #ff0000;">"Valo"</span>,<span style="color: #ff0000;">"Status"</span> ; <br /> HEADERS <span style="color: #ff0000;">"Codigo"</span>, <span style="color: #ff0000;">"Nombre"</span>,<span style="color: #ff0000;">"Valor"</span>,<span style="color: #ff0000;">"Status"</span> ; <br /> PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"@Z 99,999,999.99"</span>,<span style="color: #00C800;">nil</span> ; <br /> COLSIZES <span style="color: #000000;">60</span>, <span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> ; <br /> JUSTIFY .F., .F., .T., .T. ;<br /> <span style="color: #0000ff;">OF</span> oDlgbrow <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4001</span> ; <br /> RECORDSET oDat01 <br /> </div>[/code:z8hrtnc0]
Cuando tu dices Windows Style (del recurso)
Te refieres en este caso trabajo con Pelles para hacer el recurso y es un codigo que toca modificar al fivewin.
El archivo de recursos lo tengo como un DLL el unico codigo que veo es el de Manifiesto y es este.
[code=fw:z8hrtnc0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><?xml version=<span style="color: #ff0000;">"1.0"</span> encoding=<span style="color: #ff0000;">"UTF-8"</span> standalone=<span style="color: #ff0000;">"yes"</span>?><br /><assembly xmlns=<span style="color: #ff0000;">"urn:schemas-microsoft-com:asm.v1"</span> manifestVersion=<span style="color: #ff0000;">"1.0"</span>><br /><assemblyIdentity<br /> type=<span style="color: #ff0000;">"win32"</span><br /> <span style="color: #0000ff;">name</span>=<span style="color: #ff0000;">"MyOrganization.MyDivision.MyApp"</span><br /> version=<span style="color: #ff0000;">"1.0.0.0"</span><br /> processorArchitecture=<span style="color: #ff0000;">"X86"</span><br /> /><br /> <description>Verbal description <span style="color: #0000ff;">of</span> MyApp.</description><br /> <dependency><br /> <dependentAssembly><br /> <assemblyIdentity<br /> type=<span style="color: #ff0000;">"win32"</span><br /> <span style="color: #0000ff;">name</span>=<span style="color: #ff0000;">"Microsoft.Windows.Common-Controls"</span><br /> version=<span style="color: #ff0000;">"6.0.0.0"</span><br /> processorArchitecture=<span style="color: #ff0000;">"X86"</span><br /> publicKeyToken=<span style="color: #ff0000;">"6595b64144ccf1df"</span><br /> language=<span style="color: #ff0000;">"*"</span><br /> /><br /> </dependentAssembly><br /> </dependency><br /></assembly><br /> </div>[/code:z8hrtnc0]
Gracias |
xbrowse con recurso se pierde la barra vertical y horizontal | ruben Dario,
Me refiero a esto:
[img:1k6jv1ly]http://a.imageshack.us/img822/6389/propw.jpg[/img:1k6jv1ly]
Alojado en [url=http://imageshack.us:1k6jv1ly]ImageShack.us[/url:1k6jv1ly]
Esta es la propiedad del txbrowse y enmarco la modificacion que debes hacer para que se muestren los scroll |
xbrowse con recurso se pierde la barra vertical y horizontal | [quote="wmormar":36sssj6p]ruben Dario,
Me refiero a esto:
[img:36sssj6p]http://a.imageshack.us/img822/6389/propw.jpg[/img:36sssj6p]
Alojado en [url=http://imageshack.us:36sssj6p]ImageShack.us[/url:36sssj6p]
Esta es la propiedad del txbrowse y enmarco la modificacion que debes hacer para que se muestren los scroll[/quote:36sssj6p]
Gracias Willian ,
Yo actualmente uso Pelles, uso el componete Listbox, uso el parametro que tu me dices es Estilo de ventana, pero no funciona, veo que en tu ejemplo usa un compenente personalizado, lo que hago es quitar el componete Listbox y colocar es personalisado, pero de da error. La clase TXBROWSEW es obligacion nombrarla me imagino que es la clase que maneja FWH, mi preguna es factible manejarlo con el Listbox, o con codigo fuente que se pueda adicionar.
Ver Ejemplo.
<!-- m --><a class="postlink" href="http://img695.imageshack.us/img695/5509/mensage1.jpg">http://img695.imageshack.us/img695/5509/mensage1.jpg</a><!-- m -->
Saludos, Gracias |
xbrowse con recurso se pierde la barra vertical y horizontal | ruben Dario,
el nombre de la clase es:
TXBROWSE
prueba y veras que todo ok |
xbrowse con recurso se pierde la barra vertical y horizontal | [quote="wmormar":16q7ea7f]ruben Dario,
el nombre de la clase es:
TXBROWSE
prueba y veras que todo ok[/quote:16q7ea7f]
Muchas Gracias Willian me funciono,
Te hago otra pregunta veo que las lineas verticales y horizontales con muy gruesas como las dejo mas delgadas. El problema era que le habia puesto la clase TXBROWSEW
Tambien veo que la esquina superior no queda pintada del mismo color del titulo.
Te adjunto la imagen con las lineas que son muy gruesas y la barra Horizontal y vertical funcionando.
<!-- m --><a class="postlink" href="http://img713.imageshack.us/img713/8995/vistaok.png">http://img713.imageshack.us/img713/8995/vistaok.png</a><!-- m --> |
xbrowse con recurso se pierde la barra vertical y horizontal | ruben Dario,
No lo tengo muy claro, pero podrias intentar asignar un pen personalizado.
oBrw:hColPen := pencol
oBrw:hRowPen := penrow
pencol y penrow serian las definiciones tuyas. |
xbrowse custom myBrowse | I need to create a class associated with Xbrowse that does not collide with any future changes to xbrowse but I don't know how to do it, every time I have an update I have to rewrite everything I need, in particular I have to add some DATA and some Methods, modify a method of xbrowse (with ovverride) . I would like to create it so that I can use it in the future without modifying the original class of fwh |
xbrowse custom myBrowse | Look Here, It could help,
<!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41749&hilit=subclass&start=15#p250334">viewtopic.php?f=3&t=41749&hilit=subclass&start=15#p250334</a><!-- l --> |
xbrowse custom myBrowse | [quote="Marc Venken":3g3pwamj]Look Here, It could help,
<!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41749&hilit=subclass&start=15#p250334">viewtopic.php?f=3&t=41749&hilit=subclass&start=15#p250334</a><!-- l -->[/quote:3g3pwamj]
I made it now and it run ok but for one method I must use ovverride procedure because I must re-write a xbrowse method or on each upgrade I must add some lines ...
it is a small addition to the xbrowse class that the fwteam hasn't even taken into consideration, instead I consider it very useful in practice if we have 15 fields in the xbrowse table and we want to display only 4 of them initially for reasons that may also be of aesthetics, the end user however he could display the field he wants online and the configuration is saved in the state or the end user could display all the fields or put back the initial display made by the programmer. |
xbrowse datepick date | on my application until now I use a big calendar
[img:33heg82h]https://i.postimg.cc/zXF52PfG/date.png[/img:33heg82h]
I wish try with datepick of system
[code=fw:33heg82h]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oBrowse:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">7</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nEditType</span>:= EDIT_DATE<br /> :<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"dd-mmmm-yyyy"</span><br /> :<span style="color: #000000;">oEditGet</span>:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> dStagioneMin,dStagioneMax <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bOnChange</span> := bCalcRow<br /> END</div>[/code:33heg82h]
[b:33heg82h]why not run ?[/b:33heg82h] |
xbrowse dblclick | To All
If you use a previous version of xbrowse the on double click works in the checkon, checkoff column .. something has changed in 9.06 to ignore this behavoir ..
Rick |
xbrowse dblclick | To All
I have a FWH 9.04 version of an xbrowse that when you use on dblclick from xbrowse.. the mouse double click was trapped and ran _Recalc() .. in FWH 9.06 .. the xbrowse dblclick does not trapped .. and _Recalc() does not fire ..
Is there a fix or am I trapping the wrong codeblock .. what I want to happen is when the checkbox is 'double clicked' to trap that event and fire Recalc() .. which then updates the nTotal ..
What am I missing here ??
Rick Lipkin
[code=fw:13pzkyrt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"PCASIMPT"</span> ;<br /> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/W"</span> ;<br /> <span style="color: #0000ff;">TITLE</span> cTITLE ;<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLbx1 ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">of</span> oDlg1 ;<br /> RECORDSET oRsImport ;<br /> COLUMNS <span style="color: #ff0000;">'load_row'</span>, ;<br /> <span style="color: #ff0000;">'name'</span>, ;<br /> <span style="color: #ff0000;">'pcas_date'</span>, ;<br /> <span style="color: #ff0000;">'clinic'</span>, ;<br /> <span style="color: #ff0000;">'location'</span>, ;<br /> <span style="color: #ff0000;">'program'</span>, ;<br /> <span style="color: #ff0000;">'activity'</span>, ;<br /> <span style="color: #ff0000;">'starttime'</span>, ;<br /> <span style="color: #ff0000;">'endtime'</span>, ;<br /> <span style="color: #ff0000;">'hours'</span>, ;<br /> <span style="color: #ff0000;">'service_type'</span>, ;<br /> <span style="color: #ff0000;">'rectype'</span>, ;<br /> <span style="color: #ff0000;">'unitid'</span>, ;<br /> <span style="color: #ff0000;">'system'</span> ;<br /> COLSIZES <span style="color: #000000;">30</span>,<span style="color: #000000;">125</span>,<span style="color: #000000;">75</span>,<span style="color: #000000;">90</span>,<span style="color: #000000;">47</span>,<span style="color: #000000;">47</span>,<span style="color: #000000;">47</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">70</span> ;<br /> HEADERS <span style="color: #ff0000;">'Load_row'</span>, ;<br /> <span style="color: #ff0000;">'Name'</span>, ;<br /> <span style="color: #ff0000;">'Service Date'</span>, ;<br /> <span style="color: #ff0000;">'Clinic'</span>, ;<br /> <span style="color: #ff0000;">'Location'</span>, ;<br /> <span style="color: #ff0000;">'Program'</span>, ;<br /> <span style="color: #ff0000;">'Activity'</span>, ;<br /> <span style="color: #ff0000;">'Start'</span>, ;<br /> <span style="color: #ff0000;">'End '</span>, ;<br /> <span style="color: #ff0000;">'Hours'</span>, ;<br /> <span style="color: #ff0000;">'Service Type'</span>, ;<br /> <span style="color: #ff0000;">'Record Type'</span>, ;<br /> <span style="color: #ff0000;">'Unit Type'</span>, ;<br /> <span style="color: #ff0000;">'System'</span> ;<br /> <span style="color: #0000ff;">ON</span> dblclick<span style="color: #000000;">(</span> _Recalc<span style="color: #000000;">(</span>oRsImport, oLbx1<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ; <span style="color: #B900B9;">// <-- double click trap for browse refresh</span><br /> AUTOSORT <span style="color: #0000ff;">AUTOCOLS</span> FOOTERS LINES CELL<br /><br /> oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Hours"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">nTOTAL</span> := nHOURS<br /> oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Hours"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lTOTAL</span> := .t.<br /><br /> <span style="color: #00C800;">if</span> .not. Empty<span style="color: #000000;">(</span> oCol := oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Load_row"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CHECKON"</span>, <span style="color: #ff0000;">"CHECKOFF"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #00C800;">nil</span><br /> oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> <span style="color: #B900B9;">// oCol:lBmpStretch = .T.</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">of</span> oDLG1 ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> _Loadum<span style="color: #000000;">(</span> oRsImport, oDlg1, oBtn3, cMODE <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #00C800;">DEFAULT</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">118</span> <span style="color: #0000ff;">of</span> oDLG1 ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oDlg1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">(</span> oLbx1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//----------------------------</span><br /><span style="color: #00C800;">Static</span> Func _Recalc<span style="color: #000000;">(</span> oRsImport,oLbx1 <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> umb, SAYING<br /><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"In recalc"</span> <span style="color: #000000;">)</span><br /><br />nHOURS := <span style="color: #000000;">0</span><br />nMINUTES := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">IF</span> oRsImport:<span style="color: #000000;">RecordCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> umb := oRsImport:<span style="color: #000000;">BookMark</span><br /><br /> oRsImport:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .not. oRsImport:<span style="color: #000000;">eof</span><br /><br /> <span style="color: #00C800;">IF</span> oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"load_row"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> = .T.<br /> nHOURS := nHOURS+oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"hours"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> nMINUTES := nMINUTES+oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"minutes"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> <span style="color: #00C800;">ENDIF</span><br /> oRsImport:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> oRsImport:<span style="color: #000000;">BookMark</span> := umb<br /><br /> oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Hours"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">nTOTAL</span> := nHOURS<br /> oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Hours"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lTOTAL</span> := .t.<br /> oLbx1:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> SysReFresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">if</span> oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"process_flag"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> = <span style="color: #ff0000;">'Y'</span> .and. ;<br /> oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Load_row"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> = .T.<br /><br /> SAYING := <span style="color: #ff0000;">"WARNING .. this record was previously loaded on"</span>+chr<span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /> SAYING += <span style="color: #ff0000;">"Date "</span>+DTOC<span style="color: #000000;">(</span>oRsImport:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"date_processed"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">)</span>+chr<span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> SAYING <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">)</span><br /><br /><br /><br /> </div>[/code:13pzkyrt] |
xbrowse dblclick | Mr Rick
I tested with the following sample and the double click is working.
[code=fw:3lnlyrro]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw<br /><br /> use customer<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd<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;">'customer'</span> <span style="color: #0000ff;">autocols</span> ;<br /> <span style="color: #0000ff;">on</span> dblclick <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">'ok'</span> <span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:3lnlyrro]
Please try this sample. |
xbrowse dblclick | Rao
In previous builds .. the 'on dblclick' trapped the mouse for the Check on and Check off .. for some reason now .. if you double click in that column .. the double click is not trapped by "ON DOUBLECLICK"
[code=fw:3eb1kdbg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">if</span> .not. Empty<span style="color: #000000;">(</span> oCol := oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Load_row"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CHECKON"</span>, <span style="color: #ff0000;">"CHECKOFF"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #00C800;">nil</span><br /> oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> <span style="color: #B900B9;">// oCol:lBmpStretch = .T.</span><br /> <span style="color: #00C800;">endif</span><br /><br /> </div>[/code:3eb1kdbg]
I need to trap that event to fire the _Recalc()
Rick |
xbrowse dblclick | Mr Rick
Can you please try this modification ?
[code=fw:1hrglxgo]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> .not. Empty<span style="color: #000000;">(</span> oCol := oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Load_row"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CHECKON"</span>, <span style="color: #ff0000;">"CHECKOFF"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #00C800;">nil</span><br /> oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> oCol:<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> || _ReCalc<span style="color: #000000;">(</span> oRsImport, oLbx1 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// NEW LINE TO INSERT</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:1hrglxgo] |
xbrowse dblclick | Rao
That worked .. thank you !!
Rick |
xbrowse del mismo ancho que oWnd..? | Hola.
Quiero hacer un xbrowse que ocupe por cada columna el mismo ancho que la ventana (oWnd)
es para que al presionar las teclas de las flechas pase a la segunda columna y que la primero columna se
oculte... y asi sucesivametne.
o sea, que en la ventana que ve el usuario solo vea la columna actual y no todas las demas.
Como hago :
oBrw:aCols[1]:nWidth:= ?????
Gracias! |
xbrowse del mismo ancho que oWnd..? | Buen dia
oBrw:aCols[1]:nWidth:= oWnd:nWidth
Probaria asi.
Saludos. |
xbrowse del mismo ancho que oWnd..? | GRACIAS! |
xbrowse desaparece (Solucionado) | Buenos dias
Tengo una pantalla pincipal
[code=fw:38hacy6a]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> Publicas:<span style="color: #000000;">oWPpal</span>;<span style="color: #B900B9;">// FROM 1,5 TO 20,75;</span><br /> <span style="color: #0000ff;">TITLE</span> Publicas:<span style="color: #000000;">cTitulop</span>;<span style="color: #B900B9;">// MENU HazMenu(Publicas:oWPpal);</span><br /> <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">ICON</span> Publicas:<span style="color: #000000;">oIco</span>;<br /> <span style="color: #0000ff;">BRUSH</span> oBrush1<span style="color: #B900B9;">// COLOR CLR_BLACK,CLR_WHITE;</span><br /> Publicas:<span style="color: #000000;">oWPpal</span>:<span style="color: #000000;">oFont</span>:=oFont<br /> Publicas:<span style="color: #000000;">oWPpal</span>:<span style="color: #000000;">Setmenu</span><span style="color: #000000;">(</span>hazmenu<span style="color: #000000;">(</span>Publicas:<span style="color: #000000;">oWPpal</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">(</span><span style="color: #ff0000;">" (c) Jose Luis 2004 (V.03.08.22)"</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">OF</span> Publicas:<span style="color: #000000;">oWPpal</span><br /> <span style="color: #0000ff;">DEFINE</span> BITMAP oBmp File curdrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">":<span style="color: #000000;">\"</span>+curdir()+"</span>\BMPS\Logoacm.bmp<span style="color: #ff0000;">" OF Publicas:oWPpal<br /> Publicas:oWPpal:bPainted = { | hDC | If( oBmp != nil,; <br /> Drawtransparent( hDC,; <br /> oBmp:hBitmap,;<br /> Publicas:oWPpal:nHeight() / 2 - ; <br /> oBmp:nHeight() / 2 - 50,; <br /> Publicas:oWPpal:nWidth() / 2 - ; <br /> oBmp:nWidth() / 2),) } <br /><br />// Publicas:oWPpal:bPainted = { | hDC | If( oBmp != nil,; <br />// PalBmpDraw( hDC,; <br />// Publicas:oWPpal:nHeight() / 2 - ; <br />// oBmp:nHeight() / 2 - 50,; <br />// Publicas:oWPpal:nWidth() / 2 - ; <br />// oBmp:nWidth() / 2,; <br />// oBmp:hBitmap ),) } <br /><br /> ACTIVATE WINDOW Publicas:oWPpal MAXIMIZED;<br /> ON INIT (Inicio(Publicas:cTitulop),mibarra(),;<br /> Publicas:oWPpal:oMsgBar:ClockOn(),; //oClock:SetCheck(.T.),;<br /> Publicas:oWPpal:oMsgBar:DateOn(), ;//oDate:SetCheck(.T.),;<br /> Publicas:oWPpal:oMsgBar:KeybOn());//, oKeyB:SetCheck(.T.) );<br /> VALID Salir()<br /></span></div>[/code:38hacy6a]
Hasta aqui no hay ningun problema,
Ahora abro una ventana hija con una serie de botones
[code=fw:38hacy6a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">MDICHILD</span> ;<br /> <span style="color: #0000ff;">OF</span> Publicas:<span style="color: #000000;">oWPpal</span> ;<br /> <span style="color: #0000ff;">FROM</span> x1,y1 ;<br /> <span style="color: #0000ff;">TO</span> x2,y2 ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE;<br /> <span style="color: #0000ff;">PIXEL</span><br /><br />oDlg:<span style="color: #000000;">cTitle</span>:=cTitulo<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #000000;">2007</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ANADIR"</span> <span style="color: #0000ff;">OF</span> oBar NOBORDER <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Añadir"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>cTitulo:=<span style="color: #ff0000;">"Creación de nuevos Albaranes "</span>,;<br />.............................<br /><br />@ oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">45</span>, <span style="color: #000000;">0</span> TABS oTab ; <br /> <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"&Numero"</span>,<span style="color: #ff0000;">"&Fecha"</span>,<span style="color: #ff0000;">"&Cliente"</span>,<span style="color: #ff0000;">"&Nombre"</span>,<span style="color: #ff0000;">"&Rem"</span>,<span style="color: #ff0000;">"&factura"</span>,<span style="color: #ff0000;">"&Tipo"</span>,<span style="color: #ff0000;">"&conductor"</span>,<span style="color: #ff0000;">"&Orden"</span>,<span style="color: #ff0000;">"Reex&p"</span>,<span style="color: #ff0000;">"&Spro"</span>,<span style="color: #ff0000;">"&Importe"</span>,<span style="color: #ff0000;">"&Duplicado"</span>,<span style="color: #ff0000;">"&Kilos"</span>;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>Ordsetfocus<span style="color: #000000;">(</span>cambia<span style="color: #000000;">(</span>oTab:<span style="color: #000000;">nOption</span>,aAlias<span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">oBottom</span>:=oTab<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">MAXIMIZED</span> <br /> </div>[/code:38hacy6a]
Y tambien funciona bien, se ven los botones etc.
Pero quiero mostrar en el hueco de esta ventana hija un XBROWSE y ahi viene el problema.
[code=fw:38hacy6a]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xbrowse</span> oLbx <span style="color: #0000ff;">Alias</span> aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span> ;<br /> COLUMNS <span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"Albaran"</span>,<span style="color: #ff0000;">"Fecha"</span>,<span style="color: #ff0000;">"Pro"</span>,<span style="color: #ff0000;">"Pobla"</span>,<span style="color: #ff0000;">"Cr"</span>,<span style="color: #ff0000;">"Prou"</span>,<span style="color: #ff0000;">"Pobla1"</span> ,<span style="color: #ff0000;">"Baseimpo"</span>,<span style="color: #ff0000;">"kkilos"</span>,<span style="color: #ff0000;">"Kilos"</span>,<span style="color: #ff0000;">"Factura"</span>,<span style="color: #ff0000;">"Codart"</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"Orden"</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"nConductor"</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">"n_Reexp"</span>,<span style="color: #ff0000;">"Spro"</span>,<span style="color: #ff0000;">"Graba"</span>,<span style="color: #ff0000;">"Operador"</span>,<span style="color: #ff0000;">"c_alm"</span>,<span style="color: #ff0000;">"Datos"</span>;<br /> HEADERS <span style="color: #ff0000;">"F"</span>,<span style="color: #ff0000;">" Numero "</span>, <span style="color: #ff0000;">" Fecha "</span>, <span style="color: #ff0000;">" Cliente "</span>, <span style="color: #ff0000;">"Pobla"</span>, <span style="color: #ff0000;">"T"</span>,<span style="color: #ff0000;">"Origen/Destino"</span>, <span style="color: #ff0000;">"Pobla"</span>, <span style="color: #ff0000;">" Importe "</span>, <span style="color: #ff0000;">" Bult. "</span>, <span style="color: #ff0000;">" Kilos "</span>,<span style="color: #ff0000;">" Factura "</span>,<span style="color: #ff0000;">" Tarifa "</span>,<span style="color: #ff0000;">"Tipo"</span>,<span style="color: #ff0000;">"Orden"</span>,<span style="color: #ff0000;">"In"</span> ,<span style="color: #ff0000;">"EG"</span>,<span style="color: #ff0000;">" Conductor "</span> ,<span style="color: #ff0000;">" Ig "</span>,<span style="color: #ff0000;">"Reexpedido"</span>, <span style="color: #ff0000;">"SPro"</span>,<span style="color: #ff0000;">"Fhora"</span>,<span style="color: #ff0000;">" Operador "</span>, <span style="color: #ff0000;">"Alm"</span>, <span style="color: #ff0000;">"Alm Fact."</span>;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">LEFT</span> DBLCLICK <span style="color: #000000;">(</span>iif<span style="color: #000000;">(</span>!<span style="color: #000000;">(</span>aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> .and. Publicas:<span style="color: #000000;">cAccesoM</span>,<span style="color: #000000;">(</span>cTitulo:=<span style="color: #ff0000;">"Visualización de Albaranes "</span>,Entalba1<span style="color: #000000;">(</span>cTitulo,<span style="color: #ff0000;">"V"</span>,,aAlias<span style="color: #000000;">)</span>,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,.T.<span style="color: #000000;">)</span><span style="color: #000000;">)</span>;<br /> LINES CELL NOBORDER <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-30</span> <span style="color: #0000ff;">PIXEL</span><br /> oLbx:<span style="color: #000000;">lFastEdit</span> := .t.<br /><br />............<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">MAXIMIZED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">nWidth</span>:=oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-10</span>, ;<br /> oLbx:<span style="color: #000000;">nHeight</span>:=oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-95</span>, ;<br /> oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>Dbclosearea<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,Dbcloseall<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,.t. <span style="color: #000000;">)</span><br /><br /> </div>[/code:38hacy6a]
Se muestra en blanco el xbrowse, es decir sin datos.
Durante menos de un segundo se ve bien el xbrowse, pero al maximizarse, se ocultan los datos
[url=https://flic.kr/p/2nErZwN:38hacy6a][img:38hacy6a]https://live.staticflickr.com/65535/52287282854_610b52b0bd.jpg[/img:38hacy6a][/url:38hacy6a]
Y si quito MAXIMIZED y ademas quito ON RESIZE aparecen los datos
[url=https://www.flickr.com/gp/sotadeoros/T869nq1e08:38hacy6a][img:38hacy6a]https://live.staticflickr.com/65535/52287283834_ec18ca7e1c.jpg[/img:38hacy6a][/url:38hacy6a]
Estoy un poquito desconcetado, ya que para otras opaciones del programa, así me funciona perfectamente, pero hay algo que se me escapa.
He de añadir que todo esto es porque quiero migrar de TWBROWSE A XBROWSE, ya que en TWBROWSE funciona perfectamente |
xbrowse desaparece (Solucionado) | Lo que no veo en la definición del XBROWSE es la claúsula OF <oParent> para indicarle en qué "contenedor" se ha de situar. |
xbrowse desaparece (Solucionado) | Ah, si, debe haber sido debido a la cantidad de veces que he hecho probaturas, pero la linea que tengo es
[code=fw:1rwb20dn]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xbrowse</span> oLbx <span style="color: #0000ff;">Alias</span> aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /><br />......<br /> </div>[/code:1rwb20dn]
pero me hace lo mismo
Gracias por contestar |
xbrowse desaparece (Solucionado) | Te lo decía porque me ha parecido ver que tienes definidos un TTAB con todo el alto del diálogo por lo que quizás el xbrowse quede por encima de los TTAB |
xbrowse desaparece (Solucionado) | Si, efectivamente tengo una barra de tabs,
[code=fw:n77gntn9]<div class="fw" id="{CB}" style="font-family: monospace;">@ oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">45</span>, <span style="color: #000000;">0</span> TABS oTab ; <br /> <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"&Numero"</span>,<span style="color: #ff0000;">"&Fecha"</span>,<span style="color: #ff0000;">"&Cliente"</span>,<span style="color: #ff0000;">"&Nombre"</span>,<span style="color: #ff0000;">"&Rem"</span>,<span style="color: #ff0000;">"&factura"</span>,<span style="color: #ff0000;">"&Tipo"</span>,<span style="color: #ff0000;">"&conductor"</span>,<span style="color: #ff0000;">"&Orden"</span>,<span style="color: #ff0000;">"Reex&p"</span>,<span style="color: #ff0000;">"&Spro"</span>,<span style="color: #ff0000;">"&Importe"</span>,<span style="color: #ff0000;">"&Duplicado"</span>,<span style="color: #ff0000;">"&Kilos"</span>;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>aAlias<span style="color: #000000;">[</span><span style="color: #000000;">24</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>Ordsetfocus<span style="color: #000000;">(</span>cambia<span style="color: #000000;">(</span>oTab:<span style="color: #000000;">nOption</span>,aAlias<span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">oBottom</span>:=oTab</div>[/code:n77gntn9]
La tengo dimensionada en -45
Cuando hago el redimensionamiento del xbrowse,
[code=fw:n77gntn9]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">nWidth</span>:=oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-10</span>, ;<br /> oLbx:<span style="color: #000000;">nHeight</span>:=oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-95</span>, ;<br /> oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> </div>[/code:n77gntn9]
Deberia valer, pero no funciona, se ve todo el browse en blanco |
xbrowse desaparece (Solucionado) | Prueba con oDlg:oBottom = oTab |
xbrowse desaparece (Solucionado) | Gracias Antonio por responder
Ya lo tenía puesto y sigue igual.
Los curioso que me he dado cuenta ha sido que si hago clic en cualquier tabs sigue igual, pero si lo hago en el ultimo tabs, carga perfectamente el browse y ya aunque pulse cualquier tabs, funciona perfectamente.
Pongo un video y se entenderá mejor
[url=https://www.flickr.com/gp/sotadeoros/530sA6v4MW:30lmcpdp][img:30lmcpdp]https://combo.staticflickr.com/pw/images/es-us/video-processing/z.png[/img:30lmcpdp][/url:30lmcpdp] |
xbrowse desaparece (Solucionado) | Estimado Jose Luis,
Puedes proporcionarnos el EXE ó un PRG completo pequeño en el que se reproduzca el efecto ?
muchas gracias |
xbrowse desaparece (Solucionado) | Jose Luis,
Visto el video y visto el efecto
Cuando creas el browse usas estas medidas:
LINES CELL NOBORDER SIZE -10,-30 PIXEL
Por qué le das valores negativos ahi ? Prueba a usar 300, 200 ó asi |
xbrowse desaparece (Solucionado) | Muchas gracias Antonio,
Por ahí iban los tiros, lo he conseguido gracias a tu ayuda.
He quitado la clausula SIZE del xbrowse, ( que la tenia de otros fuentes), y además he quitado el ON REZISE cuando activo la ventana, ya que le pongo MAXIMIZED y funciona todo correctamente. |
xbrowse display | Hello
While inputing dbf data with a xbrowse, during the first few lines only the last line is shown after obrw:refresh() obrw:paint() or any other method, When the total number of rows is >4 or 5 the whole screen is displayed.
In other browses, the method upstable corrected this behaviour, is there any workaround with xbrowse ? or maybe i am missing something.
Thanks for the help,
Richard |
xbrowse display | try
oBrw:refresh(.T.)
regards |
xbrowse display | Thanks for the suggestion but it does not fix the display. Same result,
Richard |
xbrowse display | Richard:
Perhaps, oBrw:UpStable()
Regards |
xbrowse display | Armando
UpStable() method is not available for xbrowse, i tried to adapt from wbrowse but without success yet, still working on it,
Regards
Richard |
xbrowse display | Just to keep updated on this issue, i found a solution
Adding after each append
obrw:gobottom() // this is making the difference
obrw:Refresh()
The painting is ok while appending records,
HTH
Richard |
xbrowse display | Richard,
Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xbrowse divider line lRecordSelector | how to paint the lines in black ?
[url=https://postimg.cc/p9pYxwhB:3fk18e6o][img:3fk18e6o]https://i.postimg.cc/p9pYxwhB/Sem-t-tulo.png[/img:3fk18e6o][/url:3fk18e6o] |
xbrowse divider line lRecordSelector | Please try
[code=fw:3vpj88u7]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">hBtnShadowPen</span> := CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, CLR_BLACK <span style="color: #000000;">)</span></div>[/code:3vpj88u7] |
xbrowse divider line lRecordSelector | fantastic, congratulations !!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xbrowse don't show datas | Hello all,
xBrowse dont show any data.
What i do wrong?
oArqPrev:SetOrder("CODIGO")
oArqPrev:GoTop()
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:CreateFromResource( 4001 )
oCol := oBrw:AddCol()
oCol:bStrData := { || ARQPREV->CODIGO}
oCol:cHeader := "CÓDIGO"
oCol := oBrw:AddCol()
oCol:bStrData := { || DTOC(ARQPREV->DATALAN)}
oCol:cHeader := "DT.LAN."
oCol := oBrw:AddCol()
oCol:bStrData := { || ARQPREV->DESCON}
oCol:cHeader := "CONTA"
oCol := oBrw:AddCol()
oCol:bStrData := { || Substr(ARQPREV->NOMEFOR,1,28)}
oCol:cHeader := "FORNECEDOR"
oCol := oBrw:AddCol()
oCol:bStrData := { || DTOC(ARQPREV->VENCIMENTO)}
oCol:cHeader := "VENCTO"
oCol := oBrw:AddCol()
oCol:bStrData := { || Tran(ARQPREV->VALOR,"@e 999,999.99")}
oCol:cHeader := "VALOR"
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:l2007:=.t.
oBrw:bChange := { || oRadio1:Refresh(), oBrw:Refresh() }
oBrw:SetRdd()
Shows me blank.
thanks in advance. |
xbrowse don't show datas | I found
I have to do sele arqprev and go top to show records.
How i can know in multiselect xbrowse if a record marked or not?
thanks in advance. |
xbrowse don't show datas | oBrw:aSelected
Regards
Anser |
xbrowse don't show datas | Hi Anser, obrw:aSelected give me array with numbers, this numbers is a recno() of file?
I use oBrw:bKeyDown := {|nKey| Seleg(nkey)} but if i press Shift+key down the browse select the items but dont process the function Seleg() how i can do this?
Thank you so much.
Wanderson. |
xbrowse don't show datas | Dear Mr.Wanderson.
oBrw:aSelected is an Array of RecNo()'s (Single dimensional)
Use the below given Marquee style for multi select xBrowse
[code=fw:zxzsyg72]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROWMS</div>[/code:zxzsyg72]
You may further process oBrw:aSelected array as per your requirement
[code=fw:zxzsyg72]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bKeyDown</span>:= <span style="color: #000000;">{</span>| k | <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> k == VK_DELETE, <span style="color: #000000;">(</span> DeleteRow<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">Function</span> DeleteRow<span style="color: #000000;">(</span>oBrw<span style="color: #000000;">)</span><br />..<br /> <span style="color: #00C800;">For</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /><br /> ...<br /><br /> <span style="color: #00C800;">Next</span><br />..<br /><br /><span style="color: #00C800;">Return</span><br /> </div>[/code:zxzsyg72]
Regards
Anser |
xbrowse drag & drop archivos | Hola.
Estoy intentando que un xbrowser me acepte que le suelte un archivo para extraerle el nombre pero no me funciona. hay algun ejemplo?
gracias |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.