FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TSBUTTON class - suggestion
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
TSBUTTON class - suggestion
Posted: Thu Aug 28, 2008 06:27 PM

Hello Manuel,

I think for the performance the
the call of
::Refresh( .T. )
should be eliminated in method
SetText
SetColor

Then if you need a refreshing of the button call
::paint() in your program.

Doing this changes now I have a optimal performance.
Thanks again for this wonderful class.

Regards,
Otto

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TSBUTTON class - suggestion
Posted: Thu Aug 28, 2008 09:21 PM

Otto,

The problem with making changes like that is that it breaks existing code which is relying on the refresh() to be there.

An option would be to add a lRefresh parameter to those methods (defaulting to .T.) so you could turn off the refresh if desired. That would satisfy you and not break existing code.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion