Listbox Column Header

Listbox Column Header

Postby cdmmaui » Thu Mar 12, 2009 1: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
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Listbox Column Header

Postby sambomb » Thu Mar 12, 2009 8: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
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Listbox Column Header

Postby cdmmaui » 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
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Listbox Column Header

Postby Francisco Horta » 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
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: Listbox Column Header

Postby James Bott » Fri Mar 13, 2009 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests