Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Highlighting SubItems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Highlighting SubItems

 Post Reply Post Reply
Author
Message
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Topic: Highlighting SubItems
    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)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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

Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2009 at 2:27pm
@jpbro:  Your example  screenshot it exactly what i meant. nice and short too...
thx!
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.