METHOD ReDefine( nId, oWnd, nClrFore, nClrBack, lDesign, cMsg ) CLASS TTreeView
DEFAULT oWnd := GetWndDefault(),;
nClrFore := oWnd:nClrText,;
nClrBack := oWnd:nClrPane,; // GetSysColor( COLOR_WINDOW ),;
lDesign := .f.
...
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oTree
DEFINE DIALOG oDlg;
SIZE 400, 400
@ 0, 0 TREEVIEW oTree COLOR CLR_GREEN, CLR_RED
ACTIVATE DIALOG oDlg;
ON INIT FILLTREE( oTree );
CENTER
RETURN NIL
STATIC FUNCTION FILLTREE( oTree )
LOCAL oItem
oItem = oTree:Add( "Test" )
oItem:Add( "Test1" )
oItem:Add( "Test2" )
oItem:Add( "Test3" )
oTree:Expand()
RETURN NIL
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oTree
DEFINE DIALOG oDlg;
SIZE 400, 400
@ 0, 0 TREEVIEW oTree COLOR CLR_GREEN, CLR_RED
ACTIVATE DIALOG oDlg;
ON INIT FILLTREE( oTree );
CENTER
RETURN NIL
STATIC FUNCTION FILLTREE( oTree )
LOCAL oItem
oItem = oTree:Add( "Test" )
oItem:Add( "Test1" )
oItem:Add( "Test2" )
oItem:Add( "Test3" )
oTree:Expand()
TVSETTEXTCOLOR( oTree:hWnd, CLR_GREEN )
TVSETBKCOLOR( oTree:hWnd, CLR_RED )
RETURN NIL
#pragma BEGINDUMP
#include "windows.h"
#include "commctrl.h"
#include "hbapi.h"
HB_FUNC( TVSETTEXTCOLOR )
{
hb_retnl( ( LONG ) TreeView_SetTextColor( ( HWND ) hb_parnl( 1 ), hb_parnl( 2 ) ) );
}
HB_FUNC( TVSETBKCOLOR )
{
hb_retnl( ( LONG ) TreeView_SetBkColor( ( HWND ) hb_parnl( 1 ), hb_parnl( 2 ) ) );
}
#pragma ENDDUMP
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 80 guests