View unanswered posts | View active topics It is currently Wed Mar 01, 2017 11:53 pm



This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
 Changing look of header cell for current day 
Author Message

Joined: Mon Aug 08, 2011 9:05 am
Posts: 1
Post Changing look of header cell for current day
I want to change the text color and background color of the upper header for the multiple days, one-day per column configuration variant of the DateArea control.

I'm using the DataAreaBean approach (without a visual interface, but handwritten configuration).

I have derived form GridCellDecorator and added this new decorator (with layer 50) to the header. In paintCell I get the date of the cell via

Code:
Calendar cellDate = grid.getTrackedGrid().getDateRangeForCell(r, c).getStart();


and check the date against the current day. In the case that we have to draw the header cell for the current day I can now paint my own background via
Code:
setColor(...); fillRect(...)
(likely overwriting the default header background). I'm sure that I can also draw text using the text color I want, however I assume that I have to implement all the header magic like using the best fitting header label on my own - which of course I would like to avoid. It seems like Decorator in this case is OK for additional drawing below or above existing drawings, but not for modifying existing drawing code.

Is there another way to link into rendering of headers and changing colors without loosing above functionality of the existing rendeirng/layouting code?


Tue Aug 09, 2011 2:10 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Changing look of header cell for current day
Hello,

Please post a support ticket on migcalendar.com

Thanks,


Tue Aug 09, 2011 5:13 pm
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 2 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.