Print Page | Close Window

ListViewReport - how display icon in report mode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=11672
Printed Date: 05 October 2024 at 6:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ListViewReport - how display icon in report mode
Posted By: MUSAC
Subject: ListViewReport - how display icon in report mode
Date 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



Replies:
Posted By: dentor
Date Posted: 31 July 2008 at 5:36am
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.
 


Posted By: MUSAC
Date Posted: 31 July 2008 at 3:07pm
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?


Posted By: Oleg
Date Posted: 01 August 2008 at 3:03am
Code looks good.
 
Check if .Icons.Count = 1 after you load bitmap.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net