Highlighting SubItems |
Post Reply |
Author | |
keepITcool
Groupie Joined: 08 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
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) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
keepITcool
Groupie Joined: 08 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
@jpbro: Your example screenshot it exactly what i meant. nice and short too...
thx!
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |