ListViewReport - how display icon in report mode |
Post Reply |
Author | |
MUSAC
Newbie Joined: 26 July 2008 Location: New Zealand Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 31 July 2008 at 4:44am |
Hi guys
I am trying to add a bitmap into a ListViewReport. I can display the icon in icon "mode" but not in a column in report mode. Any ideas, or does the control not support this? I wish I was clever!!!!! I am using WinXp SP3/VB6/CJ 12. Many thanks |
|
dentor
Senior Member Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
Post Options
Thanks(0)
|
Hello,
To add bitmap into a ListViewReport, we must set Iconsize, set the number of the bitmap when adding the listItem, and load the bitmap in the icons collection of the ListViewReport with the same number.
For example:
ListViewReport.IconSize = 16
ListViewReport.ListItems.Add , , "Options", 1
ListViewReport.Icons.LoadBitmap "Options.bmp", 1, xtpImageNormal
Hoping it will help you.
|
|
MUSAC
Newbie Joined: 26 July 2008 Location: New Zealand Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Thanks Dentor
It leaves a space for the bmp but the image itself does not show up: Heres the code I'm using With lstPurchaseOrders .ColumnHeaders.Add , , "Status", .Width / 8 .ColumnHeaders.Add , , "PO Number", .Width / 8 .ColumnHeaders.Add , , "Part", .Width / 8 .ColumnHeaders.Add , , "Supplier", .Width / 8 .ColumnHeaders.Add , , "Contact", .Width / 8 .ColumnHeaders.Add , , "Tel No", .Width / 8 .ColumnHeaders.Add , , "Our Ref", .Width / 8 .ColumnHeaders.Add , , "Order Date", .Width / 8 .IconSize = 16 .ListItems.Add , , "Status", 1 .Icons.LoadBitmap App.Path & "\Waiting.png", 1, xtpImageNormal .ListItems(.ListItems.Count).SubItems(1) = "PO1234" .ListItems(.ListItems.Count).SubItems(2) = "1234-567 Shaft" Any ideas? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Code looks good.
Check if .Icons.Count = 1 after you load bitmap.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |