Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - ListViewReport - how display icon in report mode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ListViewReport - how display icon in report mode

 Post Reply Post Reply
Author
Message
MUSAC View Drop Down
Newbie
Newbie


Joined: 26 July 2008
Location: New Zealand
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote MUSAC Quote  Post ReplyReply Direct Link To This Post Topic: ListViewReport - how display icon in report mode
    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
Back to Top
dentor View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2005
Location: France
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote dentor Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
MUSAC View Drop Down
Newbie
Newbie


Joined: 26 July 2008
Location: New Zealand
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote MUSAC Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.