FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Listbox Column Header
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Listbox Column Header
Posted: Thu Mar 12, 2009 01:18 AM

Hello, is it possible to set color to column header for LISTBOX? I would like to set a color to certain columns that I allow sorting.
Thank you,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Listbox Column Header
Posted: Thu Mar 12, 2009 08:53 PM

Possible colors, look on xBrowse.prg:
bClrHeader,; // default color pair for header
bClrFooter,; // default color pair for footer
bClrStd,; // default color pair for normal rows
bClrSel,; // default color pair for selected row
bClrSelFocus,; // default color pair for selected row when control has focus
bClrEdit // default color pair for edition

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: Listbox Column Header
Posted: Thu Mar 12, 2009 11:45 PM

Thank You, but got the following error, I am using TWBROWSE

Application

Path and name: C:\Winapps\cargo\port.exe (32 bits)
Size: 1,946,112 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 03/12/2009, 18:42:45
Error description: Error BASE/1005 Message not found: TWBROWSE:_BCLRHEADER

Stack Calls

Called from: source\rtl\tobject.prg => TWBROWSE:ERROR(172)
Called from: source\rtl\tobject.prg => TWBROWSE:MSGNOTFOUND(205)
Called from: source\rtl\tobject.prg => TWBROWSE:_BCLRHEADER(0)
Called from: port.prg => _PORT(113)

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Re: Listbox Column Header
Posted: Thu Mar 12, 2009 11:55 PM

darrell,
i use this, change color and font

 oBGru:bBkColor      := {|nRow,nCol,nStyle| IF( nStyle==0 .and. nCol==2, ;
                                                                      nRGB(255,135,15), ) }

 oBGru:bFont  := {|nRow,nCol,nStyleLine| ;
                                             IF(nStyleLine==1 .AND. nCol==2,oFnt:hFont,) }

regards
Paco

____________________

Paco
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Listbox Column Header
Posted: Fri Mar 13, 2009 05:15 PM

Darrell,

TWBrowse uses these for the header colors:

oLbx:nClrForeHead
oLbx::nClrBackHead

However, you can only color the entire header, not a specific column's header. To color specific headers you will either have to use TCBrowse or TXBrowse.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion