Print Page | Close Window

[SOLVED] Does simple way to set cell backcolor?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19246
Printed Date: 20 February 2025 at 12:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Does simple way to set cell backcolor?
Posted By: fatwood
Subject: [SOLVED] Does simple way to set cell backcolor?
Date Posted: 29 November 2011 at 10:22pm
I want to set column(3) backcolor to RED. 

...
Item = Record.AddItem "xxxxxxxxxx"
Item.BackColor = vbRED

Is any smple way to do this?

Like this:




Replies:
Posted By: jpbro
Date Posted: 02 December 2011 at 11:30pm
You mean simpler than Item.Backcolor = vbRed?

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 03 December 2011 at 12:56pm
Hi,
 
Easiest way is to set BackColor in BeforeDrawRow event
 
Private Sub wndReportControl_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
    
    Select Case Item.Index
        Case 1
            Metrics.BackColor = vbRed
        Case 2
            Metrics.BackColor = vbYellow
        Case 3
            ....
    End Select
       
End Sub
 
 
 
Voila Wink
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: fatwood
Date Posted: 29 December 2011 at 3:32am
thx Aaron.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net