Print Page | Close Window

column icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4494
Printed Date: 30 April 2025 at 6:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: column icon
Posted By: moe188
Subject: column icon
Date 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,
 



Replies:
Posted By: SuperMario
Date 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


Posted By: moe188
Date Posted: 27 June 2006 at 4:04pm
Hi,
I tried but not luck and yes I am using 16x16.
any other suggestion
Thank you
 


Posted By: sserge
Date 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


Posted By: moe188
Date 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
 



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