Page 1 of 1
GRID Header Color ?
Posted: Fri Jan 10, 2020 6:31 am
by AUGE_OHR
hi,
how can i change GRID Header Color
i found out
Code: Select all
Form_1.Grid_1.HeaderDYNAMICFORECOLOR( nCol ) := {|| aFColor[1] }
Form_1.Grid_1.HeaderDYNAMICBACKCOLOR( nCol ) := {|| aFColor[2] }
but BackColor does not work
Re: GRID Header Color ?
Posted: Fri Jan 10, 2020 9:03 am
by serge_girard
Jimmy,
Code: Select all
FOR a = 6 to 9 // free
SetProperty( 'Form_1','Grid_DRIVES',"ColumnDYNAMICFORECOLOR", a, {|| {255,0,255} } )
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {255,0,255} } )
NEXT
FOR a = 2 to 3 // total
SetProperty( 'Form_1','Grid_DRIVES',"ColumnDYNAMICFORECOLOR", a, {|| {0,255,0} } )
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {0,255,0} } )
NEXT
Maybe this works for you?
Serge
Re: GRID Header Color ?
Posted: Wed Apr 14, 2021 2:24 am
by hmgchang
serge_girard wrote: ↑Fri Jan 10, 2020 9:03 am
Jimmy,
Code: Select all
FOR a = 6 to 9 // free
SetProperty( 'Form_1','Grid_DRIVES',"ColumnDYNAMICFORECOLOR", a, {|| {255,0,255} } )
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {255,0,255} } )
NEXT
FOR a = 2 to 3 // total
SetProperty( 'Form_1','Grid_DRIVES',"ColumnDYNAMICFORECOLOR", a, {|| {0,255,0} } )
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {0,255,0} } )
NEXT
Maybe this works for you?
Serge
The Grid HeaderDynamicBackColor still not working...
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICFORECOLOR", a, {|| {0,255,0} } ) -> WORKING
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {0,255,0} } ) -> NOT WORKING !!!
Pls Advise on how to make it works
Thks n Rgds
Chang
Re: GRID Header Color ?
Posted: Wed Apr 14, 2021 3:07 am
by AUGE_OHR
hi,
hmgchang wrote: ↑Wed Apr 14, 2021 2:24 am
Pls Advise on how to make it works
have not work at this "Problem" in harbour Version any more ...
when hover GRID / BROWSE Header you will "see" visual Effect which is "over" BACKCOLOR
i have "see" (in \SOURCE ) Ownerdraw for GRID / BROWSE Header but now work with it under harbour
same "Problem" with TAB(page) which is "paint" by System ... need Ownerdraw like in my Xbase++ App
- Control_Background.JPG (100.14 KiB) Viewed 1853 times
Re: GRID Header Color ?
Posted: Wed Apr 14, 2021 11:55 pm
by hmgchang
AUGE_OHR wrote: ↑Wed Apr 14, 2021 3:07 am
hi,
hmgchang wrote: ↑Wed Apr 14, 2021 2:24 am
Pls Advise on how to make it works
have not work at this "Problem" in harbour Version any more ...
when hover GRID / BROWSE Header you will "see" visual Effect which is "over" BACKCOLOR
i have "see" (in \SOURCE ) Ownerdraw for GRID / BROWSE Header but now work with it under harbour
same "Problem" with TAB(page) which is "paint" by System ... need Ownerdraw like in my Xbase++ App
Control_Background.JPG
Hola Jimmy,
Pls share your Xbase++ App to me... tq
- hmg_dynamicback.JPG (49.14 KiB) Viewed 1811 times
it seem that the dynamic foreColor dan backColor functions are identical, wonder why it works with
foreColor but not backColor.
Thks n Rgds
Chang
Re: GRID Header Color ?
Posted: Thu Apr 15, 2021 12:25 am
by andyglezl
hmgchang wrote: ↑Wed Apr 14, 2021 2:24 am
The Grid HeaderDynamicBackColor still not working...
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICFORECOLOR", a, {|| {0,255,0} } ) -> WORKING
SetProperty( 'Form_1','Grid_DRIVES',"HeaderDYNAMICBACKCOLOR", a, {|| {0,255,0} } ) -> NOT WORKING !!!
Pls Advise on how to make it works
I think it's because of the "WINDOWS THEMES"
Re: GRID Header Color ?
Posted: Thu Apr 15, 2021 4:17 am
by AUGE_OHR
hi,
hmgchang wrote: ↑Wed Apr 14, 2021 11:55 pm
Pls share your Xbase++ App to me... tq
Xbase++ App (Black) need Runtime so tell me where i can upload hole Stuff
harbour App (white) Source (32/64 Bit) are on Github
https://github.com/AugeOhr/HBFM
---
HMG have no Ownerdraw ( WM_MEASUREITEM / WM_DRAWITEM ) ...
it use Customdraw ( NM_CUSTOMDRAW ) for GRID / TREE
MiniGUI Extendet Version seems to have Ownerdraw for Menu and Listbox.
---
in GRID or TREE you can use "DynamicXXXcolor" while it use CustomDraw
c:\hmg.3.4.4\SOURCE\h_windows.prg
Code: Select all
FUNCTION Events( hWnd, nMsg, wParam, lParam )
CASE nMsg == WM_NOTIFY
...
IF GetNotifyCode( lParam ) == NM_CUSTOMDRAW
else System is drawing (include visual Style/Effect)
Code: Select all
Draw Background Color
Draw Visual Style
Draw Foreground Font Color
---
Windows Background is "paint" when get one of these Windows Message
Code: Select all
#define WM_CTLCOLORMSGBOX 0x0132
#define WM_CTLCOLOREDIT 0x0133
#define WM_CTLCOLORLISTBOX 0x0134
#define WM_CTLCOLORBTN 0x0135
#define WM_CTLCOLORDLG 0x0136
#define WM_CTLCOLORSCROLLBAR 0x0137
#define WM_CTLCOLORSTATIC 0x0138
HMG use
Code: Select all
CASE nMsg == WM_CTLCOLORSTATIC
CASE nMsg == WM_CTLCOLOREDIT .OR. nMsg == WM_CTLCOLORLISTBOX
where you can change Windows Background Color
so it is not possible (without Tricks ) go get "Darkmode" on Scrollbar while WM_CTLCOLORSCROLLBAR is not support in HMG (yet)