Dear All,
I would like to change DATA in TGET classes. I don't need to change original FIVEHX.LIB, because I don't want to worry about FW upgrade version.
::lTransparent := .T. // for default transparent say
Regards,
Dutch
OVERRIDE METHOD New IN CLASS TGET WITH MyNew
STATIC FUNCTION MyNew
LOCAL Self := HB_QSelf()
<your code>
RETURN (Self)
TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
#include "FiveWin.ch"
function Main()
local oDlg
// Just call it ONCE in your application!
AddClassData( TSay(), "lTransparent", .T. ) // .T. -> initial value
DEFINE DIALOG oDlg TITLE "Test" COLOR "W/B"
@ 1, 2 SAY "Hello" COLOR "R/BG+"
@ 2, 2 SAY "World!" COLOR "R/GR+"
ACTIVATE DIALOG oDlg CENTERED
return nil
function AddClassData( oObj, cClsData, uVal )
local hClass := oObj:ClassH
__clsAddMsg( hClass, cClsData, __CLS_CNTCLSDATA( hClass ) + 1,;
HB_OO_MSG_CLSACCESS, uVal, HB_OO_CLSTP_EXPORTED )
__clsAddMsg( hClass, "_" + cClsData, __CLS_CNTCLSDATA( hClass ) + 1,;
HB_OO_MSG_CLSASSIGN,, HB_OO_CLSTP_EXPORTED )
return nil
dutch wrote:I can override class now but the case that I mention is override CLASSDATA in the CLASS as first Post Example. Because I need only change one DATA. If Override Method, It means to maintain this override class and every version.
Regards,
Dutch
Antonio Linares wrote:Adolfo,
You can do it this way:
- Code: Select all Expand view
TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
Please notice that we don't really create a GET control, as we don't call New() or Redefine() methods
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 56 guests