FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Row color when mouse over
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Row color when mouse over
Posted: Sat Aug 03, 2013 09:04 PM

Friends of the forum,

What is the way to shade a line in xBrowse when the mouse is over it?

That is, we have the currently selected line with their respective colors, but when moves the mouse over other line, we want to shade this line with a different color. (something like this forum page)

Someone with an example?

Regards.

Francisco J. Alegr铆a P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Sun Aug 04, 2013 10:17 PM

That would be great. Awaiting an answer.

Thank you

Harvey
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Row color when mouse over
Posted: Sun Aug 04, 2013 11:21 PM
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=26903#p149365

I've tried several times, without success
It should be as simple as putting a function in the DATA OnMouseMove
Code (fw): Select all Collapse
聽 聽 oBrw:OnMouseMove 聽 聽 聽:= { | oB , nR, nC, nK | PintaOverLine( oB, nR, nC, nK ) }

聽 聽 ... / ...
聽 聽oBrw:CreateFromCode()
Return oBrw

function PintaOverLine( oB, nR, nC, nK )
聽 聽local nOldRowPos := oB:nRowSel
聽 聽local nOldColPos := oB:nColSel
聽 聽local nMouseRow 聽:= oB:MouseRowPos( nR )
聽 聽local nMouseCol 聽:= oB:MouseColPos( nC )

//if !oB:lPressed .and. !oB:lCaptured 
聽//if nOldRowPos <> nMouseRow .and. nOldColPos <> nMouseCol 聽 //No estoy en la misma posicion que la seleccionada
聽 聽 oB:Descripcion:cFooter := Str(nMouseRow ,4 )+" / "+Str( nMouseCol, 4 )+" / "+;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Str( nOldRowPos , 4 )+" / "+Str( nOldColPos, 4 )
聽 聽 oB:RefreshFooters()
聽//endif
//endif

return .t.

But I have found that the MouseMove not run this DATA Browse until you go through the Header (any), which should not be to my understanding of normal behavior. I only updated when you go through the header. For that reason I can not find the row in which it is located. SI column updates the number passing through the column header.
If a refresh and position correctly when performing the Browse OVER costase not think much paint the cell / line which the mouse was positioned.
I've left open, like other things, to make sure that when I upgrade to the new version (currently use FWH 12.03) remains the same behavior. If so I'll have to make a class that inherits from xBrowse and modify the MouseMove to check it because I need it too.

Maybe your classmates or, have other ideas that lead out of the error of this appreciation.
regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Mon Aug 05, 2013 03:26 AM

Can you translate the thread to English.

Thank you

Harvey
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Row color when mouse over
Posted: Mon Aug 05, 2013 07:40 AM
Hello,

would be a nice solution as well, only for a cell if :

:nMarqueeStyle := MARQSTYLE_SOLIDCELL

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Row color when mouse over
Posted: Mon Aug 05, 2013 09:59 AM

Uwe
驴That works without pressing the mouse button?
He has to paint the cell or line to move the mouse over the control (xbrowse) without pressing click
regards

Uwe
驴Eso funciona sin pulsar click con el mouse?
Ha de pintar la celda o la linea al mover el raton sobre el control (xbrowse) sin pulsar click
Saludos

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Row color when mouse over
Posted: Mon Aug 05, 2013 10:06 AM

Cristobal,

I'm looking for a cell-solution.
Like displaying a cell-tooltip on mousecapture,
i would like to change the cellcolor as well.

Best Regards
Uwe :?:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 12:21 AM

in the code provided by cnavarro what do the oB, nR,nC,nK values come from?

Thank you

Harvey
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 05:43 AM
oBrw:OnMouseMove := { | oB , nR, nC, nK | PintaOverLine( oB, nR, nC, nK ) }

oBrw:OnMouseMove := { | oBrowse, nRow, nCol, nKey | PintaOverLine( oBrowse, nRow, nCol, nKey ) }

Regards

Code (fw): Select all Collapse
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TWindow

聽 聽if ::oCursor != nil
聽 聽 聽 SetCursor( ::oCursor:hCursor )
聽 聽else
聽 聽 聽 CursorArrow()
聽 聽endif

聽 聽::SetMsg( ::cMsg )

聽 聽::CheckToolTip()

聽 聽if ::OnMouseMove != nil
聽 聽 聽 if ValType( ::OnMouseMove ) == "B"
聽 聽 聽 聽 聽Eval( ::OnMouseMove, Self, nRow, nCol, nKeyFlags )
聽 聽 聽 endif
聽 聽 聽 if ValType( ::OnMouseMove ) == "C"
聽 聽 聽 聽 聽OSend( Self, ::OnMouseMove, Self, nRow, nCol, nKeyFlags )
聽 聽 聽 endif
聽 聽endif

..../...
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 03:06 PM

Thanks.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 04:22 PM

I get the following error message.

Path and name: f:\color\cashvr11.exe (32 bits)
Size: *** bytes
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 08/06/13, 09:20:56
Error description: Error BASE/1100 Argument error: TRIM
Args:
[ 1] = U

Stack Calls

Called from: => TRIM(0)
Called from: => (b)OCOL(1364)
Called from: => ASCAN(0)
Called from: => TXBROWSE:OCOL(1364)
Called from: => TXBROWSE:DESCRIPCION(4615)
Called from: .\JBROWSE.PRG => PINTAOVERLINE(13421)
Called from: .\JBROWSE.PRG => (b)PLBROW(1174)

Any suggestions how to fix this. I believe the problem is in xbrowse.prg. In the method.

Thank you

Harvey
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 08:32 PM
Harvey
DESCRIPTION You have to change the name of your xbrowse column in which you want your foot in the message.
regards

Code (fw): Select all Collapse
聽 聽// Descripcion -> change with you column 
聽 聽oB:Descripcion:cFooter := Str(nMouseRow ,4 )+" / "+Str( nMouseCol, 4 )+" / "+;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Str( nOldRowPos , 4 )+" / "+Str( nOldColPos, 4 )


Sorry for the translation -> Google Translate
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 09:15 PM
Maybe I'm confused: Francisco wrote

" Row color when mouse over
Friends of the forum,
What is the way to shade a line in xBrowse when the mouse is over it?
That is, we have the currently selected line with their respective colors, but when moves the mouse over other line, we want to shade this line with a different color. (something like this forum page)
Someone with an example?"


is the code we are talking about for that purpose. Looking at the code it seems to be for something else. What am I missing?
Thank you

Harvey
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 10:55 PM

hag,

It's the same, but the code of Cristobal is a work in progress. He has not yet been completed.
In other words, is just an example of what he has done about it.

I am trying to found the correct code, also.
Regards.

Francisco J. Alegr铆a P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Row color when mouse over
Posted: Tue Aug 06, 2013 11:14 PM

Now I understand. When you get the code works let me know.

Thank you

Harvey