twbrowse: change header color

twbrowse: change header color

Postby MarcoBoschi » Mon Jul 19, 2010 12:44 pm

Is it possible to change color of headers of a twbrowse?

#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oBrw
USE customer
DEFINE DIALOG oDlg FROM 100 , 100 TO 800 , 600 PIXEL
@ 1 , 1 LISTBOX oBrw FIELDS SIZE 200 , 200
oBrw:nClrText := CLR_HBLUE

ACTIVATE DIALOG oDLG CENTER

RETURN NIL

Image
I am able to change cells color.
I have to change headers color
In this samples the words "FIRST", "LAST", STREET" CLR_HBLUE like cells

Thanks
User avatar
MarcoBoschi
 
Posts: 1023
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: twbrowse: change header color

Postby James Bott » Mon Jul 19, 2010 1:33 pm

oLbx:nClrForeHead
oLbx:nClrBackHead
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: twbrowse: change header color

Postby MarcoBoschi » Mon Jul 19, 2010 4:18 pm

Thank you James,
it works in a little sample but in one of my applications it does not work.

I add step by step pieces of code from my application to working sample.

The conclusion is: sample works but my application doesn't.
It seems that two programs contains the same pieces of code.
I inform you...

marco
User avatar
MarcoBoschi
 
Posts: 1023
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: twbrowse: change header color

Postby James Bott » Mon Jul 19, 2010 4:27 pm

Marco,

If you can't solve it, please post your app code here. Maybe someone can figure it out.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: twbrowse: change header color

Postby MarcoBoschi » Mon Jul 19, 2010 4:41 pm

James,
tomorrow I will extract this dialog from my app and post it.
Thank you
User avatar
MarcoBoschi
 
Posts: 1023
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: twbrowse: change header color

Postby Willi Quintana » Tue Jul 20, 2010 3:36 am

Hi Marco..
see this code and this link http://forums.fivetechsupport.com/viewtopic.php?f=6&t=19204&start=0
Code: Select all  Expand view

                oLbx:nClrNFBack    := {|nRow,nCol|If(EMPTY(EstadoDia(oPlanning, oLbx:nColAct)), oApp:cColor2, CLR_GREEN)}
                oLbx:nClrNFFore    := {|nRow,nCol|If(EMPTY(EstadoDia(oPlanning, oLbx:nColAct)), oApp:cColor2, CLR_GREEN)}

                oLbx:bBkColor      := {|nRow,nCol|If(nCol==1, oApp:nRowNonClr, )}
                oLbx:bTextColor    := {|nRow,nCol|If(nCol==2 .OR. nCol==9 .OR. nCol==16 .OR. nCol==23 .OR. nCol==30 .OR. nCol==37, CLR_HRED, CLR_HBLUE)}
                oLbx:nClrBackFocus := {|nRow,nCol|If(EMPTY(EstadoDia(oPlanning, oLbx:nColAct)), oApp:cColor2, CLR_GREEN)}
                oLbx:nClrForeFocus := {|nRow,nCol|If(EMPTY(EstadoDia(oPlanning, oLbx:nColAct)), oApp:cColor2, CLR_GREEN)}
                oLbx:nClrText      := {|nRow,nCol|If(EMPTY(EstadoDia(oPlanning, oLbx:nColAct)), oApp:cColor2, CLR_GREEN)}

 
User avatar
Willi Quintana
 
Posts: 1003
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú

Re: twbrowse: change header color

Postby MarcoBoschi » Tue Jul 20, 2010 9:26 am

I've found the problem
Is the presence of this in .RES file

1 24 LOADONCALL MOVEABLE
{
'3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31'
'2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54'
'46 2D 38 22 20 73 74 61 6E 64 61 6C 6F 6E 65 3D'
'22 79 65 73 22 3F 3E 0D 0A 3C 61 73 73 65 6D 62'
'6C 79 20 78 6D 6C 6E 73 3D 22 75 72 6E 3A 73 63'
'68 65 6D 61 73 2D 6D 69 63 72 6F 73 6F 66 74 2D'
'63 6F 6D 3A 61 73 6D 2E 76 31 22 20 6D 61 6E 69'
'66 65 73 74 56 65 72 73 69 6F 6E 3D 22 31 2E 30'
'22 3E 0D 0A 3C 61 73 73 65 6D 62 6C 79 49 64 65'
'6E 74 69 74 79 0D 0A 20 20 20 20 76 65 72 73 69'
'6F 6E 3D 22 31 2E 30 2E 30 2E 30 22 0D 0A 20 20'
'20 20 70 72 6F 63 65 73 73 6F 72 41 72 63 68 69'
'74 65 63 74 75 72 65 3D 22 58 38 36 22 0D 0A 20'
'20 20 20 6E 61 6D 65 3D 22 46 69 76 65 54 65 63'
'68 20 53 6F 66 74 77 61 72 65 2E 46 69 76 65 57'
'69 6E 2E 33 32 62 69 74 73 22 0D 0A 20 20 20 20'
'74 79 70 65 3D 22 77 69 6E 33 32 22 0D 0A 2F 3E'
'0D 0A 3C 64 65 73 63 72 69 70 74 69 6F 6E 3E 59'
'6F 75 72 20 61 70 70 6C 69 63 61 74 69 6F 6E 20'
'64 65 73 63 72 69 70 74 69 6F 6E 20 68 65 72 65'
'2E 3C 2F 64 65 73 63 72 69 70 74 69 6F 6E 3E 0D'
'0A 3C 64 65 70 65 6E 64 65 6E 63 79 3E 0D 0A 20'
'20 20 20 3C 64 65 70 65 6E 64 65 6E 74 41 73 73'
'65 6D 62 6C 79 3E 0D 0A 20 20 20 20 20 20 20 20'
'3C 61 73 73 65 6D 62 6C 79 49 64 65 6E 74 69 74'
'79 0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 74'
'79 70 65 3D 22 77 69 6E 33 32 22 0D 0A 20 20 20'
'20 20 20 20 20 20 20 20 20 6E 61 6D 65 3D 22 4D'
'69 63 72 6F 73 6F 66 74 2E 57 69 6E 64 6F 77 73'
'2E 43 6F 6D 6D 6F 6E 2D 43 6F 6E 74 72 6F 6C 73'
'22 0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 76'
'65 72 73 69 6F 6E 3D 22 36 2E 30 2E 30 2E 30 22'
'0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 70 72'
'6F 63 65 73 73 6F 72 41 72 63 68 69 74 65 63 74'
'75 72 65 3D 22 58 38 36 22 0D 0A 20 20 20 20 20'
'20 20 20 20 20 20 20 70 75 62 6C 69 63 4B 65 79'
'54 6F 6B 65 6E 3D 22 36 35 39 35 62 36 34 31 34'
'34 63 63 66 31 64 66 22 0D 0A 20 20 20 20 20 20'
'20 20 20 20 20 20 6C 61 6E 67 75 61 67 65 3D 22'
'2A 22 0D 0A 20 20 20 20 20 20 20 20 2F 3E 0D 0A'
'20 20 20 20 3C 2F 64 65 70 65 6E 64 65 6E 74 41'
'73 73 65 6D 62 6C 79 3E 0D 0A 3C 2F 64 65 70 65'
'6E 64 65 6E 63 79 3E 0D 0A 3C 2F 61 73 73 65 6D'
'62 6C 79 3E 0D 0A'
}
without this it works fine
User avatar
MarcoBoschi
 
Posts: 1023
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: twbrowse: change header color

Postby MarcoBoschi » Wed Jul 21, 2010 11:26 am

Is it possible to change header color in twbrowse obiect without removing from the program windows xp manifest?
User avatar
MarcoBoschi
 
Posts: 1023
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests