topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xBrowse - how to update | Hello Otto.
I hope this is what you're looking for
[img:2fl3u357]http://www.sitasoft.com/fivewin/bitmap/on.bmp[/img:2fl3u357] on.bmp
[img:2fl3u357]http://www.sitasoft.com/fivewin/bitmap/off.bmp[/img:2fl3u357] off.bmp
[code=fw:2fl3u357]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oBrw, aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> n<br /> <br /> <br /> <br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">1000</span><br /> aadd<span style="color: #000000;">(</span> aData, <span style="color: #000000;">{</span>.f., <span style="color: #ff0000;">"NUMBER_"</span> + StrZero<span style="color: #000000;">(</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"REVERSE_"</span> + StrZero<span style="color: #000000;">(</span> <span style="color: #000000;">1000</span> - n, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"I am a DialogBox"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span><br /> <br /> @ <span style="color: #000000;">160</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Delete"</span> <span style="color: #0000ff;">ACTION</span> Backuploeschen<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span><br /> <br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br /> COLUMNS <span style="color: #000000;">{</span><span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span><span style="color: #000000;">}</span> ;<br /> HEADERS <span style="color: #000000;">{</span><span style="color: #ff0000;">"Selected"</span>, <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Second"</span><span style="color: #000000;">}</span> ;<br /> ARRAY aData <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">150</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;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"on.bmp"</span>, <span style="color: #ff0000;">"off.bmp"</span><span style="color: #000000;">}</span>, <span style="color: #000000;">{</span>| o, x, n | o:<span style="color: #000000;">Value</span> := x <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><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;">bStrData</span> = <span style="color: #00C800;">NIL</span><br /><br /> <br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> = <span style="color: #000000;">4</span><br /> oBrw:<span style="color: #000000;">nColDividerStyle</span> = <span style="color: #000000;">1</span><br /> oBrw:<span style="color: #000000;">nRowDividerStyle</span> = <span style="color: #000000;">1</span><br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Backuploeschen<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> n := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">local</span> nCount := <span style="color: #000000;">0</span><br /><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">(</span> n := AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">{</span>| uVal | uVal<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> == .T. <span style="color: #000000;">}</span>, n <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> ADel<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, n <span style="color: #000000;">)</span><br /> ASize<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span>, Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /> <br /> oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span></div>[/code:2fl3u357] |
xBrowse - how to update | Hello Daniel,
thank you so much. Now it is all working.
Best regards,
Otto |
xBrowse - incremental search | If I search and the find position is not on the first page I lose the header and the row pointer.
[img:39zcjw0q]http://www.atzwanger.com/fw/xbrw4.jpg[/img:39zcjw0q]
[img:39zcjw0q]http://www.atzwanger.com/fw/xbrw3.jpg[/img:39zcjw0q] |
xBrowse - incremental search | Search the string ::lRefreshOnlyData := .T. (2 times) in the method Seek of txBrowse, coment it. |
xBrowse - incremental search | Thank you.
I have verion 07.11 and I can't find lRefreshOnlyData 2 times in the methode.
Regards,
Otto
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if !Empty(::cSeek)
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText("")
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo )
::nRowsel := 1
else
::lRefreshOnlyData := .t.
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
// ::lRefreshOnlyData := .t.
::Super:Refresh(.f.)
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil |
xBrowse - incremental search | Otto,
Use this code:
[code:1t4bnngz]
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if ! Empty( ::cSeek )
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText( "" )
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo,, Self )
::nRowsel := 1
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1 ) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::Super:Refresh( .F. )
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil
[/code:1t4bnngz] |
xBrowse - incremental search | [quote="Otto":4vz3byfx]Thank you.
I have verion 07.11 and I can't find lRefreshOnlyData 2 times in the methode.
Regards,
Otto
METHOD Seek( cSeek ) CLASS TXBrowse
local uBook, uSeek
local nFor, nRows
local lRefresh
if ::bSeek == nil
return nil
endif
If cSeek == nil
if !Empty(::cSeek)
::cSeek := ""
If ::oSeek != nil
::oSeek:SetText("")
Endif
endif
return nil
Endif
uBook := Eval( ::bBookMark )
if !Eval( ::bSeek, cSeek )
Eval( ::bBookMark, uBook )
MsgBeep()
return nil
endif
if ::nRowSel > Eval( ::bKeyNo )
::nRowsel := 1
else
::lRefreshOnlyData := .t. //<======================here
endif
::cSeek := cSeek
uSeek := Eval( ::bBookMark )
nRows := ::nDataRows
lRefresh := .t.
if ::oSeek != nil
::oSeek:SetText( cSeek )
endif
Eval( ::bBookMark, uBook )
Eval( ::bSkip, 1 - ::nRowSel )
for nFor := 1 to nRows
if Eval( ::bBookMark ) == uSeek
lRefresh := .f.
exit
endif
if Eval( ::bSkip, 1) == 0
exit
endif
next
if lRefresh
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
// ::lRefreshOnlyData := .t. //<===================here
::Super:Refresh(.f.)
else
Eval( ::bBookMark, uBook )
::DrawLine( .f. )
::nRowSel := nFor
Eval( ::bBookMark, uSeek )
if ::bChange != nil
Eval( ::bChange, Self )
endif
::DrawLine( .t. )
endif
if ::oVScroll != nil
::VSetPos( Eval( ::bKeyNo,,Self ) )
endif
return nil[/quote:4vz3byfx] |
xBrowse - incremental search | Antonio, thank you this code works.
Regards,
Otto |
xBrowse - lCloseArea | I changed in testmdi8.prg
listbox to xbrowser.
In the original prg there is a method-call lCloseArea.
How can I do that with xBrowser or do I have to write my own function?
Thanks in advance
Otto |
xBrowse - lFastEdit (not respected by browse) | Any key press should trigger edit of a cell only when oBrw:lFastEdit is set to .T.. When lFastEdit is set to false, only pressing Enter key or Double Click should invoke the edit.
Presently xBrowse ignores lFastEdit data and triggers edit on any keypress.
Also only alphanumeric keys only trigger edit. For numeric columns '-' (minus) also should trigger edit.
Suggested modification is to change the following line in Otherwise clause in KeyPress method:
[code:22h5rwo9]
OldCode:
If ::nMarqueeStyle <= MARQSTYLE_HIGHLCELL .and. oCol:nEditType > 0 .and. ;
( IsAlpha( cKey ) .or. IsDigit( cKey ) )
oCol:Edit( nKey )
NewCode:
If ::lFastEdit .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLCELL .and. oCol:nEditType > 0 .and. ;
( IsAlpha( cKey ) .or. IsDigit( cKey ) .or. cKey == '-' )
oCol:Edit( nKey )
[/code:22h5rwo9]
It would be even nicer if the trigger keys are decided on the basis of the valtype of the editvalue. Code would be longer but it is worth.
In addition to Enter and DoubleClick, F2 also may be added to the trigger keys to make xBrowse behave like Excel, which many users are accustomed to. |
xBrowse - lFastEdit (not respected by browse) | > ::lFastEdit ... cKey == '-'
Added. Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse - lUseBtnWidthEditOfCol (NEW) | Hello, Mr. Rao / Antonio,
In some cases I have to increase the width of the button size of the GET. However, when editing, the button disappears. I made this change in class xbrowse, evaluate the interest in putting in the next versions of fivewin.
oBrowse:aCols[1]:nBtnWidth := 30
oBrowse:aCols[1]:nWidth := 160
oBrowse:aCols[1]:cEditPicture := '@!'
oBrowse:aCols[1]:nEditType := EDIT_GET_BUTTON
oBrowse:aCols[1]:lUseBtnWidthEditOfCol := .t.
xbrowse.prg:
CLASS TXBrwColumn
DATA lUseBtnWidthEditOfCol AS LOGICAL INIT .F.
METHOD Edit( nKey ) CLASS TXBrwColumn
...
if ::lUseBtnWidthEditOfCol
nBtnWidth := ::nBtnWidth
else
if ::nBtnBmp > 0 .and. len( ::aBitmaps ) >= ::nBtnBmp // ButtonGet
nBtnWidth := ::aBitMaps[ ::nBtnBmp, BITMAP_WIDTH ] // ButtonGet
else
nBtnWidth := 4
endif
endif
... |
xBrowse - lUseBtnWidthEditOfCol (NEW) | [quote:2y8866cs]However, when editing, the button disappears.[/quote:2y8866cs]
Thanks for pointing out the issue. We notice the problem.
We shall resolve this issue, without even adding new DATA.
You can expect the modification in FWH18.01 |
xBrowse - lUseBtnWidthEditOfCol (NEW) | Yes, thanks |
xBrowse - mensagem na MSGBAR (resolvido) | Amigos, com a TWBROWSE eu utilizava:
obRW:bUpdateBuffer:= {|| UpdateBuffer( oWnd:oMsgBar, cDefaultMsg, oBRW:cBuffer ) }
Para mostrar o conteudo do buffer de pesquisa na MSGBAR, mais no xbrowse como posso obter o mesmo resultado?
Muito obrigado
SGS |
xBrowse - mensagem na MSGBAR (resolvido) | resolvido assim:
obRRW:bChange := {|o| UpdateBuffer( oWnd:oMsgBar, cDefaultMsg, cvaltochar( o:cSeek ) ) }
obrigado Rossine |
xBrowse - multiselect on cells | Is this possible to create browser (xBrowse) with cell multiselect like on picture below?[img:3loiaou9]http://www.frank.pl/fivewin/au3000browser.jpg[/img:3loiaou9]I want to select few cells and highlight they (on left mouse click).Highlited cells (active laboratory test for me) I want to send to another function to create "order list".Any ideas, exaples?Regards |
xBrowse - multiselect on cells | I've found an answerexample source code belowarrays:xTABTMP - array to showxTMPCOLORS - array for define colors--->part of code:For XXX:=1 To Len(xTABTMP) // array for cell colors AADD(aTMPCOLORS,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0})NextoBRWLLPOD := TXBrowse():New( oDLGLLPOD )oBRWLLPOD :SetArray( xTABTMP, .T. ,12 )oBRWLLPOD :aCols[ 1]:cHeader := "Nr"oBRWLLPOD :aCols[ 1]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,1]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 1]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,1]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,1]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 1]:nWidth:=100oBRWLLPOD :aCols[ 2]:cHeader := "Nazwisko"oBRWLLPOD :aCols[ 2]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,2]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 2]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,2]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,2]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 2]:nWidth:=100oBRWLLPOD :aCols[ 3]:cHeader := "Imie"oBRWLLPOD :aCols[ 3]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,3]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 3]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,3]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,3]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 3]:nWidth:=100oBRWLLPOD :aCols[ 4]:cHeader := "Numer"oBRWLLPOD :aCols[ 4]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,4]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 4]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,4]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,4]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 4]:nWidth:=100oBRWLLPOD :aCols[ 5]:cHeader := "Info1"oBRWLLPOD :aCols[ 5]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,5]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 5]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,5]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,5]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 5]:nWidth:=100oBRWLLPOD :aCols[ 6]:cHeader := "Info2"oBRWLLPOD :aCols[ 6]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,6]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 6]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,6]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,6]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 6]:nWidth:=100oBRWLLPOD :aCols[ 7]:cHeader := "Info3"oBRWLLPOD :aCols[ 7]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,7]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 7]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,7]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,7]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 7]:nWidth:=100oBRWLLPOD :aCols[ 8]:cHeader := "Info4"oBRWLLPOD :aCols[ 8]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,8]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 8]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,8]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,8]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 8]:nWidth:=100oBRWLLPOD :aCols[ 9]:cHeader := "Info5"oBRWLLPOD :aCols[ 9]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,9]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 9]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,9]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,9]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[ 9]:nWidth:=100oBRWLLPOD :aCols[10]:cHeader := "Maski"oBRWLLPOD :aCols[10]:bClrStd := {|| { nRGB(0,0,200),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,10]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[10]:bClrSelFocus := {|| { IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,10]=0, nRGB(0,0,200),nRGB(0,0,0) ),IIF( aTMPCOLORS[oBRWLLPOD:nArrayAT,10]=0, nRGB(200,200,200),nRGB(0,200,0) ) } }oBRWLLPOD :aCols[10]:nWidth:=100oBRWLLPOD :nMarqueeStyle := MARQSTYLE_HIGHLCELLoBRWLLPOD :nColDividerStyle := LINESTYLE_DARKGRAYoBRWLLPOD :nRowDividerStyle := LINESTYLE_DARKGRAYoBRWLLPOD :nHeaderHeight :=50oBRWLLPOD :nRowHeight :=50[color=#FF0000:29mzp6h2]// THIS CODE MAKES CELL HIGHLITED[/color:29mzp6h2]oBRWLLPOD :bLClicked:={ | nRow, nCol | IIF(aTMPCOLORS[oBRWLLPOD:nArrayAT,oBRWLLPOD:nColSel]=0,aTMPCOLORS[oBRWLLPOD:nArrayAT,oBRWLLPOD:nColSel]:=1,aTMPCOLORS[oBRWLLPOD:nArrayAT,oBRWLLPOD:nColSel]:=0),oBRWLLPOD:Refresh() }oBRWLLPOD :CreateFromCode()oBRWLLPOD:bKeyDown:={|nKEY| JAKILLPODKEY(nKEY,@xNR_L) }oBRWLLPOD :nTop = 22oBRWLLPOD :nLeft = 0//oBRWLLPOD :nWidth =900//oBRWLLPOD :nHeight =700--->end of coderesult:[img:29mzp6h2]http://www.frank.pl/fivewin/p_main_browser.jpg[/img:29mzp6h2] |
xBrowse - numerical pad on keyboard | the numerical pad returns if you press 1 - > 97 which is the ASC value for the a .
Could someone please help on that.
Regards,
Otto |
xBrowse - numerical pad on keyboard | Otto:
You don't have to use the ASCII code for the keypad keys or the function keys.
You have to use the "Virtual Key" value provided in the VKEY.CH (linked automatically with Fivewin.ch).
In VKEY.CH you will find the value for the numeric key pad.
Greetings from Argentina |
xBrowse - numerical pad on keyboard | Hello Rene,
are you on holidays in Argentina or working?
Do you have a code sample how to use “virtual key”?
Why does xBowse return other values than wbrowse.
As far as I understand both inherit from TControl and the method keydown is
the same in xBrowse than in wbrowse.
Regards,
Otto |
xBrowse - numerical pad on keyboard | Otto,
If you do oXBrowse:bKeyDown = { | nKey | MsgInfo( nKey ) } and press 1 on the numeric keypad, then you get 97 which it is from vkey.ch:
#define VK_NUMPAD1 97 |
xBrowse - numerical pad on keyboard | THank you, Antonio,
Now I understand. For the small a do I have to check the “Cap look” state?
----------------------------------
But I don’t understand why these to browsers have different values.
Method keydown filters out some keys and passes if there is no hit the value
to:
return Super:KeyDown( nKey, nFlags )
which I think is the attached window?
Maybe someone can explain this. Thanks in advance. |
xBrowse - numerical pad on keyboard | Otto,
>
return Super:KeyDown( nKey, nFlags )
which I think is the attached window?
>
It is not the attached window. Its the Method KeyDown() from its parent Class TControl. |
xBrowse - oBrw:nMarqueeStyle | Hello,
Today I tested the different MARQSTYLE styles.
Best regards
Otto
[b:2w5osnqj]xBrowse.ch[/b:2w5osnqj]
#define MARQSTYLE_NOMARQUEE 0
#define MARQSTYLE_DOTEDCELL 1
#define MARQSTYLE_SOLIDCELL 2
#define MARQSTYLE_HIGHLCELL 3
#define MARQSTYLE_HIGHLROWRC 4
#define MARQSTYLE_HIGHLROW 5
#define MARQSTYLE_HIGHLROWMS 6
#define MARQSTYLE_HIGHLWIN7 7
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip2.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip3.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip4.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip5.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip6.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip7.jpg[/img:2w5osnqj]
[img:2w5osnqj]https://mybergland.com/FWForum/MARQSTYLE_Clip8.jpg[/img:2w5osnqj] |
xBrowse - posicionar en fila específica | [code=fw:1tlmlvyq]<div class="fw" id="{CB}" style="font-family: monospace;">soBrw:<span style="color: #000000;">nRowSel</span>:=nYourRequiredRowPositonNo</div>[/code:1tlmlvyq]
Regards
[b:1tlmlvyq]Anser[/b:1tlmlvyq] |
xBrowse - posicionar en fila específica | Estimados;
como le digo que no se posicione en la primer fila del browse, sino en una fila específica.
Estoy editando un archivo de texto
[code=fw:2x2q3uaq]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">0</span>,nCol <span style="color: #0000ff;">XBROWSE</span> soBrw COLUMNS <span style="color: #ff0000;">"cLine"</span> <span style="color: #0000ff;">OF</span> soWnd0 OBJECT oHisLog <span style="color: #0000ff;">SIZE</span> soSplit:<span style="color: #000000;">nLast</span>,soWnd0:<span style="color: #000000;">nHeight</span> <span style="color: #0000ff;">PIXEL</span><br /> </div>[/code:2x2q3uaq]
gracias |
xBrowse - posicionar en fila específica | Mario intenta asi:
[code=fw:27zgybh1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> soBrw:<span style="color: #000000;">bStart</span>:=<span style="color: #000000;">{</span> || soBrw:<span style="color: #000000;">Skip</span><span style="color: #000000;">(</span>nLineas<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:27zgybh1]
Saludos,
Adhemar |
xBrowse - posicionar en fila específica | Ademar, gracias
Anser, thanks
I write in spanish because my english is so poor
Usando la propuesta de Ademar:
[code=fw:69xu1il9]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">// Vista del Histórico</span><br /> @ <span style="color: #000000;">0</span>,nCol <span style="color: #0000ff;">XBROWSE</span> soBrw COLUMNS <span style="color: #ff0000;">"cLine"</span> <span style="color: #0000ff;">OF</span> soWnd0 OBJECT oHisLog <span style="color: #0000ff;">SIZE</span> soSplit:<span style="color: #000000;">nLast</span>,soWnd0:<span style="color: #000000;">nHeight</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> WITH OBJECT soBrw<br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> :<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;">cHeader</span>:= shIni<span style="color: #000000;">[</span><span style="color: #ff0000;">"CAMINOS"</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"backdown"</span><span style="color: #000000;">]</span>+<span style="color: #ff0000;">"<span style="color: #000000;">\"</span>+::cHistorico<br /><br /> :CreateFromCode()<br /> :bStart:={ || soBrw:Skip(8) }<br /> //:nRowSel:= 8<br /> END<br /><br /> soBrw:Refresh()<br /> soBrw:SetFocus()<br /> soWnd0:oClient:= soBrw<br /></span></div>[/code:69xu1il9]
entonces se ve así:
[img:69xu1il9]http://img819.imageshack.us/img819/161/xbrw5.png[/img:69xu1il9]
O sea el puntero se ubica en una fila distinta de la 8.
Por curiosidad probé asignando otro valor (4), y el puntero vuelve a salir en la misma fila de la imagen.
Por otro lado si muevo el puntero con las teclas de flecha, el repintado es incorrecto (a mi parecer la primer fila se re rebuja debajo de la fila 4)
[img:69xu1il9]http://img16.imageshack.us/img16/8823/xbrw6.png[/img:69xu1il9]
Por otro lado, si no incluyo el :Refresh(), el puntero se posiciona en la primer fila
Si uso la DATA propuesta por Anser;
[code=fw:69xu1il9]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT soBrw<br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> :<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;">cHeader</span>:= shIni<span style="color: #000000;">[</span><span style="color: #ff0000;">"CAMINOS"</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"backdown"</span><span style="color: #000000;">]</span>+<span style="color: #ff0000;">"<span style="color: #000000;">\"</span>+::cHistorico<br /><br /> :CreateFromCode()<br /> //:bStart:={ || soBrw:Skip(8) }<br /> :nRowSel:= 8<br /> END<br /><br /> //soBrw:Refresh()<br /> soBrw:SetFocus()<br /> soWnd0:oClient:= soBrw<br /></span></div>[/code:69xu1il9]
El browse se ve así:
[img:69xu1il9]http://img515.imageshack.us/img515/4595/xbrw4.png[/img:69xu1il9]
Aquí si muevo el puntero por fuera de la ventana, entonces se redibuja y el puntero pasa a la primer fila
Y si me muevo con las teclas de flechas, tambien se desordena el repitando repitiendo la primer fila
En sintesis, ninguna de las opciones son para usarlas segun mis pretensiones y, en mi opinión, xBrowse tiene algun problema para el caso planteado
saludos y buen finde! (enjoy weekend) |
xBrowse - posicionar en fila específica | [quote="MarioG":3tscff74]Aquí si muevo el puntero por fuera de la ventana, entonces se redibuja y el puntero pasa a la primer fila
Y si me muevo con las teclas de flechas, tambien se desordena el repitando repitiendo la primer fila
[/quote:3tscff74]
Please try this sample.
[code=fw:3tscff74]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"xBrowse.ch"</span><br /><br /><span style="color: #B900B9;">//------------------//</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> oWnd,oBrw,aText:=<span style="color: #000000;">{</span><span style="color: #000000;">}</span>,i<br /> <br /> <span style="color: #00C800;">For</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">20</span><br /> aAdd<span style="color: #000000;">(</span>aText,<span style="color: #000000;">{</span><span style="color: #ff0000;">"This is Line "</span>+Ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>i<span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span><br /><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd ARRAY aText <span style="color: #0000ff;">PIXEL</span><br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span> <br /> :<span style="color: #000000;">nRowSel</span>:=<span style="color: #000000;">8</span><br /> END<br /> <br /> oWnd:<span style="color: #000000;">oClient</span>:= oBrw <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span> </div>[/code:3tscff74]
Regards
[b:3tscff74]Anser[/b:3tscff74] |
xBrowse - posicionar en fila específica | Anser; thanks!
Is the solution
regards |
xBrowse - scroll horizontal | Buenas tardes,
Estoy usando la xbrowse (antes hacía esto con la TWBrowse de HC).
La cuestión es que al mover el mouse wheel sobre el listbox, el listado se mueve verticalmente pero al mover al mouse wheel sobre la barra de scroll horizontal, el listado NO SE MUEVE HORIZONTALMENTE como sí lo hace con la TWBrowse de HC.
¿Es posible lograr esto con la xBrowse?
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - scroll horizontal | Buen día,
¿Alguna idea?
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - sobre uso de WITH OBJECT oBrw:TextoColumna | Gente:
En mi forma de ver, trabajar con WITH OBJECT ... me resulta muy prolijo y claro al momento de revisar codigo.
Aunque me encuentro con este pequeño problema; si defino pro ejemplo:
@ 0,0 XBROWSE oBrw ;
COLUMNS "State", "City", "First", "Married", "HireDate", "Age", [b:39216oh6]"Salario Mensual"[/b:39216oh6], "Last" ;
....
luego no puedo definir WITH OBJECT para la columna resaltada, usando dicho nombre; o si?, como?
obviamente, quiero decir, basado en el nombre de la columna; se que lo podría remplazar por: oBrw:aCols[ 7 ]
o esta es la única manera?
muchas gracias |
xBrowse - sobre uso de WITH OBJECT oBrw:TextoColumna | Hola Mario,
compartimos el gusto por el uso del With Object. El problema es que al usar comandos nunca declarás ningun objeto de forma que lo puedas referenciar directamente. Fijate como estan los comandos GET que te permiten incluir el objeto del control, con lo cual despues uno lo puede manipular. En el caso de las columnas, si declaras todo con el comando XBROWSE se te va a complicar.
En lo personal las declaraciones de XBrowse siempre las hago con WITH OBJECT:
[code=fw:3cqki4i8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> With Object oBrowse:= TXBrowse<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oDlg <span style="color: #000000;">)</span><br /><br /> :<span style="color: #000000;">lHScroll</span>:= .F.<br /> :<span style="color: #000000;">lVScroll</span>:= .F.<br /> :<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">(</span> <span style="color: #000000;">1200</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cAlias</span>:= <span style="color: #ff0000;">"Asientos"</span><br /> End With<br /><br /> With Object <span style="color: #000000;">(</span> oCol := oBrowse:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">'Código'</span><br /> :<span style="color: #000000;">bStrData</span> := ;<br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span>|| Asientos->CodigoP <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span>| oGet, uVal | AsientosValidaCuenta<span style="color: #000000;">(</span> oGet, uVal <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>| o, x | Field->CodigoP:= x, SumaAsientos<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">AddResource</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"I16_FLASH"</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">90</span><br /> :<span style="color: #000000;">nEditType</span><span style="color: #000000;">(</span> EDIT_GET_BUTTON <span style="color: #000000;">)</span><br /> EndWith<br /> With Object oCol := oBrowse:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">'Concepto'</span><br /> :<span style="color: #000000;">bStrData</span> := ;<br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span>|| Asientos->Concepto <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span>| oGet, uVal | AstoValidaConcepto<span style="color: #000000;">(</span> oGet, uVal, aConce, cConcepto <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>| o, x | Field->Concepto:= x <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">419</span><br /> :<span style="color: #000000;">nEditType</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> EndWith<br /><br /> </div>[/code:3cqki4i8]
Así siempre tenemos todo el control.
Si la idea es referenciar a la columna por el Header, podrías hacerte una funcioncita que busque un Header en aCols... |
xBrowse - sobre uso de WITH OBJECT oBrw:TextoColumna | Gracias Carlos
Encontré, en los samples, columnas referenciadas por si titulo y me resultó muy claro, como dije, a la hora de ubicar para una corrección o, pasado el tiempo, para hacer algún tipo de cambio.
Obviamente que rapidamente choque con las palabras acentuadas o, como expresé palabras compuestas.
Sin dudas que un código como el que mostrás es de lo mas 'limpio' y legible... no voy a seguir para que no te pongas <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
<!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Saludos |
xBrowse - tooltip sobre botón EDIT_GET_BUTTON | Buenas tardes,
Uso en la xbrowse el modo EDIT_GET_BUTTON y me interesa que al pasar el mouse sobre el botón dentro de la celda, se muestre un tooltip pero no logro hacerlo.
¿Alguien sabe como puedo implementarlo?.
Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - tooltip sobre botón EDIT_GET_BUTTON | ACTIVATE DIALOG oDlg ON INIT ( oBrw:aCols[ n ]:oBtnElip:cToolTip := <your tool tip> ) |
xBrowse - tooltip sobre botón EDIT_GET_BUTTON | Muchas gracias,
Funciona perfecto.
Saludos.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse - tooltip sobre botón EDIT_GET_BUTTON | Gracias por el tips, muy beneficioso e informativo, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse - twbrowse de Hernan | Amigos:
Alguien sabe si es compatible el xBrowse con el browse de HDC
Como hago para seleccionar varios registros que no estan seguidos
en un xBrowse.
Muchas gracias
Ruben Fernandez |
xBrowse - una mejora a los encabezados | Hola a Todos.
Tengo una sugerencia para los "maestros", si es posible o como se puede hacer para cambiar el triangulito de los encabezados ( header ) para ordenar los datos de una columan del xbrowse.
Lo que sucede es que muchos usuarios son cortos de vista, y el triangulo no lo ven, es muy pequeño y de color similar.
a) Se puede aumentar su tamaño.
2) o Se puede poner un bmp para visualizarlo mejor.
Cualquier comentario es welcome.
Les adjunto una imagen del porblema:
[url:3fmxpa6u]http://img225.imageshack.us/my.php?image=barra1dt2.png[/url:3fmxpa6u]
Saludos |
xBrowse - una mejora a los encabezados | Hola Juan,
puedes ponerle el BMP que tu desees en la cabecera, usando uno de los siguientes metodos AddResource, AddBmpFile o AddBmpHandle. |
xBrowse - una mejora a los encabezados | Gracias Biel por responder, lo voy a estudiar, para ver si es lo que necesito.
Yo deseo que el triangulito cambie por un bmp , y sea el mismo para todas las columnas.
Si puedo hacerlo, les cuento.
Saludos, |
xBrowse - update | Hello Daniel,
would you be so kind to show me how to update the xbrowse in my special case.
I select some rows and press the button to start the function: Backuploeschen(oBrw)
But I don’t find an easy way to update the xbrowse. The code below is working but a 2. array seems a little time-consuming.
[quote:22rs7ezs] FUNCTION Backuploeschen(oBrw)
local I := 0
local aTemp := {}
local nreturn := 0
For I := 1 to len(aTageSort)
aadd( aTemp, { aTageSort[ I ][ 1 ] ,;
aTageSort[ I ][ 2 ],;
aTageSort[ I ][ 3 ],;
aTageSort[ I ][ 4 ],;
aTageSort[ I ][ 5 ],;
aTageSort[ I ][ 6 ] } )
next
for I := 1 to Len( aTemp )
if aTemp[ I,1 ] = .t.
// DELETEDIR( Setup():cWHBackup + '\' + aTemp[ I ][ 4 ] )
nreturn := ASCAN( aTageSort, { |a,b,c,d,e,x| x == aTemp[ I ][ 6 ] } )
ADel( aTageSort, nreturn )
ASize( aTageSort, Len( aTageSort ) - 1 )
oBrw:Refresh()
oBrw:GoTop()
oBrw:Refresh()
endif
next
msginfo("Verzeichnisse gelöscht")
RETURN( NIL )
//----------------------------------------------------------------------------//[/quote:22rs7ezs]
[img:22rs7ezs]http://www.atzwanger-software.com/fw/xbrwupdate.jpg[/img:22rs7ezs] |
xBrowse -> Footers Calculo de totales de esa columna?? | Amigos:
Disculpen otra vez la lata con xBrowse...
necesito saber como calculo el total de cada columna de un xBrowse
para colocarla en los footers.
Muchas gracias.
Ruben Fernandez. |
xBrowse -> Footers Calculo de totales de esa columna?? | En este listbox, pongo los nombres de los conductores, la suma de los importes mensuales en cada columna, y en los footers, los totales por mes.
A ver si te sirve
[code:25tsp6m4] @ 30,0 LISTBOX oLbx FIELDS (aAlias[26])->Codigo,;
(aAlias[26])->Nombre,;
transform(((aAlias[26])->CO01+(aAlias[26])->CR01),Publicas:cPic),;
transform(((aAlias[26])->CO02+(aAlias[26])->CR02),Publicas:cPic),;
transform(((aAlias[26])->CO03+(aAlias[26])->CR03),Publicas:cPic),;
transform(((aAlias[26])->CO04+(aAlias[26])->CR04),Publicas:cPic),;
transform(((aAlias[26])->CO05+(aAlias[26])->CR05),Publicas:cPic),;
transform(((aAlias[26])->CO06+(aAlias[26])->CR06),Publicas:cPic),;
transform(((aAlias[26])->CO07+(aAlias[26])->CR07),Publicas:cPic),;
transform(((aAlias[26])->CO08+(aAlias[26])->CR08),Publicas:cPic),;
transform(((aAlias[26])->CO09+(aAlias[26])->CR09),Publicas:cPic),;
transform(((aAlias[26])->CO10+(aAlias[26])->CR10),Publicas:cPic),;
transform(((aAlias[26])->CO11+(aAlias[26])->CR11),Publicas:cPic),;
transform(((aAlias[26])->CO12+(aAlias[26])->CR12),Publicas:cPic),;
transform(((aAlias[26])->Tot),Publicas:cPic);
HEADER " Código ","Nombre"," Enero "," Febrero "," Marzo "," Abril "," Mayo "," Junio "," Julio "," Agosto "," Sepbre "," Octubre "," Novbre "," Dicbre "," Total ";
FIELDSIZES 35,200,52,52,52,52,52,52,52,52,52,52,52,52,52;
ALIAS aAlias[26];
CURSOR oCurdedo;
COLOR CLR_BLACK, nRGB(226,226,208) ;
ON LEFT DBLCLICK (iif(!(aAlias[26])->(eof()) .and. Publicas:cAccesoM,(cTitulo:="Modificación de Conductores ",Enconduc(cTitulo,"M",aAlias,aoDbf),oLbx:Refresh()),.T.));
OF oDlg;
PIXEL
oLbx:nLineStyle := 1
oLbx:nClrBackHead := RGB(248,191,36)
oLbx:lDrawFooters:= .T.
oLbx:aFooters := {"", "Total por Mes.....", Trans(Publicas:tMes[1],Publicas:cPic ), Trans(Publicas:tMes[2],Publicas:cPic ), Trans(Publicas:tMes[3],Publicas:cPic ), Trans(Publicas:tMes[4],Publicas:cPic ),;
Trans(Publicas:tMes[5],Publicas:cPic ), Trans(Publicas:tMes[6],Publicas:cPic ), Trans(Publicas:tMes[7],Publicas:cPic ), Trans(Publicas:tMes[8],Publicas:cPic ), ;
Trans(Publicas:tMes[9],Publicas:cPic ), Trans(Publicas:tMes[10],Publicas:cPic ), Trans(Publicas:tMes[11],Publicas:cPic ), Trans(Publicas:tMes[12],Publicas:cPic ),Trans(Publicas:ntotal,Publicas:cPic )}
oLbx:bKeyChar := { | nKey, nFlags | ;
iif (nKey == 43 .or. nKey == 65 .or. nKey == 97,;
(Enconduc(cTitulo,"A",aAlias,aoDbf), oLbx:Refresh()), ),;
iif (nKey == 66 .or. nKey == 98,;
(Borrar(aAlias[26],(aAlias[26])->nombre,'Conductor nombre: '),oLbx:UpStable(), oLbx:Refresh()), ),;
iif (nKey == 77 .or. nKey == 109, ;
(Enconduc(cTitulo,"M",aAlias,aoDbf),oLbx:Refresh() ), ) }
oLbx:nClrPane:={||iIF((oLbx:cAlias)->(OrdKeyNo())%2==0,nRGB(242,247,252),nRGB(226,226,208))}
oLbx:nClrfBack := RGB(196,229,244)//(3,187,85)
oLbx:aJustify := {.T.,.F.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.}
oLbx:aHJustify := {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}
OlBX:nFooterStyle:=11[/code:25tsp6m4]
Saludos
Jose Luis |
xBrowse -> Footers Calculo de totales de esa columna?? | Gracias Jose Luis...
Pero... lo quiero hacer con xbrowse.
Saludos
Ruben Fernandez. |
xBrowse -> Footers Calculo de totales de esa columna?? | Con xBrowse, cFooter es un valor estatico, al igual que cHeader.
Yo añadi un data a la clase TXBrwColumn, el data bStrFooter, que contiene un codeblock que nos debe retornar lo que queremos visualizar en el pie de la columna.
Hay que modificar el metodo PaintFooter, y en la linea donde asigna valor a cFooter cambiarla por la siguiente.
[code:a5vkzbhr]cFooter := IF(::bStrFooter==NIL,::cFooter,Eval( ::bStrFooter )) //Biel[/code:a5vkzbhr]
El codigo para definir la columna
[code:a5vkzbhr]
oCol:=oBrw:AddCol()
oCol:bStrData:= {|| oDbf:Campo }
oCol:cHeader := 'Cabecera'
oCol:bStrFooter:={||VisTot()}
[/code:a5vkzbhr]
Espero te sirva por lo menos como aproximacion para hacer lo que quieres. |
xBrowse -> Footers Calculo de totales de esa columna?? | Gracias Biel...
Quedo trabajando en ello.
Saludos
Ruben Fernandez. |
xBrowse -> Footers Calculo de totales de esa columna?? | Buenisimo, se podrá implementar en la clase original de FWH? asi no tenemos que modificarla en cada actualizacion.
Gracias |
xBrowse -> Footers Calculo de totales de esa columna?? | Contento de que os haya servido.
Como todos mis aportes al foro, esta a disposicón de Antonio para ser incluido en la clase original. |
xBrowse -> Footers Calculo de totales de esa columna?? | El tema es que usando una ventana child, los footers quedan muy abajo y no se ven. Alguna idea de como subirlos? |
xBrowse -> Footers Calculo de totales de esa columna?? | Ejemplo en la segunda ventana que está debajo:
Los footers estàn, pero no se ven...
[img:hbhefmoi]http://img155.imageshack.us/img155/9377/schermatawinprogresskc8.jpg[/img:hbhefmoi]
By [url=http://profile.imageshack.us/user/pymsoft:hbhefmoi]pymsoft[/url:hbhefmoi] at 2007-10-15 |
xBrowse -> Footers Calculo de totales de esa columna?? | Hola Pedro,
No he podido revisar el codigo fuente, me pillas que me estoy yendo de vacaciones unos dias a Barcelona. De todas formas, los footer, cuando hay valor en ellos, siempre debieran estar visibles.
[url=http://imageshack.us:330d9i7n][img:330d9i7n]http://img80.imageshack.us/img80/8931/screenly8.jpg[/img:330d9i7n][/url:330d9i7n] |
xBrowse -> Footers Calculo de totales de esa columna?? | Gracias por tu tiempo, veo que a ti te funciona, se ve que hago algo mal.
Saludos y buenas vacaciones. |
xBrowse -> Footers Calculo de totales de esa columna?? | Bueno, ahora funciona.
lo unico que hice, fue poner uno de los footers como texto fijo
oCol:cFooter := "Totali:"
y ahora muestra todos. |
xBrowse -> Footers Calculo de totales de esa columna?? | Antonio,
Se podrán implementar las modificaciones hechas por Biel para xbrowse, asi no hay que modificar la clase cada vez que actualizamos?
gracias
P.D. Hice las modificaciones en la xbrowse incluida en FWH0711 para poder poner los footers, pero no me muestra el estilo 2007, por lo que supongo que lo que descargué es anterior a las librerias que me enviaste mas tarde. |
xBrowse -> Footers Calculo de totales de esa columna?? | Biel,
> Yo añadi un data a la clase TXBrwColumn, el data bStrFooter, que contiene un codeblock que nos debe retornar lo que queremos visualizar en el pie de la columna.
Implementado como bFooter, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse -array - how to add del and select an item? | Hello Antonio,
Could you please post an example for:
xBrowser - ARRAY
Add, Del, Select a Item
Thanks in advance
Otto
???? does not work:
@ 300, 25 BUTTON "&Add" OF oChild PIXEL ;
ACTION ( AAdd( aStruc, Time() ), oBrw:Refresh() )
@ 300, 125 BUTTON "&SELECT" OF oChild PIXEL ;
ACTION (oBrw:Select(2) ) |
xBrowse -array - how to add del and select an item? | Otto,
Here you have samples\mallorca.prg modified with your requirements. Right click on it to show a popup menu:
[code:2f52k385]
# INCLUDE "FiveWin.ch"
# INCLUDE "XBrowse.ch"
//-------------
FUNCTION Main()
//-------------
LOCAL oWnd,aLin:={},i,oBrw
FOR i:=1 TO 6
AAdd(aLin,{i,'Descripción '+Str(i)})
NEXT
DEFINE WINDOW oWnd
//--Definición Objeto TxBrowse
oBrw:=TxBrowse():New(oWnd)
oBrw:SetArray(aLin)
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:aCols[1]:cHeader := 'Cod'
oBrw:aCols[1]:cEditPicture := '@k 99'
oBrw:aCols[1]:bClrEdit := oBrw:bClrStd
oBrw:aCols[1]:bOnPostEdit := {|o,x| aLin[ oBrw:nArrayAt,1] := x }
oBrw:aCols[1]:nEditType := EDIT_GET
oBrw:aCols[1]:bEditValid := {|oGet| Valida( oGet ) } //<========
//--
oBrw:aCols[2]:cHeader := 'Descripción'
oBrw:aCols[2]:bClrEdit := oBrw:bClrStd
oBrw:aCols[2]:bOnPostEdit := {|o,x| aLin[ oBrw:nArrayAt,2] := x }
oBrw:aCols[2]:nEditType := EDIT_GET
//--
oBrw:CreateFromCode()
oBrw:bRClicked = { | nRow, nCol | ShowPopup( nRow, nCol, oBrw, aLin ) }
oWnd:oClient:=oBrw
ACTIVATE WINDOW oWnd
RETURN NIL
//-----------------------------------
STATIC FUNCTION Valida( oGet )
//-----------------------------------
LOCAL lValRet:=.T.
local bValid := oGet:bValid
local nVal := oGet:Value()
oGet:bValid = nil
IF nVal>6
// MsgAlert('No puede ser mayor que 6')
lValRet:=.f.
ENDIF
oGet:bValid = bValid
RETURN lValRet
function ShowPopup( nRow, nCol, oBrw, aLin )
local oMenu
MENU oMenu POPUP
MENUITEM "Add" ACTION ( AAdd( aLin, { AllTrim( Str( Len( aLin ) + 1 ) ), "New item" } ), oBrw:SetArray( aLin ), oBrw:Refresh() )
MENUITEM "Del" ACTION ( ADel( aLin, oBrw:nArrayAt ), ASize( aLin, Len( aLin ) - 1 ), oBrw:SetArray( aLin ), oBrw:Refresh() )
MENUITEM "Select" ACTION ( oBrw:GoTop(), oBrw:nArrayAt := 3, oBrw:Refresh() )
ENDMENU
ACTIVATE POPUP oMenu WINDOW oBrw AT nRow, nCol
return nil
[/code:2f52k385] |
xBrowse -array - how to add del and select an item? | I would like to bring to notice some major problems with inline Edit in TxBrowse. In the above example input of a number greater than 6 is invalid and should be rejected.
Case-1
-----------
Enter 7 in the first column and pess Enter. As expected the valid clause does not accept it. Then press 'Esc' key. The edit accepts 7 and writes 7. Valid clause is not honoured.
Case-2
------------
Now press any key on any cell. Edit is invoked. If we decide not to modify the value only option as a user for us to press Esc. Now press Esc. Edit writes '0' for numeric and blank for Character fields.
Case-3
------------
In Case-2, invoke edit, enter partly and click on any other cell or click outside the window. Even an invalid value is written.
As it is, it is not safe to use the inline edit features of xbrowse in real applications. |
xBrowse -array - how to add del and select an item? | Nageswararao,
> As it is, it is not safe to use the inline edit features of xbrowse in real applications.
Yes, you are right, we need to fix those wrong behaviors. |
xBrowse -array - how to add del and select an item? | A few quick suggestions, though a lot more is need to be done. This is to atleast ensure that invalid and unintended values are not written to the data.
1. bPostEdit block receives three paramters. ( oCol, uValueEntered, oGet'snLastkey). Programmer should write bPostEditBlock to write changes to the database after checking the nLastKey. Safe to write data when the 3rd parameter nLastKey == VK_ENTER. In the above example the postedit block would be :
[code:1hfvtupq]
oBrw:aCols[1]:bOnPostEdit := {|o,x,n| if ( n == 13, aLin[ oBrw:nArrayAt,1] := x, ) }
[/code:1hfvtupq]
2. While this is what the programmer has to do, this does not solve the problem, because due the way CancelEdit method is written, bPostEdit is always called with VK_RETURN as the last key even though the Get is exited by Escape or losing focus. A fix in CancelEdit method is required;
[code:1hfvtupq]
if oCol:oEditGet != nil
// The nexline should be commented out
// oCol:oEditGet:nLastKey := VK_RETURN
oCol:PostEdit()
endif
[/code:1hfvtupq]
3. Now the PostEdit block is expected to be called with the real oGet's last key. If the user exited with Escape or by losing focus of get, VK_ENTER is not expected to be the last key as seen by the PostEdit block.
Still there is a problem in some cases. User enters invalid value and presses Enterkey. Valid Block does not allow the input. User wants to give up and clicks on another cell so that get loses its focus. Then also PostEdit block is called and in this case the last key is VK_ENTER. When Get is created get's bLostFocus is set to {||::PostEdit()}. So when the get loses focus it calls PostEdit method without parameters. This call to postedit does not go through CancelEdit method.
A suggested fix is :
[code:1hfvtupq]
while initializing the Get:
::oEditGet:bLostFous := {|| PostEdit(nil,nil, VK_ESCAPE)} // can be any value to indicate loss of focus.
PostEdit method:
method postedit( xValue, lButton, nLastKey )
...
..
..
case ::nEditType == EDIT_GET
If ::oEditGet != nil
// insert the following 3 lines
if nLastKey != nil
::oEditGet:nLastKey := nLastKey
endif
[/code:1hfvtupq]
With these changes I could prevent writing of invalid data. By abundant caution I am once again checking bValidBlock within PostEdit block, which will not be necessary once the edit behaviour is fully rectified.
Still I have a problem and not able to find a solution. Enter an invalid value and press enter. Later with escape key or losing focus, exit edit ( atleast user thinks he exited the edit ). But I find that the GetObject is still there. When we navigate back to that cell, Get is shown again. Yet to find what to do for this.
This discussion is limited to single line edit in case of nEditType = 1 only. I have not mentioned the problems with edittypes 2 and above.
Hope we can get xBrowse with inline edit that can be used in real applications with 7.12 |
xBrowse -array - how to add del and select an item? | We'd changed xbrowse' nedittype from 'N' to 'B' type, so to fit dynamic lWhen clause .
Shuming Wang |
xBrowse -array - how to add del and select an item? | Mr ShumingWang
Have you modified xbrowse's Edit method to make it reliable? If so can you share your logic please? |
xBrowse -array - how to add del and select an item? | Can you please share a latest example for it? |
xBrowse -array - how to add del and select an item? | Otto,
Thanks to Rao I made a small class to Filter on Xbrowse , working from the Xbrarray.prg
I hope you need it to Kown how add ,del , an item on array |
xBrowse -array - how to add del and select an item? | We don't need anything.
Now xbrowse works the best even on arrays too. |
xBrowse -array - how to add del and select an item? | GOOD |
xBrowse -ordenar array de fechas - Solucionado | Buen día,
Estoy teniendo un problema con el orden de fechas en xBrowse.
Antes de hojear, armo un array conteniendo, entre otros datos, tres columnas de fechas. En todas las de fecha tengo problemas para ordenar cuando se presiona sobre la cabecera.
Mi código sintetizado es así:
[code=fw:18tiq01e]<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;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"FECHA IN"</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || aArray<span style="color: #000000;">[</span>oBrw:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">18</span><span style="color: #000000;">]</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// oBrw12:nArrayAt, 1</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">235</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cTooltip</span> :=<span style="color: #ff0000;">"Clickear una vez con el izquierdo para ordenar por FECHA INGRESO"</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">18</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nEditType</span> := EDIT_NONE</div>[/code:18tiq01e]
Destaco que probé cargando en el array, las fechas en formado caracteres y en formato fecha y siempre son los mismos resultados.
Por ejemplo, si tengo tres fechas 11/11/2010, 10/12/2009 y 15/10/2009, las ordena siempre por los dos primeros caracteres y queda así:
10/12/2009
11/11/2010
15/10/2009
La consulta es ¿como hago para ordenar dentro del xbrowse una columna de fecha de un array?
Por cualquier ayuda, Gracias.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse -ordenar array de fechas - Solucionado | Hola,
lo interesante del xBrowse es que la visualización puede ser una y la información otra, entonces puedes almacenar las fechas en el array yyyy/mm/dd, de manera que se puedan ordenar correctamente y en el bloque de visualización aplicas una función de transformación al formato de fecha que deseas mostrar.
Creo que puede servir esto, tendrías que probar
saludos
Marcelo |
xBrowse -ordenar array de fechas - Solucionado | Marcelo,
Gracias por responder.
Lo solucioné. En parte el problema era mío porque armaba el array con dtoc(dFecha) y, de ese modo no ordena por fecha porque NO es una fecha sino una cadena de caracteres. Eso lo había notado previamente a realizar la consulta en el foro y lo había corregido pero la falla de ordenado seguía.
Revisando el código nuevamente, me percato que en el array pongo, además de las fechas, muchos datos que luego no son mostrados en el xbrowse, estos datos están antes que las fechas y, pese a que hago un hide() a esas columnas, si bién no se muestran, parece que a la hora de ordenar, en realidad no ordenaba por la columna de la fecha en la que presionaba sobre su header, sino que lo hacía por la columna "real" del array que estaba ocultada con hide() en xbrowse.
No sé si será una cuestión del xBrowse o srá algún otro bug en mi programa pero lo solucioné definitivamente armando el array con los datos a mostrar en el orden que se mostrarán y luego, al final los datos que no se mostrarán. Ej:
Antes:
[code=fw:3gwj5n4k]<div class="fw" id="{CB}" style="font-family: monospace;">aHojear:=<span style="color: #000000;">{</span>cNombre,cNO_SE_MUESTRA,dFecha1<span style="color: #000000;">}</span></div>[/code:3gwj5n4k]
Ahora:
[code=fw:3gwj5n4k]<div class="fw" id="{CB}" style="font-family: monospace;">aHojear:=<span style="color: #000000;">{</span>cNombre,dFecha1,cNO_SE_MUESTRA<span style="color: #000000;">}</span></div>[/code:3gwj5n4k]
Así funciona ok.
Saludos.
Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse .. start column 2 | To All
I have created column 1 that puts line numbers in my browse .. I do not want the cursor to go into column 1 and always want to start at column 2.
Is there a setting that does not allow navigation into a specific column ?? in my case, Column 1?
Thanks
Rick Lipkin
[url=http://imageshack.us/photo/my-images/826/column1.jpg/:2bxrglrw][img:2bxrglrw]http://img826.imageshack.us/img826/6931/column1.jpg[/img:2bxrglrw][/url:2bxrglrw] |
xBrowse .. start column 2 | Rick:
Try
[quote:kue92kyx]
oBrw:nFreeze := 1
[/quote:kue92kyx]
Regards |
xBrowse .. start column 2 | Armando
Thank you for your suggestion .. I did try that and the column freezes as you move to the right .. but navigation into the number column ( column 1 ) still exists <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
I was hoping there was an oCOl method that would keep you from navigating into a specific column .. in my case .. column 1.
Rick Lipkin |
xBrowse .. start column 2 | try
oBrw:NColsel(2)
Stefano |
xBrowse .. start column 2 | As of now, there is no way to prevent user from navigating to any visible column. |
xBrowse 10.08 | Is in FiveWin.lib the same xBrowse.prg than in source?
If I link in xBrowse.prg I get no error.
If I link with 10.08 I get clicking on a header following error:
Best regards,
Otto
Application
===========
Path and name: C:\xwinhotel\xkbuch.EXE (32 bits)
Size: 2,748,416 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 10.09.2010, 20:27:07
Error description: Error BASE/1004 Message not found: TXBROWSE:ALIAS
Stack Calls
===========
Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR(166)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ALIAS(7322)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:SETORDER(10754)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:HEADERLBUTTONUP(9601)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LBUTTONUP(3202)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1489)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(11035)
Called from: .\source\classes\WINDOW.PRG => _FWH(3393)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(978)
Called from: C:\WINHOT~4\xkbuch\source\MAINWND.PRG => MAINWND(50)
Called from: C:\WINHOT~4\xkbuch\source\xkbuch.prg => MAIN(27) |
xBrowse 10.08 | The error is there both in the build and in the source.
In line 10754,
::oBrw:Alias
should be changed as
::oBrw:cAlias
You may not get this error when the column is defined as part of XBROWSE command, but in case of column(s) added by oBrw:AddCol() or ADD TO oBrw. Can you confirm this please? |
xBrowse 10.08 | Hello Mr. Rao,
thank you. I changed the source and now all is working.
Best regards,
Otto |
xBrowse 10.08 | Hello Antonio,
would you be so kind to post a new lib-file. Thanks in advance
Otto |
xBrowse 10.08 | Otto,
We are working to solve a default button action with SkinButtons and then we may publish a new build,
thanks for the waiting <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse 10.08 | Otto,
We are working to solve a default button action with SkinButtons and then we may publish a new build,
thanks for the waiting <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse 10.08 | Otto,
We are working to solve a default button action with SkinButtons and then we may publish a new build,
thanks for the waiting <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xBrowse 11.1 error | Dear All,
I'm using TREE to browse... With FWH 10.6 this doesn't appear bu with FWH11.1 it does.
What cause this xBrowse error?
"BOUND ERROR: ARRAY ACCESS"
Line# 503
METHOD ColAtPos( nPos ) INLINE ::aCols[ ::aDisplay[ MinMax( If( nPos == nil .or. nPos == 0, 1, nPos ), 1, Len( ::aDisplay ) ) ] ]
Kind regards,
Frances |
xBrowse 11.1 error | Dear All,
No one experienced this yet?
Kind Regards,
Frances |
xBrowse 11.1 error | Surprising.
I am unable to comment unless I can see a sample that can reproduce the error. |
xBrowse 11.1 error | [quote="nageswaragunupudi":27gnho9m]Surprising.
I am unable to comment unless I can see a sample that can reproduce the error.[/quote:27gnho9m]
Dear Mr. RAO,
I am using same code running in FWH 10.6 no changes but this error pops randomly..
Kind Regards,
Frances |
xBrowse 11.1 error | Frances,
It appears that the error is happening when there are no records in the tree (aDisplay is empty). Rao stated in another message thread that the tree does not support empty databases at this time.
If it did not error before, then I suggest doing a file compare of the two versions to see if you can find the code that has been changed. This might help find a solution.
You could also build a test program by attempting to create a tree with no records. This should trigger the error.
Regards,
James |
xBrowse 1203 nAt returns incorrect value Horozontal scroll | To All
I am using FWH1203 and I have noticed that nAt returns the incorrect value when you horizontally scroll past the original visible columns.
In my first picture you see the cursor in the 4:30 ( click here ) column and nAt returns the correct column value ..
[url=http://imageshack.us/photo/my-images/32/ykms.jpg/:konpm6gs][img:konpm6gs]http://img32.imageshack.us/img32/7567/ykms.jpg[/img:konpm6gs][/url:konpm6gs]
When I move the horizontal bar to the right to view additional columns nAt returns the 3:00 column ..
[url=http://imageshack.us/photo/my-images/845/8n62.jpg/:konpm6gs][img:konpm6gs]http://img845.imageshack.us/img845/8448/8n62.jpg[/img:konpm6gs][/url:konpm6gs]
I am using an older version of FWH .. I am hoping this has been fixed recently ?
Thanks
Rick Lipkin |
xBrowse 1203 nAt returns incorrect value Horozontal scroll | Mr Rick
I shall look into nAt issue.
But I advise you not to refer to columns in numbers in xbrowse.
Best way to use is to use oBrw:SelectedCol()
oBrw:SelectedCol():cHeader always gives u the right value. |
xBrowse 1203 nAt returns incorrect value Horozontal scroll | Rao
Thank you for your quick response .. Unfortunately, I do not necessarily need the column header but the column number to then extract the value ( data\text ) of the cell ..
[code=fw:2ba8w3a3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nColumn := oLbxA:<span style="color: #000000;">nAt</span><br />cText := oLbxA:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> nColumn <span style="color: #000000;">]</span>:<span style="color: #000000;">Value</span> <span style="color: #B900B9;">// returns the value of the current row for a column</span><br /> </div>[/code:2ba8w3a3]
Any other suggestions would be welcome.
Rick Lipkin |
xBrowse 1203 nAt returns incorrect value Horozontal scroll | [quote="Rick Lipkin":12z22ps6]Rao
Thank you for your quick response .. Unfortunately, I do not necessarily need the column header but the column number to then extract the value ( data\text ) of the cell ..
[code=fw:12z22ps6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nColumn := oLbxA:<span style="color: #000000;">nAt</span><br />cText := oLbxA:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> nColumn <span style="color: #000000;">]</span>:<span style="color: #000000;">Value</span> <span style="color: #B900B9;">// returns the value of the current row for a column</span><br /> </div>[/code:12z22ps6]
Any other suggestions would be welcome.
Rick Lipkin[/quote:12z22ps6]
Answer:
[code=fw:12z22ps6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cText := oLbxA:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> </div>[/code:12z22ps6] |
xBrowse 1203 nAt returns incorrect value Horozontal scroll | Rao
Thank you!
Rick Lipkin |
xBrowse 13.05 - bClrHeader | Hi All.
I have a problem with xBrowse header colour like this:
1. xBrowse array with clausul AutoSort.
Result: header colour is change
2. xBrowse array without clausul AutoSort.
Result: header colour is normal like we define the colour.
Any body help me please....
Mulyadi
Indonesia |
xBrowse 13.05 - bClrHeader | This works correctly in the next version FWH 13.06, due for release anytime now. |
xBrowse 1408 Edit_Get_Button | Antonio and Rao
Just ran across this xBrowse error with Edit_Get_Button when LabrBrow() closes.. the error only happens with 1408 and not with my older version. Here is my code and the error.
Rick Lipkin
[code=fw:1jphcs7r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// labor</span><br /> ADD oCol <span style="color: #0000ff;">to</span> oLbxB <span style="color: #00C800;">AT</span> <span style="color: #000000;">6</span> HEADER <span style="color: #ff0000;">'Labor'</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span> <span style="color: #B900B9;">//60</span><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nEditType</span> := EDIT_GET_BUTTON<br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span>|row, col, oCol| ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Inventory Type"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> = <span style="color: #ff0000;">"Labor"</span>,;<br /> <span style="color: #000000;">(</span> nAmount := _LabrBrow<span style="color: #000000;">(</span> ;<br /> nRepairNumber,;<br /> aEmp,;<br /> aTech,;<br /> oRsDetail,;<br /> <span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">"R"</span>,<span style="color: #ff0000;">"A"</span>,oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Unique Line"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span>,;<br /> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Price"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := nAmount,;<br /> oRsDetail:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Type is not Labor"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// repair</span><br /><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">addbmpfile</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"clockview.bmp"</span> <span style="color: #000000;">)</span><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">addbmpfile</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"clockadd.bmp"</span> <span style="color: #000000;">)</span><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">{</span> | lValue | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRsDetail:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"IsLabor"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> = .t., <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbxB:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">lBtnTransparent</span> := .t.<br /><br /> </div>[/code:1jphcs7r]
[url=http://postimage.org/:1jphcs7r][img:1jphcs7r]http://s14.postimg.org/ow9t2vb4x/Edit_Get.jpg[/img:1jphcs7r][/url:1jphcs7r]
[code=fw:1jphcs7r]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Fox\SaLite\Saw32.Exe <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">5</span>,<span style="color: #000000;">045</span>,<span style="color: #000000;">760</span> bytes<br /> Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Build <span style="color: #000000;">20131030</span><span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">14.08</span><br /> Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">13</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">10</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">2014</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">08</span>:<span style="color: #000000;">06</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span> <span style="color: #00C800;">Class</span>: <span style="color: #ff0000;">'NIL'</span> has no exported <span style="color: #00C800;">method</span>: <span style="color: #000000;">EVAL</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = U <br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = O TXBRWCOLUMN<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">3</span><span style="color: #000000;">]</span> = U <br /> <span style="color: #000000;">[</span> <span style="color: #000000;">4</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">27</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => EVAL<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">POSTEDIT</span><span style="color: #000000;">(</span> <span style="color: #000000;">11948</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">RUNBTNACTION</span><span style="color: #000000;">(</span> <span style="color: #000000;">11857</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>TXBRWCOLUMN:<span style="color: #000000;">CREATEBUTTONS</span><span style="color: #000000;">(</span> <span style="color: #000000;">11218</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">btnbmp</span>.PRG => TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">(</span> <span style="color: #000000;">522</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">btnbmp</span>.PRG => TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">(</span> <span style="color: #000000;">752</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1723</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">btnbmp</span>.PRG => TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1601</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">(</span> <span style="color: #000000;">3291</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => WINRUN<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span> <span style="color: #000000;">1015</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">319</span> <span style="color: #000000;">)</span><br /> </div>[/code:1jphcs7r] |
xBrowse 1408 Edit_Get_Button | We shall look into this on priority. |
xBrowse 1408 Edit_Get_Button | FWH 14.09 does not raise an error.
But kindly note that the EDIT_XXXXX constants are intended to be used to set oCol:nEditType to edit the data of the column. In other words, when the column does not contain any data at all as in your above case, use of any EDIT_XXX is not an intended usage.
In the above example, better option would be to triggger the action on double click or pressing enter key.
oCol:bLDClickData := { || MyDialog() }
oCol:bKeyDown := {|nKey| If( nKey == VK_ENTER, ( MyDialog(), 0 ), nil ) }
Note: From FWH 14.09 we can assign bKeyDown and bKeyChar to column objects also |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.