Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] Highlight & Images in Markup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Highlight & Images in Markup

 Post Reply Post Reply
Author
Message
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 Topic: [SOLVED] Highlight & Images in Markup
    Posted: 18 June 2009 at 11:04am
I'm using markup in a ReportRecordItem to display a series of previews of pages of a PDF. The JPG thumbnails are converted to StdPicture objects and added as follows:


   ReportControlGlobalSettings.Icons.AddBitmap PageInfo.Picture.Handle, AttachmentInfo.IndexOffset + PageInfo.PageNumber, xtpImageNormal, False


Where PageInfo.Picture is the StdPicture.

This all works great except that the highlighted ReportRecordItem shows the highlight colour in place of any part of the page that is pure white. The result is as follows:



The image at the top left of the window shows the StdPicture as it is drawn on a form. The blue highlighted picture shows the reportcontrol replacing the white pixels of the page with the highlight colour.

Question: Is there a way to prevent the colour replacement using a property of the ReportControl?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 18 June 2009 at 12:15pm
Hi Jason,
 
If you don't want a colored selected row, you can set SelectionEnabled = false (now only focus rect shows) or you can play with HighLightForeColor and HighLightBackColor, in case you need a colored selected row.
 
 
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: 18 June 2009 at 12:43pm
Thanks for the reply Aaron.

It turns out that the RC is replacing the colour that it finds at the top-left pixel coordinate with the highlight colour (not replacing white with the highlight colour).

I could probably live without highlighting (at least for the preview cell), but ideally, we'd be able to turn off the colour replacement.

I can also replace the top-left colour of all of my images with a colour that is not in the image (at a processing cost), or one that is at least unlikely to be in the image (faster, but not as robust) and both of these options work okay, but again having an option to use colour substitution or not would be ideal.

I suspect the problem stems from the fact that the RC typically uses the icons property for just that - icons. In most cases transparency is desired for icons, but now with the new markup features, transparency won't always be desired and the images on the RC won't always be icons.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 18 June 2009 at 1:36pm
Hi Jason,
 
Do you have a test project to reproduce? I want to try something
 
Thanks
 
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: 18 June 2009 at 1:47pm
I don't have one that I can post (it has lots of 3rd party and proprietary code), but I will try and make a quick sample.

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

Language: Visual Basic 6.0 SP6

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: 18 June 2009 at 2:20pm
Turns out it was a good idea to make a demo project, as I was able to think of a workaround while coding it. You can add a Border tag with a white background of the same size as your image and then the transparency of the image will show the white border background instead of the highlight colour.

In case you had any other ideas or things you want to try, here's a small sample:

uploads/20090618_141930_RCHighlightImag.zip

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

Language: Visual Basic 6.0 SP6

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: 18 June 2009 at 3:06pm
Hi Jason,
 
Actually, I had an idea, but it is same as you did: creating border. I did a test once with markup in ReportControl that included images + text but I didn't see your problem.
 
 
 
 
 
 
 
I tried another thing though but it seems to work in IDE only
 
Try this in IDE: ReportControlGlobalSettings.Icons.MaskColor = ReportControl1.PaintManager.HighlightBackColor (maybe you have to run test twice (also a thing I can't explain)) You will see that the white part of image is showing. But then again you can't just use a highlight color because that part of image doesn't show in reportitem. I think using border is best thing to do
 
 
 
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.204 seconds.