Custom picture in ReportControl |
Post Reply |
Author | |
rdeboer
Groupie Joined: 29 April 2004 Location: Netherlands Status: Offline Points: 81 |
Post Options
Thanks(0)
Posted: 16 December 2010 at 3:28pm |
Hi,
I add a custom snapshot of a picture to a reportcontrol like this: imgPrimary.Picture = LoadPicture(GetTmpPath & "\snapshot.jpg") ListMovies.Icons.AddBitmap imgPrimary.Picture, ListMovies.Rows.Count, xtpImageNormal, False So far so good. The picture shows in the 1st cell of the row. Now, when i click on a row, i want to get that picture and display it in a PictureBox. I tried this: Picture2.Picture = ListMovies.Icons.GetImage(1, 128) But that doesn't do the trick Can anyone help?
|
|
Product: Xtreme Suite Pro (ActiveX) version 11
Platform: Windows XP SP3 (32bit) Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
If you attach a small sample project with code & picture, I will try and get it working for you.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Try this instead: Picture1.Picture = Me.ImageManager1.Icons.GetImage(1, 128).CreatePicture(xtpImageNormal) Note: if your image is an alpha image this doesn't work because PictureBox object doesn't support it
|
|
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.... |
|
rdeboer
Groupie Joined: 29 April 2004 Location: Netherlands Status: Offline Points: 81 |
Post Options
Thanks(0)
|
Thanks, it worked out, but i also found out that if an image has alpha parts (like you said) it looks really ugly.
I remember some code that could add a custom control to a cell in the ReportControl, but i can't find it anywhere in the forum. Best solution for me would be adding a picturebox or image to the cell. Anyone got vb6 code or an example for that? Would MarkUpImage be able to do the job? |
|
Product: Xtreme Suite Pro (ActiveX) version 11
Platform: Windows XP SP3 (32bit) Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Just load images in .Icons collecting and assign icon to ReportItem.IconIndex, no need for adding extra controls... |
|
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.... |
|
rdeboer
Groupie Joined: 29 April 2004 Location: Netherlands Status: Offline Points: 81 |
Post Options
Thanks(0)
|
That's what i did, but some images look ugly in the list.
It's not the image itself, wich looks perfect in PictureBox, its the way ReportControl shows them: |
|
Product: Xtreme Suite Pro (ActiveX) version 11
Platform: Windows XP SP3 (32bit) Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Try Me.ReportControl1.Icons.MaskColor = -1
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
rdeboer
Groupie Joined: 29 April 2004 Location: Netherlands Status: Offline Points: 81 |
Post Options
Thanks(0)
|
ListMovies.Icons.MaskColor = 0 did the trick!
Thanks again for your help
|
|
Product: Xtreme Suite Pro (ActiveX) version 11
Platform: Windows XP SP3 (32bit) Language: Visual Basic 6.0 SP6 |
|
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 |