List Object

For questions about using Classic.

Post » Thu Oct 18, 2012 5:09 pm

I feel embarassed to even ask this, but I can't find an easy answer anywhere.

I want to use the list object to list all of the tiles for my map editor. I was manually inserting an image to see how it looks and realized I don't know for sure how to do that.

for an image in your main folder is it just AppPath & "image.png"   ?

That didn't seem to work for me, does this object support different image types? Which ones?
B
7
S
2
Posts: 123
Reputation: 1,061

Post » Thu Oct 18, 2012 7:10 pm

You need to use the imagelist object with the list object to have images. It appears to work with bmp or ico files.

Here is a working example to get you started:
http://dl.dropbox.com/u/5426011/examples15/imagelist.cap
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu Oct 18, 2012 7:24 pm

To be able to use images in the list object you need to use the image list object, too. The images are managed by the image list object and will be accessed through indices.
First, add the image list object to your project and load an image that contains all icons. The height is autocalculated from the provided image and you select the width of each icon through a property (e.g. an image with 128x16, property set to 16, results in 8 icons 16x16 accessible as index 0 to 7)
Then add the list object, link to the image list object and assign image indices to the items.

+ System: Start of layout
-> List: Set image list to ImageList
-> List: Insert column 1 with text "Help" width 128
-> List: Insert column 2 with text "Me" width 128
-> List: Insert item "This" at -1 (image 0)
-> List: Insert item "works" at -1 (image 1)
-> List: Insert item "fine" at -1 (image 2)

This would show the first three icons found in the image list object, assigned to the first three items of the list object


EDIT: I should start writing less text to not be ninja'd anymore tulamide2012-10-18 19:26:22
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Oct 18, 2012 7:25 pm

Thanks for your reply. I guess I wasn't finding what I was looking for because I wasn't searching for "Image List." Since I can only use one file for this object, and I'm trying to create a system where you can add or remove tiles at will, seems like this won't work.

Is there anything similar or a well-known workaround for this kind of thing?
B
7
S
2
Posts: 123
Reputation: 1,061

Post » Thu Oct 18, 2012 7:26 pm

*forget about this post*tulamide2012-10-18 19:27:58
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Oct 18, 2012 7:36 pm

Oh my! Sorry about that Tulamide. But thanks for the explanation anyways. That actually seems to be the best explanation I could find for this after searching through the forums. And it's always good to know!
B
7
S
2
Posts: 123
Reputation: 1,061


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests