I point out some strange behaviors in the DCBROWSE when i disable/enable highlight cursor in XBPBRW_CURSOR_ROW mode
// enable row cursor
oBrowse:cursorMode := XBPBRW_CURSOR_ROW
oBrowse:configure()
oBrowse:hilite()
oBrowse:refreshCurrent()
oBrowse:forceStable()
this works
// disable row cursor
oBrowse:cursorMode := XBPBRW_CURSOR_NONE
oBrowse:configure()
oBrowse:deHilite()
oBrowse:refreshCurrent()
oBrowse:forceStable()
the row cursor remains highlighted - then the row cursor stay hidden (if i try to move it using keyboard or mouse)
DCBROWSE - row cursor on/off
Re: DCBROWSE - row cursor on/off
Maybe you dehilite the browse before you set the cursor to "NONE"?
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCBROWSE - row cursor on/off
I'm trying all the combinations, for example:
oBrowse:deHilite()
oBrowse:refreshCurrent()
oBrowse:cursorMode := XBPBRW_CURSOR_NONE
oBrowse:configure()
the cursor always remains on
oBrowse:deHilite()
oBrowse:refreshCurrent()
oBrowse:cursorMode := XBPBRW_CURSOR_NONE
oBrowse:configure()
the cursor always remains on
Re: DCBROWSE - row cursor on/off
in addition oBrowse:forceStable() return an object instead of logical value, as the xbase manual show:
":forceStable() returns .T. (true) when the display is stable. "
so I can't even create the usual loop to stabilize the browse:
do while !oBrowse:forceStable(); enddo
":forceStable() returns .T. (true) when the display is stable. "
so I can't even create the usual loop to stabilize the browse:
do while !oBrowse:forceStable(); enddo
Re: DCBROWSE - row cursor on/off
Just call oBrowse:ForceStable() once, this contains the complete stabilization loop.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCBROWSE - row cursor on/off
<<msg to Roger>>
I looked at Roger's source (xbp_brw.prg) and I saw that the method that refreshes the line is PROTECTED
METHOD HiliteColumns // hilite the specified columns
I wanted to force the refresh of the line to turn it off but I do not know how to get around the problem
I looked at Roger's source (xbp_brw.prg) and I saw that the method that refreshes the line is PROTECTED
METHOD HiliteColumns // hilite the specified columns
I wanted to force the refresh of the line to turn it off but I do not know how to get around the problem
Re: DCBROWSE - row cursor on/off
hi Maxz
"o:Forcestable" was used with TBrowse but XbpBrowse() have Callback-Slot "o:stableBlock" for it
under Cl*pper you did "say" what have to do
under GUI you are waiting and "react" what User did
so "fill" Callback-Slot "o:stableBlock" for your "Action" when oBrowse is "stable"
"think GUI"
"o:Forcestable" was used with TBrowse but XbpBrowse() have Callback-Slot "o:stableBlock" for it
under Cl*pper you did "say" what have to do
under GUI you are waiting and "react" what User did
so "fill" Callback-Slot "o:stableBlock" for your "Action" when oBrowse is "stable"
greetings by OHR
Jimmy
Jimmy
Re: DCBROWSE - row cursor on/off
I found the way to solve the problem, after so many attempts:
cursor row enabled:
oBrowse:hilite()
AEval( oBrowse:aColumns, {|o| o:Redraw() } )
cursor row disabled:
oBrowse:deHilite()
AEval( oBrowse:aColumns, {|o| o:Redraw() } )
cursor row enabled:
oBrowse:hilite()
AEval( oBrowse:aColumns, {|o| o:Redraw() } )
cursor row disabled:
oBrowse:deHilite()
AEval( oBrowse:aColumns, {|o| o:Redraw() } )
Re: DCBROWSE - row cursor on/off
I just tested this and it works fine for me.
Code: Select all
STATIC FUNCTION CursorOn( oBrowse )
oBrowse:cursorMode := XBPBRW_CURSOR_ROW
oBrowse:configure()
oBrowse:hilite()
oBrowse:forceStable()
oBrowse:refreshCurrent()
SetAppFocus(oBrowse)
RETURN nil
* ------------
STATIC FUNCTION CursorOff( oBrowse )
oBrowse:cursorMode := XBPBRW_CURSOR_NONE
oBrowse:configure()
oBrowse:dehilite()
oBrowse:forceStable()
oBrowse:refreshCurrent()
SetAppFocus(oBrowse)
RETURN nil
The eXpress train is coming - and it has more cars.
Re: DCBROWSE - row cursor on/off
tried it but the on/off switch mechanism seams not work for me
attach, a small example to play ...
attach, a small example to play ...