Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How do I fix the image in the TListView?


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Mar 5, 2018 7:13 AM Last Post By: Debbie Erickson Threads: [ Previous | Next ]
Debbie Erickson

Posts: 12
Registered: 4/4/13
How do I fix the image in the TListView?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2018 2:29 PM
I had a previous post that Remy answered. I now see an image! Very happy. I did have the wrong index. Sorry! Anyway, the image is a bitmap. It appears that the image is being truncated. The image is the word "GSA" in white lettering on a blue background. When it displays in grid I only see the G and half of the S. How do I fix the appearance?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: How do I fix the image in the TListView?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2018 2:54 PM   in response to: Debbie Erickson in response to: Debbie Erickson
Debbie Erickson wrote:

Anyway, the image is a bitmap. It appears that the image is being
truncated. The image is the word "GSA" in white lettering on a blue
background. When it displays in grid I only see the G and half of the
S. How do I fix the appearance?

What are the dimensions of the bitmap that you are putting in the
TImageList? What are the Width and Height properties of the TImageList
being set to? They need to match.

--
Remy Lebeau (TeamB)
Debbie Erickson

Posts: 12
Registered: 4/4/13
Re: How do I fix the image in the TListView?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 4, 2018 12:31 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Debbie Erickson wrote:

Anyway, the image is a bitmap. It appears that the image is being
truncated. The image is the word "GSA" in white lettering on a blue
background. When it displays in grid I only see the G and half of the
S. How do I fix the appearance?

What are the dimensions of the bitmap that you are putting in the
TImageList? What are the Width and Height properties of the TImageList
being set to? They need to match.

--
Remy Lebeau (TeamB)

The bmp file is in the resource file. It is dynamically loaded into the TImageList. When I did a showmessage on the image file dimensions, they are height:= 18 and Width:= 32. What size does it need to be to completely display within the TImageListView? .

The image file is used by other areas in the application, so is it possible to dynamically alter the dimensions just prior to usage in this functonality?
John Treder

Posts: 349
Registered: 8/2/02
Re: How do I fix the image in the TListView?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 4, 2018 4:07 PM   in response to: Debbie Erickson in response to: Debbie Erickson
Debbie Erickson wrote:

What are the dimensions of the bitmap that you are putting in the
TImageList? What are the Width and Height properties of the TImageList
being set to? They need to match.

--
Remy Lebeau (TeamB)

The bmp file is in the resource file. It is dynamically loaded into the TImageList. When I did a showmessage on the image file dimensions, they are height:= 18 and Width:= 32. What size does it need to be to completely display within the TImageListView? .

The image file is used by other areas in the application, so is it possible to dynamically alter the dimensions just prior to usage in this functonality?

You need to set the width and height of the TImageList to the size you want all its images to be. So if you want the images in yur TListView to be 18x32, you need to set the TImageList's Width and Height to match.

--
John
Debbie Erickson

Posts: 12
Registered: 4/4/13
Re: How do I fix the image in the TListView?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 5, 2018 7:13 AM   in response to: Debbie Erickson in response to: Debbie Erickson
Thank you to both Remy and John. The combined answers got me to where I needed to be. Thank you both! I did not realize I needed to set the height/width properties on the TImageList. Feel pretty stupid, too, that I was referencing the wrong column to add an itemindex. But it is now working.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02