Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - column icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

column icon

 Post Reply Post Reply
Author
Message
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post Topic: column icon
    Posted: 26 June 2006 at 7:47pm

Hi,

I am trying to add icons to my column of reportcontrol, but for some reason the icons are not dipalyed, what I am doing wrong:
Code
 
 
Const ATTCHNENT = 100
Const WARNING =101
 
Dim Column As ReportColumn

wndview.Columns.DeleteAll
wndview.Records.DeleteAll
wndview.SetImageList imlToolbarIcons
Dim i As Integer
    With wndview
        Set Column = .Columns.Add(0, "", 15, True)
        Column.Icon = ATTACHMENT
        Set Column = .Columns.Add(1, "", 15, True)
        Column.Icon = WARNING
        .Columns.Add 2, "Due Date", 150, True
        .Columns.Add 3, "User", 150, True
        .Columns.Add 4, "Subject", 180, True
    End With
   
   AddTask True, True, Date, "Joe", "Task # 1"
 
    wndview.Populate
 
 
Note: I am using ImageList Control
 
and when I try to add task to my reportcontrol, nothing row is added????
 
code
 
Function AddTask(ATTACH As Boolean, WARNING As Boolean, TaskDate As Date, TaskUser As String, TaskSubject As String) As ReportRecord
    Dim Task As ReportRecord
    Dim ItemTask As ReportRecordItem
   
    Set ItemTask = Task.AddItem(ATTACH)
    If ItemTask.Value = True Then
        ItemTask.Icon = ATTACHMENT
    End If
    Set ItemTask = Task.AddItem(WARNING)
    If ItemTask.Value = True Then
        ItemTask.Icon = WARNING
    End If
    Task.AddItem TaskUser
    Task.AddItem TaskSubject
   
    Set AddTask = Task
   
End Function
 
 
Thank you,
 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 9:07am
Try increasing the width of the columns, I assume you are adding 16x16 icons:

        Set Column = .Columns.Add(0, "", 18, True)
        Column.Icon = ATTACHMENT
        Set Column = .Columns.Add(1, "", 18, True)
        Column.Icon = WARNING
Back to Top
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 4:04pm
Hi,
I tried but not luck and yes I am using 16x16.
any other suggestion
Thank you
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 5:04pm
Hi,

Are you sure that Icons which you'd like to show have indexes 100 and 101 in your image list? You might have change them to 1 and 2 correspondingly.

Also, as it was previously mentioned, ensure that your cell have enough space to draw an icon, both vertically and horizontally.

--
WBR,
Serge
Back to Top
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 2:57pm
okay,
it's all about the number, you are right is the index who did it.
sorry for the trouble.
Thank you
 
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.172 seconds.