Print Page | Close Window

Highlighting SubItems

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=14255
Printed Date: 14 November 2024 at 11:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Highlighting SubItems
Posted By: keepITcool
Subject: Highlighting SubItems
Date Posted: 09 May 2009 at 7:48am
 
I use 2 reports: 1st report allows focusing on (single) subitems... then the 2nd report shows the details of the item selected in the 1st.
 
I need to focus the user's attention on the ITEM not on the ROW (plus I need same coloring when the 1st control has no focus)
 
However I can't find the setting for this in the paintmanager, which is limited to highlighting ROWS and doesn't bother with items.
(other than NOT highlighting the item, and highlighting the ROW, which is exactly the opposite of what I need (and expect!)
 
Do I need to resort to one of the event handlers and implement this all by my lonely self, of did I overlook the obvious?
 
Any ideas?


-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)



Replies:
Posted By: Aaron
Date Posted: 09 May 2009 at 9:36am
Hi,
 
You need:
 
    wndReportControl.FocusSubItems = True
    wndReportControl.SelectionEnable = True
 
it will select entire row (blue) and the item you click will stay white 
 
 
 
 


-------------
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: jpbro
Date Posted: 09 May 2009 at 10:13am
If I understand correctly, I think you want the inverse of the situation that Aaron describes (e.g. the item/cell will be blue and the rest of the row will be white). I don't think there is a property for this (although InvertHighlight might be a useful PaintManager property).

I have found a bit of a hack to get the desired results using the BeforeDrawRow event. Basically, you store the highligh colors at startup and the set them the the non-highlight background & foreground colors. Then, in the BeforeDrawRow event, you can set the Metrics Backcolor and Forecolor properties to the highlighted colors that you stored earlier. Here's a sample:


uploads/20090509_101007_RcHighlightCell.zip - uploads/20090509_101007_RcHighlightCell.zip

I'm not 100% sure why the code works though, as I would have expected changing the Metrics backcolor to set the backcolor for the whole row (as it does if you change the Font.Bold property for example), but it does seem to only set the currently selected item/cell colors. Screenshot:




If this is not what you require, perhaps you could post a mockup of what you want the RC to look like?


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

Language: Visual Basic 6.0 SP6



Posted By: keepITcool
Date Posted: 09 May 2009 at 2:27pm
@jpbro:  Your example  screenshot it exactly what i meant. nice and short too...
thx!
 


Posted By: Aaron
Date Posted: 09 May 2009 at 3:03pm
Hi Jason,
 
You would expect that all items would be painted same color, but I think after BeforeDrawRow event, the RC repaints the selected row... Same way as you would display a MsgBox, the selected row becomes grayed and after the ReportControl has focus again the selected row will be blue again. 
 
Well it works, that's important
 
 
 
  


-------------
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....



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