topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xBrowse - change columns dynamically | Otto,
The simplest thing to do is just define two browses both using the same DBF but opened twice. Then you can hide() one and show() the other. Since you have the DBF open in two workareas you don't have to worry about pointers, filters, sort orders, etc.
James |
xBrowse - change columns dynamically | Otto
Other option is show or hide column |
xBrowse - change columns dynamically | Mr. Otto
As Mr. Daniel advised Hide and show columns is one simple way if the change is simple.
Another way to dynamically change the view is by using the method ReArrangeCols( aCols, lRetainRest )
To show 'First', 'Last', 'City'
oBrw:ReArrangeCols( { "First", "Last", "City" }, .t. )
To switch to show 'First', 'Age', 'HireDate'
oBrw:ReArrangecols( { "First", "Age", "HireDate" }, .t. ) |
xBrowse - 1ra. y última filas pintadas | Hola.
¿Cómo averiguo cuáles son la primera y la última filas pintadas en un xBrowse?
Me gustaría, por ejemplo, poder escribir el mensaje: [b:hizodmfk]Mostrando resultados 7 al 29 de un total de 50[/b:hizodmfk]
y que éste se actualizara al navergar por el xbrowse.
Por supuesto, no deseo agregar una nueva columna mostrando ::bKeyNo
Gracias.
¡Salud y saludos! |
xBrowse - 1ra. y última filas pintadas | nFirstKeyNo := oBrw:KeyNo() - oBrw:nRowSel + 1
nLastKeyNo := nFirstKeyNo + oBrw:RowCount() - 1
In case of RDD, nFirstKeyNo and nLastKeyNo are the OrdKeyNo() of the first and last records displayed.
In case of Array, nFirstKeyNo and nLastKeyNo are the first and last array elements displayed. In case of RecoreSet they are AbsolutePostion of the first and last rows. |
xBrowse - 1ra. y última filas pintadas | Thank you very much, Mr. N.
Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).
Regards.
César Lozada |
xBrowse - 1ra. y última filas pintadas | [quote="César E. Lozada":1z2b33yc]Thank you very much, Mr. N.
Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).
Regards.
César Lozada[/quote:1z2b33yc]
Please reconsider. There will be hundreds of such requirements for various purposes. Should we keep modifying the main class for each such requirement? Will there be ever an end for it? Can we not make do with functions?
What makes a good case for modifying a class is when the class itself has to know these datas or methods for its own working.
Just my personal opinion. |
xBrowse - ADO - SetMultiSelectCol - lAutosort | Ciao RAO
I have an xbrowse with SetMultiSelectCol and lAutosort (as example) .
If the customer selects columns and then changes the oRs order (since SetMultiSelectCol works with oRs: AbsolutePosition)
the result of the selected columns is wrong .
I think SetMultiSelectCol should work on the table ID .
[code=fw:3d1kykwr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oFixed, oGet, oBrw<br /> <span style="color: #00C800;">local</span> oCn, oRs, cSql,oBtn<br /><br /> SetGetColorFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> TMultiGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lClrFocus</span> := .t.<br /> SET DATE ITALIAN<br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /><br /> FW_SetUnicode<span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /> oCn := FW_DemoDB<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oCn := maria_Connect<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #B900B9;">//cSql := "SELECT Now()"</span><br /> oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"select * from clients"</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">//oRs := oCn:RowSet( cSql )</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFixed <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"LUCIDA CONSOLE"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-18</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;">900</span>,<span style="color: #000000;">700</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> FWVERSION + <span style="color: #ff0000;">" : MySQLR"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"List aselect "</span><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">ACTION</span> Listselect<span style="color: #000000;">(</span>oBrw,oRs<span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">80</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"End"</span><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> <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 /><br /> @ <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg DATASOURCE oRs ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FOOTERS FASTEDIT <br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">bRecSelHeader</span> := <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"RecNo"</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bRecSelData</span> := <span style="color: #000000;">{</span> |o| o:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nRecSelWidth</span> := <span style="color: #ff0000;">"99999"</span><br /> :<span style="color: #000000;">lAutosort</span> := .T. <br /> <br /> :<span style="color: #000000;">SetMultiSelectCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oFixed<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> Listselect<span style="color: #000000;">(</span>oBrw,oRs<span style="color: #000000;">)</span> <br /><span style="color: #00C800;">Local</span> i <br /> <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /> oRs:<span style="color: #000000;">AbsolutePosition</span> := oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><br /> <br /> ? oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ID"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> <br /> <span style="color: #00C800;">NEXT</span><br /> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:3d1kykwr]
Maurizio |
xBrowse - ADO - SetMultiSelectCol - lAutosort | [quote:1kh8lgsl]If the customer selects columns and then changes the oRs order (since SetMultiSelectCol works with oRs: AbsolutePosition)
[/quote:1kh8lgsl]
NO.
oBrw:aSelected is NOT an array of oRs:AbsolutePositions.
It is an array of oRs:BookMarks
BookMark of a RecordSet is like RECNO() of DBF. Does not change with sorting.
AbsolutePosition of a RecordSet is like OrdKeyNo() of DBF, which changes when sorted.
So, you are safe even when sorting. |
xBrowse - ADO - SetMultiSelectCol - lAutosort | Thanks Rao
The correct code is:
[code=fw:2y5iswyb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oFixed, oGet, oBrw<br /> <span style="color: #00C800;">local</span> oCn, oRs, cSql,oBtn<br /><br /> SetGetColorFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> TMultiGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lClrFocus</span> := .t.<br /> SET DATE ITALIAN<br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /><br /> FW_SetUnicode<span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /> oCn := FW_DemoDB<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oCn := maria_Connect<span style="color: #000000;">(</span> cParam <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #B900B9;">//cSql := "SELECT Now()"</span><br /> oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"select * from clients"</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">//oRs := oCn:RowSet( cSql )</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFixed <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"LUCIDA CONSOLE"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-18</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;">900</span>,<span style="color: #000000;">700</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> FWVERSION + <span style="color: #ff0000;">" : MySQLR"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"List aselect "</span><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">ACTION</span> Listselect<span style="color: #000000;">(</span>oBrw,oRs<span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">80</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"End"</span><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> <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 /><br /> @ <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg DATASOURCE oRs ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FOOTERS FASTEDIT <br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">bRecSelHeader</span> := <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"RecNo"</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bRecSelData</span> := <span style="color: #000000;">{</span> |o| o:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nRecSelWidth</span> := <span style="color: #ff0000;">"99999"</span><br /> :<span style="color: #000000;">lAutosort</span> := .T. <br /> <br /> :<span style="color: #000000;">SetMultiSelectCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oFixed<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> Listselect<span style="color: #000000;">(</span>oBrw,oRs<span style="color: #000000;">)</span> <br /><span style="color: #00C800;">Local</span> i <br /> <span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// oRs:AbsolutePosition := oBrw:aSelected[i]</span><br /> oRs:<span style="color: #000000;">BookMark</span> :=oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><br /> <br /> ? oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ID"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> <br /> <span style="color: #00C800;">NEXT</span><br /> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:2y5iswyb] |
xBrowse - ADO - SetMultiSelectCol - lAutosort | Maurizio, gracias por publicar el código, funciona de maravilla <!-- 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 - Add Array | Hi All,
I have a problem with xBrowse and array,
if I want to add record ( array ) in a xbrowse in the same times,
but the result is a blank record.....??
my code like this:
[code=fw:280ox8tl]<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 />func main<br /> <span style="color: #00C800;">local</span> oDlg<br /><br /> <span style="color: #00C800;">local</span> nWidth := GetSysMetrics<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nHeight := GetSysMetrics<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nLeft<br /> <span style="color: #00C800;">local</span> oBrw, aData := <span style="color: #000000;">{</span><span style="color: #000000;">{</span><span style="color: #ff0000;">""</span>,ctod<span style="color: #000000;">(</span><span style="color: #ff0000;">"00-00-0000"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">local</span> oHeadfont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Segoe UI Light"</span>,,<span style="color: #000000;">-32</span>, .F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDatafont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Segoe UI Light"</span>,,<span style="color: #000000;">-14</span>, .F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /><br /> fwNumFormat<span style="color: #000000;">(</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">)</span><br /><br /> nLeft := nWidth/<span style="color: #000000;">7</span>/<span style="color: #000000;">2.05</span><br /> nHeight := <span style="color: #000000;">(</span><span style="color: #000000;">(</span><span style="color: #000000;">(</span>nHeight - <span style="color: #000000;">100</span><span style="color: #000000;">)</span>/ <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// - 20</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">-6</span> ;<br /> <span style="color: #0000ff;">TO</span> nHeight<span style="color: #000000;">+200</span>, nWidth + <span style="color: #000000;">6</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_CYAN ;<br /> <span style="color: #0000ff;">FONT</span> odatafont<br /><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">(</span>nWidth/<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">-100</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Test Import"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">32</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">font</span> oHeadfont <span style="color: #0000ff;">color</span> CLR_WHITE, CLR_CYAN<br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"&Import"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">font</span> odatafont <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">center</span> <span style="color: #000000;">2007</span> noborder ;<br /> <span style="color: #0000ff;">action</span> <span style="color: #000000;">(</span> aData := do_import_array<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">aArrayData</span> := aData, ;<br /> oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// oBrw:SetArray( aData ) )</span><br /><br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw ARRAY aData <span style="color: #0000ff;">OF</span> oDlg ;<br /> FIELDS oBrw:<span style="color: #000000;">aRow</span>:<span style="color: #000000;">cNo</span>, oBrw:<span style="color: #000000;">aRow</span>:<span style="color: #000000;">dDate</span>, oBrw:<span style="color: #000000;">aRow</span>:<span style="color: #000000;">nRow</span>, oBrw:<span style="color: #000000;">aRow</span>:<span style="color: #000000;">cDesc</span> ;<br /> HEADERS <span style="color: #ff0000;">"No"</span>,<span style="color: #ff0000;">"Date"</span>,<span style="color: #ff0000;">"Row"</span>,<span style="color: #ff0000;">"Desc."</span> ;<br /> COLSIZES <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">500</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">230</span> ;<br /> CELL LINES NOBORDER<br /><br /> oBrw:<span style="color: #000000;">lHScroll</span> = .T.<br /> oBrw:<span style="color: #000000;">lVScroll</span> = .T.<br /> oBrw:<span style="color: #000000;">lRecordSelector</span> = .F.<br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg<br /><br /> odatafont:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oheadfont:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> .F.<br /><br /><span style="color: #00C800;">static</span> func do_import_array<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> i := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">5</span><br /> aadd<span style="color: #000000;">(</span> aData, <span style="color: #000000;">{</span> str<span style="color: #000000;">(</span>i,<span style="color: #000000;">5</span><span style="color: #000000;">)</span>, dtoc<span style="color: #000000;">(</span> date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, i + <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"test i + 100"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span> i<br /><br /> <span style="color: #00C800;">return</span> aData<br /> </div>[/code:280ox8tl]
someone can help me..?
Mulyadi. |
xBrowse - Add Array | saludos intenta cambiando aData := {{"",ctod("00-00-0000"),0,""}}, por
aData := {"",ctod("00-00-0000"),0,""}
fijate que lo defines de una forma, y luego grabas de otra, bueno, creo ese es el detalle, intenta a ver...
aadd( aData, { str(i,5), dtoc( date() + 1 ), i + 100, "test i + 100" } )
saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse - Add Array | Hi
Thanks for reply,
but I have Array in 2 dimensions.
any one can help me...?
Mulyadi |
xBrowse - Add Array | Dear Mulyadi,
try this ,
[code=fw:3ae74nl8]<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 />func main<br /> <span style="color: #00C800;">local</span> oDlg<br /><br /> <span style="color: #00C800;">local</span> nWidth := GetSysMetrics<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nHeight := GetSysMetrics<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nLeft<br /> <span style="color: #00C800;">local</span> oBrw, aData := <span style="color: #000000;">{</span><span style="color: #000000;">{</span><span style="color: #ff0000;">""</span>,ctod<span style="color: #000000;">(</span><span style="color: #ff0000;">"00-00-0000"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">local</span> oHeadfont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Segoe UI Light"</span>,,<span style="color: #000000;">-32</span>, .F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDatafont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Segoe UI Light"</span>,,<span style="color: #000000;">-14</span>, .F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /><br /> fwNumFormat<span style="color: #000000;">(</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">)</span><br /><br /> nLeft := nWidth/<span style="color: #000000;">7</span>/<span style="color: #000000;">2.05</span><br /> nHeight := <span style="color: #000000;">(</span><span style="color: #000000;">(</span><span style="color: #000000;">(</span>nHeight - <span style="color: #000000;">100</span><span style="color: #000000;">)</span>/ <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// - 20</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">-6</span> ;<br /> <span style="color: #0000ff;">TO</span> nHeight<span style="color: #000000;">+200</span>, nWidth + <span style="color: #000000;">6</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_CYAN ;<br /> <span style="color: #0000ff;">FONT</span> odatafont<br /><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">(</span>nWidth/<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">-100</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Test Import"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">32</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">font</span> oHeadfont <span style="color: #0000ff;">color</span> CLR_WHITE, CLR_CYAN<br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"&Import"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">font</span> odatafont <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">center</span> <span style="color: #000000;">2007</span> noborder ;<br /> <span style="color: #0000ff;">action</span> <span style="color: #000000;">(</span> aData := do_import_array<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">aArrayData</span> := aData, ;<br /> oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// oBrw:SetArray( aData ) )</span><br /><br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw ARRAY aData <span style="color: #0000ff;">OF</span> oDlg ;<br /> HEADERS <span style="color: #ff0000;">"No"</span>,<span style="color: #ff0000;">"Date"</span>,<span style="color: #ff0000;">"Row"</span>,<span style="color: #ff0000;">"Desc."</span> ;<br /> COLSIZES <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">500</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">230</span> ;<br /> CELL LINES NOBORDER ;<br /> <span style="color: #0000ff;">AUTOCOLS</span><br /> <br /><br /> oBrw:<span style="color: #000000;">lHScroll</span> = .T.<br /> oBrw:<span style="color: #000000;">lVScroll</span> = .T.<br /> oBrw:<span style="color: #000000;">lRecordSelector</span> = .F.<br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg<br /><br /> odatafont:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oheadfont:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> .F.<br /><br /><span style="color: #00C800;">static</span> func do_import_array<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> i := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">5</span><br /> aadd<span style="color: #000000;">(</span> aData, <span style="color: #000000;">{</span> str<span style="color: #000000;">(</span>i,<span style="color: #000000;">5</span><span style="color: #000000;">)</span>, dtoc<span style="color: #000000;">(</span> date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, i + <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"test i + 100"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span> i<br /><br /><span style="color: #00C800;">return</span> aData</div>[/code:3ae74nl8]
regards,
kok |
xBrowse - Add Array | Hallo joek hoa... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Thanks for reply
the result is wrong, all record to display just in 1 colums..
if I define array at the top the result is okay.. but i want to create dinamic xbrowse with array..
Any idea...?
Mulyadi. |
xBrowse - Add Array | Hi Mulyadi,
you must put AUTOCOLS.
here everything ok.
regards,
Kok |
xBrowse - Add Array | Hi Mulyadi,
compile using fivewin version 12.07 + bcc63
[url:37zzdxrg]http://dl.dropbox.com/u/55109320/pic.jpg[/url:37zzdxrg]
regards,
kok |
xBrowse - Add Array | Oke. Thanks Kok Joek Hoa
now I using old version 11.12, xHarbour 121 rev 6406.
and If I compile with version 6.12, the result is okay. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
or have a bugs in my library...
maybe I must be using a trick like: save and retrieve from RecordSet.
Mulyadi. |
xBrowse - Ayuda para ordenar | Buenas noches,
Por más que le doy vueltas no consigo lograrlo.
Tengo un browse de oDbf en el cual, al pulsar sobre los heads ordeno por esa columna. Hasta ahí todo bién.
La cuestión es que necesito buscar por dos campos indexados y lo hago así:
[code=fw:3hjjn98d]<div class="fw" id="{CB}" style="font-family: monospace;"> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span>,<span style="color: #ff0000;">"SERVICE.CDX"</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ordeno por CODIGO</span><br /> oDbf:<span style="color: #000000;">seek</span><span style="color: #000000;">(</span>cParte,.t.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oDbf:<span style="color: #000000;">found</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />* oBrw:<span style="color: #000000;">nColSel</span>:=<span style="color: #000000;">3</span><br /> oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span> .t.<br /> <span style="color: #00C800;">endif</span><br /><br /><br /> oDbf:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span><span style="color: #000000;">7</span>,<span style="color: #ff0000;">"SERVICE.CDX"</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ordeno por NOMBRE</span><br /> oDbf:<span style="color: #000000;">seek</span><span style="color: #000000;">(</span>cParte,.t.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oDbf:<span style="color: #000000;">found</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />* oBrw:<span style="color: #000000;">nColSel</span>:=<span style="color: #000000;">3</span><br /> oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span> .t.<br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:3hjjn98d]
La cuestión es que me interesaría que al volver al browse, luego de encontrar lo buscado con seek, me ordenara el browse por la columna correspondiente al índice en el que se busco, es decir como si al encontrar buscando por la clave "NOMBRE", al volver al browse yo pulsara con el ratón sobre el header de "NOMBRE".
Lo que necesito saber se resume a esto: ¿Como hago para, desde código" hacer que "SE pulse" el header que yo quiera y ordene el browse por la columna de este header.
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Ayuda para ordenar | Hola amigo, prueba lo siguiente:
oBrow:aCols[ nCol ]:cSortOrder :="NomTAG"
Ejemplo:
[code=fw:28osj1cp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrow:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cSortOrder</span> :=<span style="color: #ff0000;">"PROVEED1"</span><br /> </div>[/code:28osj1cp]
Espero te sirva. |
xBrowse - Ayuda para ordenar | Gracias por responder,
Creo que no entendiste lo que necesito hacer.
La línea asignando el orden a cada columna las defino cuando hago el "add" de cada columna del browse y no es el problema.
La cuestión es, vamos a suponer que el operador presiona el izquierdo del mouse sobre el header de la coumna dos, así queda ordenado el browse por esa columna, si presiona sobre la tres, queda ordenado por la tres, etc.
Ahora bién, en mi sistema, tengo un botón "Buscar" el que luego de hacer un get para entrar el dato a buscar, realiza un seek en tres indices distintos (obviamente de a uno por vez). Por ej, busca primero por el indice que afecta a la columna 1 y si no encuentra el dato, busca por el indice que afecta a la columna 2 y, si no encuentra nada ahí, busca por el indice que afecta a la columna 3.
Dependiendo de en cual columna encontró el dato buscado, me interesaría que además de ordenar los datos por el índice correspondiente (cosa que se hacer), LA COLUMNA QUE SE CORRESPONDE CON EL INDICE EN EL QUE SE ENCONTRÓ EL DATO QUEDE CON SU HEADER TENIENDO LA FLECHITA QUE INDICA QUE ESTÁ ODENADO POR ESA COLUMNA, es decir, como si presionara el botón izquierdo del mouse sobre el header de esa columna.
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Ayuda para ordenar | Rolando, prueba con esto
En tu Xbrowse define tus columnas asi:
[code=fw:14kwey86]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oCol := oBrw:<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> || LCV->FACTURA<span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"FACTURA"</span><br /> oCol:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">59</span><br /> oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cSortOrder</span>:= ORDTAG1 <span style="color: #B900B9;">//El nombre del TAG de tu indice</span><br /> oCol:<span style="color: #000000;">bLClickHeader</span>:= <span style="color: #000000;">{</span>|| Inicio<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oCol := oBrw:<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> || LCV->CLIENTE <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"N O M B R E"</span><br /> oCol:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">208</span><br /> oCol:<span style="color: #000000;">cSortOrder</span>:= ORDTAG2<br /> oCol:<span style="color: #000000;">bLClickHeader</span>:= <span style="color: #000000;">{</span>|| Inicio<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br />*Activar el pulsado de teclas dentro del <span style="color: #0000ff;">xBrowse</span><br /> @<span style="color: #000000;">1</span>,<span style="color: #000000;">80</span> <span style="color: #0000ff;">GET</span> oVar1 <span style="color: #0000ff;">VAR</span> xClave <span style="color: #0000ff;">OF</span> oDlg READONLY <span style="color: #B900B9;">//TE MOSTRARA LAS TECLAS QUE SE VAN PULSANDO</span><br /><br /> oBrw:<span style="color: #000000;">bKeyDown</span>:=<span style="color: #000000;">{</span>|nKey| iif<span style="color: #000000;">(</span> nKey >=<span style="color: #000000;">96</span> .AND. nKey <=<span style="color: #000000;">105</span>, nKey-= <span style="color: #000000;">48</span>, <span style="color: #000000;">)</span>, iif<span style="color: #000000;">(</span> nKey == VK_ESCAPE , <span style="color: #000000;">(</span>oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #00C800;">Nil</span> <span style="color: #000000;">)</span>, ;<br /> iif<span style="color: #000000;">(</span> nKey == VK_BACK , <span style="color: #000000;">(</span> xClave:= <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span> xClave,<span style="color: #000000;">1</span>,LEN<span style="color: #000000;">(</span> xClave <span style="color: #000000;">)</span><span style="color: #000000;">-1</span> <span style="color: #000000;">)</span>, iif<span style="color: #000000;">(</span>EMPTY<span style="color: #000000;">(</span>xClave<span style="color: #000000;">)</span>,oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,dBSeek<span style="color: #000000;">(</span> xClave <span style="color: #000000;">)</span><span style="color: #000000;">)</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oVar1:<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>, ;<br /> iif<span style="color: #000000;">(</span> nKey>=<span style="color: #000000;">32</span> .AND. nKey<=<span style="color: #000000;">128</span>, <span style="color: #000000;">(</span> dBSeek<span style="color: #000000;">(</span> xClave+UPPER<span style="color: #000000;">(</span>CHR<span style="color: #000000;">(</span>nKey<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,iif<span style="color: #000000;">(</span> !EOF<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, xClave+=UPPER<span style="color: #000000;">(</span>CHR<span style="color: #000000;">(</span>nKey<span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #000000;">)</span>,dBSeek<span style="color: #000000;">(</span>xClave<span style="color: #000000;">)</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oVar1:<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 />*La función Inicio para poner en blanco las teclas pulsadas y mandar el puntero al inicio<br /> <span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> Inicio<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #000000;">(</span>xClave:=<span style="color: #ff0000;">""</span>,oVar1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:14kwey86]
Tus campos tienen que ser de caracter
Espero te sirva
Saludos
Adhemar |
xBrowse - Ayuda para ordenar | Hola, Rolando.
===============
[size=50:3v57lkia]"LA COLUMNA QUE SE CORRESPONDE CON EL INDICE EN EL QUE SE ENCONTRÓ EL DATO QUEDE CON SU HEADER TENIENDO LA FLECHITA QUE INDICA QUE ESTÁ ODENADO POR ESA COLUMNA, es decir, como si presionara el botón izquierdo del mouse sobre el header de esa columna."[/size:3v57lkia]
===============
Para lograrlo, una vez que determines la columna que deba tener la flechita, utiliza esto:
::oBrowse:aCols[ nNumeroDeColumna ]:HeaderLButtonUp( 0, 0, 0 )
Espero que te sea de utilidad.
Saludos
Rod MG |
xBrowse - Ayuda para ordenar | Adhemar,
Gracias por responder, pero creo que no es lo que ando buscando.
Rod,
Gracias por responder. Lo tuyo se acerca a lo que busco. Ya lo había logrado usando
[code=fw:1z2vx73m]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:1z2vx73m]
Que hace lo mismo. El problema ahora es que si busco por otra columna y la ordeno por ella y pretendo marcar ese header, lo hace bién pero queda marcado también el anterior.
Si conoces alguna forma de "desmarcar" el header, sería la solución.
Gracias a todos.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Bitmap - JPG | Hello,
I saw an example to use BMP files in a xBrowse()
Is it also possible to use JPG files.
Thanks,
Willy |
xBrowse - Bitmap - JPG | It's not possible, image for using in browses (any kind) should be always BMPs in files or resources. |
xBrowse - Bitmap - JPG | Willy,
You have to use a TImage object that reads the JPG and convert it into a BMP automatically in memory. |
xBrowse - Bitmap - JPG | Thanks,
Is there an example.
Greetings,
Willy. |
xBrowse - Bitmap - JPG | Therefore I should have to change the txBrowse class.
However this is a complex situation I will give it a try.
Any tips how to start this ?
Thanks,
Willy |
xBrowse - Bitmap - JPG | Willy,
Try this:
[code:3kf9bqtg]
METHOD AddJpgFile( cJpgFile ) CLASS TXBrwColumn
local hBmp := FILoadImg( cJpgFile )
AAdd( ::aBitmaps, { hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ) } )
return .t.
[/code:3kf9bqtg] |
xBrowse - Bitmap - JPG | Thanks Antonio,
I test this as soon as possible
Willy |
xBrowse - Bitmap - JPG | At this momoent it is already possible to browse JPG files in a xBrowse()
But it only works when there is only 1 dataline. Is it possible with xBrowse to combine bitmaps and multiple datalines.
The JPG is not displayed in the middel of the column. When I give the column the exact width it is not displayed completely.
Thanks
Willy |
xBrowse - Bitmap do Header | Antonio, a bitmap do header não fica transparente ao usar LOOK 2007. tem como resolver isso?
[url=http://imageshack.us:2ft6e01g][img:2ft6e01g]http://img99.imageshack.us/img99/1605/bitnotraqj8.jpg[/img:2ft6e01g][/url:2ft6e01g]
Obrigado |
xBrowse - Bitmap do Header | up!!!! |
xBrowse - Bitmap do Header | UP!!!!!!!!!!!!!!!! |
xBrowse - Bitmap do Header | Bitmaps on header run ok |
xBrowse - Bitmap do Header | Confirm the problem.
See testxbrw.prg in the samples directory.
The bitmap (handle) returned by FwBmpAsc and FwBmpDes functions
are not transparent.
Regards
Pier Luigi |
xBrowse - Bitmap do Header | Pier Luigi:
[url=http://img228.imageshack.us/my.php?image=headrw4.jpg:381bn197][img:381bn197]http://img228.imageshack.us/img228/8315/headrw4.th.jpg[/img:381bn197][/url:381bn197]
thanks |
xBrowse - Bitmap do Header | Olá,
Tente com Bitmap 32bts e transparencia |
xBrowse - Bitmap do Header | mais Vagner as bitmaps são da classe xbrowse! |
xBrowse - Bitmap do Header | [quote="SGS":fw3ca7h6]mais Vagner as bitmaps são da classe xbrowse![/quote:fw3ca7h6]
Vc pode mudar os bitmaps <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->, veja em a tela do Silvio no fórum em Inglês <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Olhe também o TextxBrw em Samples <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> |
xBrowse - Bitmap do Header | GRATO VAGNER |
xBrowse - Bookmark (post CERRADO) | Gente;
Tengo una Tabla en la que muestro un xBrowse de articulos desde una DBF.
Al ejecutarse en red, se me ocurre que para que dos usuarios puedan seleccionar el mismo artículo (sin que el segundo lo encuentre ya seleccionado o, que el usuario se encuentre con articulos selccionados por otro usuario), introducir el uso de bookmark, es correcta la interpretacion del uso de bookmarks?.
Si así fuera, no encuentro en los samples como indicar una selección. Alguien me puede brindar un sample?
O, si hubiera otra forma de hacerlo (que con DBFs), bienvenido sea.
muchas gracias |
xBrowse - Bookmark (post CERRADO) | Esta consulta esta MAL EXPUESTA, gracias
La reformularé en otro post |
xBrowse - Bookmark (post CERRADO) | Mario
Forgive me if I mis-translated your message .. if you are trying to trap a bookmarked row in xBrowse ..
1) make sure you use this Marquee style
[code=fw:180y38t6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oLbx:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWMS <span style="color: #B900B9;">// multi-row select</span><br /> </div>[/code:180y38t6]
and then you can trap the selected rows like this ..
[code=fw:180y38t6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aCols := oLbx:<span style="color: #000000;">aSelected</span><br /><br /><span style="color: #00C800;">For</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span>aCols<span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">BookMark</span><span style="color: #000000;">(</span>aCols<span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// do some code here</span><br /><span style="color: #00C800;">Next</span><br /> </div>[/code:180y38t6]
Hope this is what you are looking for ?
Rick Lipkin |
xBrowse - Bookmark (post CERRADO) | Rick;
many tank for your reply
in fact, I needed a multi-row select, so i should must change :nMarqueeStyle
Regards |
xBrowse - Borda com lRecordSelector | Quando utilizo XBROWSE com scroll bar(vertical e horizontal) e lRecordSelector:=.f. o BROWSE fica sem BORDA, causando um efeito visual muito ruim.
[url=http://imageshack.us/photo/my-images/844/hqe2.jpg/:1a5tnt8o][img:1a5tnt8o]http://img844.imageshack.us/img844/5492/hqe2.jpg[/img:1a5tnt8o][/url:1a5tnt8o]
é possível resolver? |
xBrowse - Busqueda Incremental | Estimados;
Alguien que me pueda brindar un ej. de esta funcion para un xBrowse en el que despliego el resultado de un Query (uso MariaDB)
muchas gracias
Saludos |
xBrowse - Busqueda Incremental | Mario,
Si los datos que vas a desplegar son semi-estaticos, a mi me ha funcionado muuuy bien mostrar el contenido del recordset en el xbrowse y despues aplicar un filtro al mismo dependiendo lo que estes buscando.
Yo uso MySQL pero quiero pensar que debe ser muy similar al motor que tu usas.
Saludos |
xBrowse - Busqueda Incremental | Amigo prueba asi
Local cbusca:=""
LOCAL cSelect:="ma_arti,ma_des1,ma_fami,ma_pcom,ma_flet,ma_comp,ma_desc1,ma_desc2,ma_desc3,sto_ok,bod_ini1,bod_ent1,bod_sal1,ma_con_com,ma_bloqueo"
REDEFINE GET oGet VAR cBusca ID 101 OF oDlg UPDATE FONT oVentPrinc:oFont COLOR CLR_BLUE when .f.
oLbx:bKeyDown := {|nKey| iif( nKey=13,(cKey:=SQLField(cExi_Suc,"ma_arti"),oDlg:End() ),(PlisBuscar(nKey,@cExi_Suc,"exi_suc",nIndex[cVar],oLbx,@cbusca,cSelect),oLbx:Refresh(),oLbx:Refresh(),oGet:Refresh() ))}
FUNCTION PlisBuscar(nKey,oDatos,oTabla,oOrden,oLbx,cbusca,cSelect)
*-----------------------------------------------------
Local cQuery,campo
DEFAULT cSelect := "*"
If nKey=8
cbusca:= SubStr(cbusca,1,Len(cbusca)-1)
cQuery:="SELECT "+ cSelect + " FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 100"
oDatos:=oServer:Query(cQuery,.T.)
Else
If nKey=190
cbusca :=cbusca + "."
Else
cbusca :=cbusca + Upper(chr(nkey))
Endif
cQuery:="SELECT "+ cSelect +" FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 100"
oDatos:=oServer:Query(cQuery,.T.)
If oDatos:Reccount() == 0
cbusca:=left(cbusca,len(cbusca)-1)
cQuery:="SELECT "+ cSelect +" FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 100"
oDatos:=oServer:Query(cQuery,.T.)
Endif
Endif
Setxbrowse(oLbx, oDatos ) // importante para la navegacion
oDatos:Refresh()
oLbx:Refresh(.t.)
oLbx:SetFocus()
oDatos:GOTOP()
return .t.
con tienes para ser una busqueda
ojala te sirva
saludos |
xBrowse - Busqueda Incremental | Raymundo;
gracias por tu respeusta.
Te cuento: MariaDB es el nuevo motor desarrollado por Michael "Monty" Widenius [url:14isrfn3]http://es.wikipedia.org/wiki/MariaDB[/url:14isrfn3].
El proyecto de Monty surge en represalia a la politica de Oracle. Y como podrás leer, del enlace de arriba, es compatible con MySQL
Para conectarme con la DB uso Eagle1, que tiene metodos como :Find() y :FindNext(), que es con lo que estoy desarrollando actualmente.
Pero para un browse me resulta mas atractivo la búsqueda incremental y a eso apunta mi consulta.
Saludos |
xBrowse - Busqueda Incremental | jbrita;
probaré tu propuesta, muchas gracias |
xBrowse - Busqueda Incremental | Mario,
Por eso te preguntaba acerca de los datos a localizar y mostrar.
Si es un catalogo de clientes que se le hacen muy pocos ajustes ( insert,delete,update) genero el recordset y despues le aplico el filtro de la busqueda.
Si los datos son variables ( historico operaciones, diferentes condiciones, etc ) al estar haciendo el select se usa mucho mas el trafico de datos al server, ahora en caso que sea asi la necesidad, en vez de usar LIKE yo usaria REGEXP ya que me busca y devuelve el valor a buscar en cualquier parte del campo.
Saludos |
xBrowse - Busqueda Incremental | Raymundo;
gracias por tu aporte.
La Tabla prinicipal es de insumos hospitalario, por lo que estimo que las ALTAS/MODIFICACIONES no serán de considerables ajustes.
Por lo que el uso de LIKE sería interesante, de cualquier manera me llama la atención REGEXP, funcion que no conozco y la estudiaré
Saludos |
xBrowse - Busqueda Incremental | (O.T.) Una cosa mas
Si esto esta SOLUCIONADO, como lo pongo en el texto del Asunto <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> . Ya que le agrego, pero luego muestra el orignal sin la palabara agregada(?)
gracias |
xBrowse - Búsqueda incremental - Agregado (No hace falta) | Buenas noches,
No encontré otra forma de hacerlo así que agregué una reforma al "METHOD Seek( cSeek ) CLASS TXBrowse" con la finalidad que al hacer una búsqueda incremental en campos que están escritos todo en mayúscula. Si el teclado no está en mayúsculas, con esta reforma también realiza la búsqueda incremental.
[code=fw:3iop8y84]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> Seek<span style="color: #000000;">(</span> cSeek <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br />.....<br /><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">lIncrFilter</span><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> cSeek <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'C'</span><br /> uBook := ::<span style="color: #000000;">BookMark</span><br /><span style="color: #B900B9;">// if Eval( ::bSeek, cSeek, @uSeek )</span><br /> <span style="color: #00C800;">if</span> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bSeek</span>, cSeek, @uSeek <span style="color: #000000;">)</span> .and. Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bSeek</span>, upper<span style="color: #000000;">(</span>cSeek<span style="color: #000000;">)</span>, @uSeek <span style="color: #000000;">)</span> <span style="color: #B900B9;">// by rolo</span><br /> <span style="color: #B900B9;">// para buscar por letras</span><br /> <span style="color: #B900B9;">// minúsculas</span><br />...<br /><br /><span style="color: #00C800;">If</span> cSeek == <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cSeek</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cSeek</span> := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">If</span> ::<span style="color: #000000;">oSeek</span> != <span style="color: #00C800;">nil</span><br /> ::<span style="color: #000000;">oSeek</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</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;">return</span> lRet<br /><span style="color: #00C800;">Endif</span><br /><br /> uBook := ::<span style="color: #000000;">BookMark</span><br /><br /><span style="color: #B900B9;">// if !Eval( ::bSeek, cSeek )</span><br /> <span style="color: #00C800;">if</span> !Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bSeek</span>, cSeek <span style="color: #000000;">)</span> .AND. !Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bSeek</span>, upper<span style="color: #000000;">(</span>cSeek<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// by rolo</span><br /> <span style="color: #B900B9;">// para buscar por letras</span><br /> <span style="color: #B900B9;">// minúsculas</span><br /> ::<span style="color: #000000;">BookMark</span> := uBook<br /> MsgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> lRet<br /> <span style="color: #00C800;">endif</span><br /><br />...</div>[/code:3iop8y84]
Saludos.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Búsqueda incremental - Agregado (No hace falta) | [quote:18qnkv9f]No encontré otra forma de hacerlo así que agregué una reforma al "METHOD Seek( cSeek ) CLASS TXBrowse" con la finalidad que al hacer una búsqueda incremental en campos que están escritos todo en mayúscula. Si el teclado no está en mayúsculas, con esta reforma también realiza la búsqueda incremental.
[/quote:18qnkv9f]
Not necessary.
XBrowse's built-in bSeek takes care of this. This is a part of built-in bSeek
[code=fw:18qnkv9f]<div class="fw" id="{CB}" style="font-family: monospace;"> lFound := DbSeek<span style="color: #000000;">(</span> Upper<span style="color: #000000;">(</span> cExpr <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> .or. DbSeek<span style="color: #000000;">(</span> cExpr <span style="color: #000000;">)</span><br /> </div>[/code:18qnkv9f] |
xBrowse - Búsqueda incremental - Agregado (No hace falta) | Good afternoon,
Yes, you are absolutely right.
Still do not understand why, but in my program had this fault.
Today I went to compile everything again and to my surprise, my program works fine without "my added".
I apologize for the inconvenience.
Thank you.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
P.D. Sorry for my English, I helped with the translator of Google. |
xBrowse - ColDividerStyle/RowDividerStyle | To Mr. Rao,
It would be fine if ColDividerStyle/RowDividerStyle could be selected for each row and col.
Do you think it is possible to move the drawing of the dividers from the [i:1lhv0to3]Paint [/i:1lhv0to3]to the [i:1lhv0to3]PaintData [/i:1lhv0to3]method?
Thanks in advance
Ott |
xBrowse - ColDividerStyle/RowDividerStyle | Mr. Otto
This is on my personal wish-list too. Hope someday soon FWH will provide this feature. |
xBrowse - Color de fondo en array no permite edición - LISTO | Buenas tardes,
Tengo un Browse en el cual defino un color de fondo en un array así:
[code=fw:y6fhd5s9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">local</span> aVerde:=<span style="color: #000000;">{</span> <span style="color: #000000;">{</span> .<span style="color: #000000;">50</span>,<span style="color: #000000;">65280</span>,<span style="color: #000000;">16777215</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> .<span style="color: #000000;">50</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">65280</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:y6fhd5s9]
y luego lo utilizo como fondo para destacar una línea o líneas que cumplan determinada condición así:
[code=fw:y6fhd5s9]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw<br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> :<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">{</span>|| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>!lEncontrado, ;<br /> ;<br /> <span style="color: #000000;">(</span><span style="color: #00C800;">if</span><span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>alltrim<span style="color: #000000;">(</span>oDbf:<span style="color: #000000;">BUSCADO</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>><span style="color: #000000;">0</span> ,;<br /> <span style="color: #000000;">(</span><span style="color: #000000;">{</span>CLR_BLACK, aVerde<span style="color: #000000;">}</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #000000;">(</span><span style="color: #000000;">{</span>nrgb<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>,nClrFondo<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: #000000;">(</span><span style="color: #000000;">{</span>nrgb<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>,nClrFondo<span style="color: #000000;">}</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br />End</div>[/code:y6fhd5s9]
Esto queda lindo a la vista:
[url=http://imageshack.us/photo/my-images/534/zqx9.jpg/:y6fhd5s9][img:y6fhd5s9]http://img534.imageshack.us/img534/8077/zqx9.jpg[/img:y6fhd5s9][/url:y6fhd5s9]
[b:y6fhd5s9][i:y6fhd5s9]Pero esto da un error al intentar editar un campo cuando la línea que lo contiene tiene el color de fondo dado por el array[/i:y6fhd5s9][/b:y6fhd5s9] (en el resto no hay problemas).
Lo solucioné modificando la clase xBrowse en el [b:y6fhd5s9]METHOD Edit( nKey ) CLASS TXBrwColumn[/b:y6fhd5s9]
Cambié las líneas:
[code=fw:y6fhd5s9]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">oEditGet</span> := TGet<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;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">{</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>PCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span>==<span style="color: #000000;">0</span>,uValue,uValue:= u <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> ::<span style="color: #000000;">oBrw</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,cPic,,aColors<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>,aColors<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>;<br /> ,oFont,.F.,,.F.,,.F.,,lCenter,lRight,,.F.,.f.,.T.,,.F.,,,,<span style="color: #000000;">)</span> <span style="color: #B900B9;">// oFont ADDED</span></div>[/code:y6fhd5s9]
Por:
[code=fw:y6fhd5s9]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">oEditGet</span> := TGet<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;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">{</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>PCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span>==<span style="color: #000000;">0</span>,uValue,uValue:= u <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> ::<span style="color: #000000;">oBrw</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,cPic,,aColors<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>,<span style="color: #000000;">(</span><span style="color: #00C800;">if</span><span style="color: #000000;">(</span>valtype<span style="color: #000000;">(</span>aColors<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>==<span style="color: #ff0000;">'N'</span>,aColors<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">16770271</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span>; <br /> ,oFont,.F.,,.F.,,.F.,,lCenter,lRight,,.F.,.f.,.T.,,.F.,,,,<span style="color: #000000;">)</span> <span style="color: #B900B9;">// oFont ADDED</span></div>[/code:y6fhd5s9]
Y problema resuelto.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - Color de fondo en array no permite edición - LISTO | Rolando,
gracias por compartir tu solución <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse - Color en Columna | Hola Gente
Deseo pintar una columna de un color distinto a la del resto. De hecho así lo tengo en otros xBrowses.
Aunque en el caso del que pinto con el efecto "pijama", no me toma la que pretendo diferenciar.
Este es mas o menos el código
[code=fw:c7v6s4v5]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT soBrwC<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> :<span style="color: #000000;">nColDividerStyle</span>:= LINESTYLE_DARKGRAY<br /> ...<br /> :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span>CLR_BLACK, <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"Clientes"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nArea</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> AdsKeyNo<span style="color: #000000;">(</span>,,ADS_IGNOREFILTERS <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, CLR_BACKBLUE1, CLR_BACKBLUE2 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT soBrwC:<span style="color: #000000;">SaldoAct</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">85</span><br /> :<span style="color: #000000;">bClrEdit</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK,CLR_BACKTIZA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// NO LO TOMA</span><br /><br /> :<span style="color: #000000;">bStrData</span>:= <span style="color: #000000;">{</span>|| Trans<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"Clientes"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nArea</span><span style="color: #000000;">)</span>->FCLI20, PIC_DIEZCIF3 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END</div>[/code:c7v6s4v5]
No lo toma por el efecto "pijama"? |
xBrowse - Color en Columna | Hola Mario.
Ya probaste con:
[code=fw:2in7bw63]<div class="fw" id="{CB}" style="font-family: monospace;"> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK, RGB<span style="color: #000000;">(</span><span style="color: #000000;">166</span>,<span style="color: #000000;">166</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><span style="color: #000000;">}</span></div>[/code:2in7bw63] |
xBrowse - Color en Columna | Francisco, gracias por responder
Mi define es (son):
#define CLR_BACKTIZA nRGB( 230, 230, 230 )
Aunque probé como me indicas, la columna "no se quiere sacar el pijama" <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
xBrowse - Color en Columna | Puede tener algo que ver lo que tengas definido en el:
[code=fw:1tpp3xzh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />:<span style="color: #000000;">nMarqueeStyle</span> := ..... <span style="color: #B900B9;">//Por ejemplo: MARQSTYLE_HIGHLROW</span><br /> </div>[/code:1tpp3xzh]
o si no lo tienes definido, el que tome por defecto |
xBrowse - Color en Columna | Cristobal, gracias por tu interes
Deshabilite esa llinea y tampoco pasa por ahí.
Voy a mirar bien el códigó en el browse que si me muestra columnas colorizadas |
xBrowse - Color en Columna | Intentalo poniendo oBrw:aCols[1]:bClrStd := {|| { CLR_BLACK, RGB(166,166,255) }} despues del oBrw:CreateFrom...()
Asi me funciona:
[code=fw:2xy7d2sq]<div class="fw" id="{CB}" style="font-family: monospace;">@<span style="color: #000000;">3</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ; <br /> ARRAY <span style="color: #000000;">{</span><span style="color: #000000;">}</span> CELL LINES FOOTERS AUTOSORT<br /><br /> FapBrwSetup<span style="color: #000000;">(</span>oBrw<span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK, RGB<span style="color: #000000;">(</span><span style="color: #000000;">166</span>,<span style="color: #000000;">166</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><span style="color: #000000;">}</span><br /> </div>[/code:2xy7d2sq] |
xBrowse - Color en Columna | Amigos;
es sábado y parece que la "mente" me esta diciendo basta!.... jejeje
mi error es este: (copiar y pegar no siempre es la solución!)
:bClrEdit := {|| { CLR_BLACK,CLR_BACKTIZA } }
en lugar de
[b:ebrt1k6i]:bClrStd [/b:ebrt1k6i] := {|| { CLR_BLACK,CLR_BACKTIZA } }
que obviamente si funciona... que papelón! <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
No obstante ya que estan en ritmo pregunto:
Para cambiar el font de la barra de señaladora uso
[code=fw:ebrt1k6i]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oBrw<br /> :<span style="color: #000000;">oDataFonts</span> := <span style="color: #000000;">{</span>|| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> oLstChq:<span style="color: #000000;">BookMark</span> == nPosActual, ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Calibri16B"</span><span style="color: #000000;">]</span>, ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Calibri16"</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span>|| nPosActual := oLstChq:<span style="color: #000000;">BookMark</span>, oLstChq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> <span style="color: #B900B9;">// En la columna como?</span><br /> WITH OBJECT soBrwC:<span style="color: #000000;">SaldoAct</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">85</span><br /> :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK,CLR_BACKTIZA <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// NO FUNCA</span><br /> :<span style="color: #000000;">b</span>?????? := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Calibri16B"</span><span style="color: #000000;">]</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bStrData</span>:= <span style="color: #000000;">{</span>|| Trans<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"Clientes"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nArea</span><span style="color: #000000;">)</span>->FCLI20, PIC_DIEZCIF3 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END </div>[/code:ebrt1k6i] Y lo que que pretendo es que lo que muestro en la columna colorizada , además, me salga con un font de tipo negrita.
Esa DATA existe? |
xBrowse - Color en Columna | Prueba con:
[code=fw:3su5984a]<div class="fw" id="{CB}" style="font-family: monospace;"> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">oDataFont</span> := oFont <br /> </div>[/code:3su5984a] |
xBrowse - Color en Columna | graciassss!!! |
xBrowse - Columna Descendente (Solucionado) | Estimados;
Tengo una DBF, administrada con ADS, y un campo numerico del cual genero un índice que indico sea Descendente
Cuando ejecuto la App, la vista es con el orden deseado, aunque el ícono de la cabecera de columna, lo muestra como Descendente
Mi codigo es el siguiente:
[code=fw:1a8c8hb3]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> ::<span style="color: #000000;">oBrwCab</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Tahoma15"</span><span style="color: #000000;">]</span> ;<br /> COLUMNS <span style="color: #ff0000;">"FFeVta01"</span>, <span style="color: #ff0000;">"FHsVta01"</span>, <span style="color: #ff0000;">"FDocInt1"</span>, <span style="color: #ff0000;">"FCabFa04"</span> ;<br /> <span style="color: #0000ff;">ALIAS</span> h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabFacVta"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cAlias</span> AUTOSORT<br />...<br /> WITH OBJECT ::<span style="color: #000000;">oBrwCab</span>:<span style="color: #000000;">FDocInt1</span><br /> :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Código"</span><br /> :<span style="color: #000000;">nHeadStrAlign</span>:= :<span style="color: #000000;">nDataStrAlign</span>:= AL_LEFT<br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">85</span><br /> :<span style="color: #000000;">cOrder</span>:= <span style="color: #ff0000;">"D"</span> <span style="color: #B900B9;">// No obstante muestra como "A"</span><br /><br /> :<span style="color: #000000;">bStrData</span>:= <span style="color: #000000;">{</span>|| Str<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabFacVta"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cAlias</span><span style="color: #000000;">)</span>->FDocInt1, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> </div>[/code:1a8c8hb3]
Antes de esto. Tenía mi indice con orden Natural, y con la declaración arriba mostrada; como no cambiaba el orden, lo hice en el índice.
Hay algo que me falta tener en cuenta?
Uso FWH 1204 |
xBrowse - Columna Descendente (Solucionado) | Mario:
Creo que te falta indicar el BMP a mostrar
[code=fw:1zjey0uu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> ::<span style="color: #000000;">oBrwCab</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Tahoma15"</span><span style="color: #000000;">]</span> ;<br /> COLUMNS <span style="color: #ff0000;">"FFeVta01"</span>, <span style="color: #ff0000;">"FHsVta01"</span>, <span style="color: #ff0000;">"FDocInt1"</span>, <span style="color: #ff0000;">"FCabFa04"</span> ;<br /> <span style="color: #0000ff;">ALIAS</span> h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabFacVta"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cAlias</span> AUTOSORT<br />...<br /> WITH OBJECT ::<span style="color: #000000;">oBrwCab</span>:<span style="color: #000000;">FDocInt1</span><br /> :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Código"</span><br /> :<span style="color: #000000;">nHeadStrAlign</span>:= :<span style="color: #000000;">nDataStrAlign</span>:= AL_LEFT<br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">85</span><br /> :<span style="color: #000000;">cOrder</span>:= <span style="color: #ff0000;">"D"</span> <span style="color: #B900B9;">// No obstante muestra como "A"</span><br /> :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">2</span> <span style="color: #B900B9;">// ESTA LINEA PARA MOSTRAR EL BMP DESCENDENTE</span><br /><br /> :<span style="color: #000000;">bStrData</span>:= <span style="color: #000000;">{</span>|| Str<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>h0<span style="color: #000000;">[</span><span style="color: #ff0000;">"CabFacVta"</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cAlias</span><span style="color: #000000;">)</span>->FDocInt1, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> END<br /> </div>[/code:1zjey0uu]
Saludos |
xBrowse - Columna Descendente (Solucionado) | Armando; gracias por responder
En realidad no lo comente, pero el bmp se muestra, solo que indicado Ascedente (muestro imagen)
[img:1y3xrvky]http://img199.imageshack.us/img199/6430/descend.JPG[/img:1y3xrvky] |
xBrowse - Columna Descendente (Solucionado) | Mario:
En tu código no veo definido el BMP y asumo que por default te coloca el ascendente (1), intenta
definirlo con la línea que te incluí, para indicarle que muestre el bmp descendente.
Saludos |
xBrowse - Columna Descendente (Solucionado) | Armando;
disculpa, no lo mencione, compile incluyéndolo, la respuesta es al misma
gracias, nuevamente |
xBrowse - Columna Descendente (Solucionado) | Mario:
Con esta línea en el ON INIT de tu ventana o dialogo solucionas el problema
[code=fw:25x9rg11]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">01</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">"D"</span>,oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">01</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> </div>[/code:25x9rg11]
Saludos |
xBrowse - Columna Descendente (Solucionado) | Efectivamente!
solucionado, gracias! |
xBrowse - Consulta sobre EDIT_LISTBOX | Estimados;
Utilizo la opción de referencia, creando la lista, en array, previo al despliegue del browse.
Ahora, se presenta la necesidad de armar la Lista al momento de tomar el foco cada registro. De manera que el EDIT_LISTBOX muestre una lista diferente, que tambien puede no tener datos, segun el registro en foco.
Alguna pista?.
gracias |
xBrowse - Consulta sobre EDIT_LISTBOX | Algo asi?
[url:1mipp9ef]http://www.forums.fivetechsupport.com/viewtopic.php?f=3&t=9689[/url:1mipp9ef]
[url:1mipp9ef]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=9345&start=45[/url:1mipp9ef]
[url:1mipp9ef]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32015#p187553[/url:1mipp9ef] |
xBrowse - Consulta sobre EDIT_LISTBOX | Retomando el tema... estoy con el mismo problema... hay alguna solución para ésto?
Muchas gracias!
Roberto |
xBrowse - Consulta sobre EDIT_LISTBOX | Gracias Joao! |
xBrowse - Control Character | Hi All
I use a field in my browse that pops up a dialog for entering notes ( the dialog is not from a resource file ) - this
works fine with Windows 7 but on Windows XP the enter key is saved as a character in the field. ( hope that makes sense).
When using a resource we select multi line and want return - how do you select this when not using a resource.
[code=fw:22on8boa]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> sfNotes<span style="color: #000000;">(</span>nRow,nCol,oCol,aData,nBottom,nRight,nText1,nText2,nBtnRow,nBtnOk,nBtnCancel<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg, oGet,aPoint,cOldNotes := <span style="color: #ff0000;">''</span>,cNotes := <span style="color: #ff0000;">''</span><br /> aPoint := ClientToScreen<span style="color: #000000;">(</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">{</span> nRow, nCol <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> nRow := aPoint<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> nCol := aPoint<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br />cOldNotes := aData<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br />cNotes := aData<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> nRow, nCol <span style="color: #0000ff;">TO</span> nRow + nBottom, nCol + nRight <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> WS_POPUP<br /> @ <span style="color: #000000;">02</span>,<span style="color: #000000;">02</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cNotes <span style="color: #0000ff;">TEXT</span> <span style="color: #0000ff;">SIZE</span> nText1,nText2 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">COLOR</span> GETCOLOR<br /><br /><br /> @ nBtnRow,nBtnOk <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">47</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ nBtnRow,nBtnCancel <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">47</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>cNotes := cOldNotes,oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oDlg:<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> oDlg ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span><span style="color: #000000;">(</span>oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span><span style="color: #000000;">0</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: #00C800;">return</span><span style="color: #000000;">(</span>cNotes<span style="color: #000000;">)</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------------------------</span><br /><br />Regards<br /><br />Colin<br /><br /><br /><br /><br /> </div>[/code:22on8boa] |
xBrowse - Control Character | TEXT, MEMO and MULTILINE clauses are synonyms.
EMG |
xBrowse - Control Character | Colin
Looking at the Get in FiveWin.ch it shows both TEXT, MEMO and MULTILINE .. however MEMO seems to be associated with Multiline ???.
[code=fw:1n8a178x]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#command @ <nRow>, <nCol> <span style="color: #0000ff;">GET</span> <span style="color: #000000;">[</span> <oGet> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <uVar> ;<br /> <span style="color: #000000;">[</span> <dlg: <span style="color: #0000ff;">OF</span>, <span style="color: #0000ff;">WINDOW</span>, DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <memo: <span style="color: #000000;">MULTILINE</span>, MEMO, TEXT> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <color:<span style="color: #0000ff;">COLOR</span>,COLORS> <nClrFore> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <hscroll: <span style="color: #000000;">HSCROLL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">CURSOR</span> <oCursor> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lCenter: <span style="color: #0000ff;">CENTER</span>, CENTERED> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lRight: <span style="color: #000000;">RIGHT</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <readonly: <span style="color: #000000;">READONLY</span>, NO MODIFY> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lDesign: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lNoBorder: <span style="color: #000000;">NO</span> BORDER, NOBORDER> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lNoVScroll: <span style="color: #000000;">NO</span> VSCROLL> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oGet> := <span style="color: #000000;">]</span> TMultiGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, bSETGET<span style="color: #000000;">(</span><uVar><span style="color: #000000;">)</span>,;<br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>, <nWidth>, <nHeight>, <oFont>, <.<span style="color: #0000ff;">hscroll</span>.>,;<br /> <nClrFore>, <nClrBack>, <oCursor>, <.<span style="color: #0000ff;">pixel</span>.>,;<br /> <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>, <.lCenter.>,;<br /> <.lRight.>, <.readonly.>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>,;<br /> <span style="color: #000000;">[</span>\<span style="color: #000000;">{</span>|nKey, nFlags, Self| <uChange>\<span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <.lDesign.>,;<br /> <span style="color: #000000;">[</span><.lNoBorder.><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><.lNoVScroll.><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> </div>[/code:1n8a178x]
Try changing TEXT to MEMO or TEXT to MULTILINE in your get and see if that gives you the desired behavior.
Rick |
xBrowse - Coordenadas en Pixel - Solucionado !!! | Como puedo saber en un xBrowse, las coordenadas en pixel cuando clicleo en una celda especifica???
Desde ya muchisimas gracias.
Abrazo.
Miguel.
PD. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21608&p=114947&hilit=coordenadas+en+pixel#p114947">viewtopic.php?f=6&t=21608&p=114947&hilit=coordenadas+en+pixel#p114947</a><!-- l --> |
xBrowse - Coordenadas en Pixel - Solucionado !!! | Miguel Angel,
Has avanzado en implementar los tooltips por celdas ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse - Coordenadas en Pixel - Solucionado !!! | Antonio , estoy en eso solo que no como Tooptip, sino con la función HTMLPOP(), que me parece de una potencialidad enorme.
Todavía no logro la posición exacta en pixel, pero hoy creo que lo logro.
Ademas de estos parámetros la función tiene algún otro ???
HTMLPOP( hWnd, cHelpFile, HH_DISPLAY_TEXT_POPUP, cnHelp, nRow, nCol, nBgColor,nTxColor )
Abrazos.
Miguel |
xBrowse - Coordenadas en Pixel - Solucionado !!! | Miguel,
El código fuente esta en FWH\source\winapi\helpchm.prg y verás que basicamente lo que hacemos es usar el comando HH_DISPLAY_TEXT_POPUP:
[url:2raay6xi]http://msdn.microsoft.com/en-us/library/windows/desktop/ms670082(v=vs.85).aspx[/url:2raay6xi]
Antes de enviar ese comando, se rellena una estructura HH_POPUP que permite especificar unos ciertos parámetros:
[url:2raay6xi]http://msdn.microsoft.com/en-us/library/windows/desktop/ms524362(v=vs.85).aspx[/url:2raay6xi]
quizas te sirva alguno de ellos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse - Coordenadas en Pixel - Solucionado !!! | Ok .... ahora los veo.
Gracias <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Miguel |
xBrowse - Dates - FWH 2310 | You will love this one.
A client notified me this morning about a problem. I am waiting to hear about his computer and windows version, but here is what I have found:
First, the code for the xbrowse using a resource
[code=fw:31idhk13]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLbxo ;<br /> DATASOURCE ::<span style="color: #000000;">oOrders</span> ;<br /> HEADERS <span style="color: #ff0000;">" Done "</span>, <span style="color: #ff0000;">"Paid"</span>, <span style="color: #ff0000;">"Type"</span>, <span style="color: #ff0000;">"W/O #"</span>, <span style="color: #ff0000;">"Company"</span>, sLbl<span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>, sLbl<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>, <span style="color: #ff0000;">"Due Date"</span>, <span style="color: #ff0000;">"Time"</span>, <span style="color: #ff0000;">" Started "</span>, <span style="color: #ff0000;">" Paid "</span>, <span style="color: #ff0000;">" Status "</span> ;<br /> COLUMNS <span style="color: #ff0000;">"ordnot"</span>, <span style="color: #ff0000;">"Totals"</span>, <span style="color: #ff0000;">"status"</span>, <span style="color: #ff0000;">"wrkord"</span>, <span style="color: #ff0000;">"ordcom"</span>,<span style="color: #ff0000;">"vehlic"</span>, <span style="color: #ff0000;">"ordveh"</span>, <span style="color: #ff0000;">"duedat"</span>, <span style="color: #ff0000;">"duetim"</span>, <span style="color: #ff0000;">"wrkdat"</span>, <span style="color: #ff0000;">"paydat"</span>, <span style="color: #ff0000;">"CliUs1"</span> ;<br /> JUSTIFY ,,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span>,,,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">390</span> <span style="color: #0000ff;">OF</span> oWdlg ;<br /> <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">(</span> ::<span style="color: #000000;">oWorkOrder</span>:<span style="color: #000000;">FullEdit</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oOrders</span>, oWdlg <span style="color: #000000;">)</span>, oLbxo:<span style="color: #0000ff;">update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oOrderList:<span style="color: #000000;">LoadDisplayValues</span><span style="color: #000000;">(</span> <span style="color: #000000;">)</span>, oWdlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oOrderList:<span style="color: #000000;">LoadDisplayValues</span><span style="color: #000000;">(</span> <span style="color: #000000;">)</span>, oWdlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> AUTOSORT <span style="color: #0000ff;">UPDATE</span><br /><br /> </div>[/code:31idhk13]
duedat, wrkdat, and paydat are all Date fields in the file.
wrkdat displays as "999999" while the others display as normal dates.
On my Windows 64 bit, Version 11, 23H2 OS, ALL dates display correctly. On my Virtual machine ( Parallels, on an Mac Mini with ARM processor ), the wrkdat displays incorrectly.
This occurs on a few other xbrowse controls, and it is consistent. I see it on the same locations where he sees it.
Any thoughts on this ? It is only in the latest FWH 2310 release ( downloaded after the last fixes ). |
xBrowse - Dates - FWH 2310 | I assume ::oOrders is a Database Object. Please confirm.
[quote:11a6685m]wrkdat displays as "999999" while the others display as normal dates.[/quote:11a6685m]
This happens if oCol:cEditPicture of this column is "999999". XBrowse builds the picture from that column's cDataType, nDataLen and nDataDec. In turn, XBrowse takes this informatin from ::oOrders:aStruct. It appears that XBrowse is reading the structure of the field 'wrkdat' from ::oorders as { "WRKDAT", "N", 6, 0 }. Surprising.
We can get away with suggesting a work-around
[code=fw:11a6685m]<div class="fw" id="{CB}" style="font-family: monospace;">oLbxo:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #00C800;">nil</span></div>[/code:11a6685m]
But that is not the point.
We need to understand why 'wrkdat' field's structure is read wrongly. More surprising is that this is behaving differently on different PCs (configurations) and also differently between FWH2307 and 2310. Right now, I can not figure out whats happening differently on different computers.
We need your help in understanding this problem.
1) Before defining the xbrowse, insert a line of code:
[code=fw:11a6685m]<div class="fw" id="{CB}" style="font-family: monospace;">XBROWSER ::<span style="color: #000000;">oOrders</span>:<span style="color: #000000;">aStruct</span></div>[/code:11a6685m]
Please see what you see for the field "WRKDAT" on both PCs (with problem and without problem) and let us know.
2) Insert this code after defining the XBrowse.
[code=fw:11a6685m]<div class="fw" id="{CB}" style="font-family: monospace;">oLbxo:<span style="color: #000000;">bRClicked</span> := <||<br /> ? oLbxo:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">cExpr</span>,oLbxo:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">cDataType</span>, oLbxo:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">cEditPicture</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> ><br /> </div>[/code:11a6685m]
Then right click on the browse and let us know what you see. What diffeences you see on PCs that show correctly and incorrectly.
Sorry, but we have to give you this trouble to understand the real issue. |
xBrowse - Dates - FWH 2310 | No problem. It is late but I will do those steps in the morning. Yes, it is strange, and unique, so I’m happy to do those tests.
The one client who had problems is running OS 21H2, so I asked him to run the Windows update.
Sent from my iPhone using Tapatalk |
xBrowse - Dates - FWH 2310 | Good Morning,
I have run that on both computers.
On both computers xbrowser shows wrkdat as D 8
On the i7 computer, the right click displays wrkdat D
On the Virtual machine, the right click displays wrkdat D 999999
To clarify, although the dates are different for entries of wrkdat, the incorrect display shows 999999 for ALL rows regardless of the content of the wrkdat field.
I've also just encountered another issue with xBrowse but need to do further testing to be sure exactly what is happening.
Tim |
xBrowse - Dates - FWH 2310 | [quote:23usr3en]On the i7 computer, the right click displays wrkdat D
On the Virtual machine, the right click displays wrkdat D 999999[/quote:23usr3en]
This difference is surprising.
Can you take some more trouble and test it with program built with 2307 ?
We need to understand why is this difference between i7 pc and the virtual machine.
PS: We can provide you with a revised version to display correctly. But that is only a kind of workaroind.
What we really need to find out is why is the above difference.
Please help us |
xBrowse - Dates - FWH 2310 | I did build with FWH 12.07 and now it shows the same issue.
On the ARM machine ... it shows on the aStructure ... WRKDAT, D, 8, 0, , , 999999
On the i7 is shows as WRKDAT, D, 8, 0, , , , so no 999999
Just to be sure, I copied the entire data directory from the known good to the problem system and thus the files were exactly the same on both computers. Same problem
Finally I copied all of the files from the directory where the .exe resides, including .dll files, and suddenly it worked.
So ... my first step is to see if I can isolate exactly what .dll file might have been different. |
xBrowse - Dates - FWH 2310 | [quote:xqwl32t0]On the ARM machine ... it shows on the aStructure ... WRKDAT, D, 8, 0, , , 999999
On the i7 is shows as WRKDAT, D, 8, 0, , , , so no 999999
[/quote:xqwl32t0]
This has nothing to do with your files/databases
1. This problem was there in 2307 also and still continues. Am I right?
2. In that case , even with 2307, xbrowse must be displaying '999999' in the WRKDAT column on ARM machine. Right?
In our software, the picture clauses are built by database.prg and then used by xbrowse.
We need to find out why database.prg is working differently on different machines.
Again, this has nothing to do with your dbf files. |
xBrowse - Dates - FWH 2310 | Unfortunately, I think it got more complicated than that. First, clients who have the problem were not using ARM computers. I was able to see the problem using mine ( C2 below ).
Computer 1 ( C1) is my primary programming computer. I am running Windows 11, 23H2. Builds are done with Harbour ( 32 & 64 ), FWH ( latest versions ), and Microsoft Visual Studio Community ( latest builds ). It is a Dell Inspiron AIO.
Computer 2 ( C2 ) is a Mac mini, using the M2 processor ( ARM ). It has Parallels running Windows 11, 22H2 in a VM.
The data is stored in a MLS12s folder on the "server" which could be any type of machine, or for a single install ( not multi user ), it is on the same machine.
The Client consists of an .EXE, and multiple supporting files ( .lic, .ini, .dll, etc. ) placed in the MLS12c directory
I built the application and placed the primary .EXE in the MLS12c folder
1. I never observed the problem on C1, but did see it occur consistently on C2 using the exact same .EXE.
2. I did not see it with earlier builds using FWH1207. It did occur with 1210
3. I rebuilt the application using FWH 1207. The problem did not occur on C1, but did occur on C2
4. I then copied all of the data files from C1 to C2 so I could be sure it wasn't in a data file. I still got the same result with the error on C2
5. Finally I took all of the remaining files in the MLS12c folder ( Client ) and copied them from C1 to C2. Then the problem no longer occurred.
My mistake was that I did not first compare the two sets of files to see what was different. I do not appear to have a copy of the original set. I just know when I copied over those files, the problems went away.
So, now I'm trying to see if I have the set somewhere where I can compare the new vs the old ...
Meanwhile, people are getting automatic updates applied by Microsoft to their OSs. One client called to tell me he could no longer Cut and Paste in our program. It occurred a couple of days ago when I sent out the first update. When I asked him specifically where, he went back to check and it was suddenly working. He then remembered that Microsoft Updates were being applied in there also .... so it does get very hard to dig into this.
With all of that in mind, I'm quite happy to do any tests you might like ... |
xBrowse - Dates - FWH 2310 | Dear Tim,
Is the problem solved ?
It seems as you missed to copy something. Is it so ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.