AndreLuiz
(Getting the hang of it)
2018-04-10 09:21 PM
ListView - Frame image

[PT-BR]
Olá a todo, eu preciso muito saber se existe uma forma de enquadrar uma imagem em um listview, porque quando eu adiciono um imagens de tamanhos variados em uma imagelist, e ao adicionar a um ícone da listview, eu fica destorcido.

[ENG]
Hi all, I really need to know if there is a way to frame an image in a listview, because when I add an image of varying sizes in an imagelist, and when I add a listview icon, I get distorted.

 Code:
$IMG_Categoria				= $Form.ImageList
$IMG_Categoria.ImageSize	= 100, 150

dim $i
for $i=1 to ubound($array)
	$=$IMG_Categoria.AddStrip($array[$i-1], $System.Color(0,0,0), 100, 150)
next

$ListViewTemporada					= $Tab_Main.ListView
$ListViewTemporada.BorderStyle		= 0
$ListViewTemporada.Size				= $Tab_Main.ClientSize
$ListViewTemporada.Width			= $ListViewTemporada.Width-219
$ListViewTemporada.Height			= $ListViewTemporada.Height-105
$ListViewTemporada.top				= $ListViewTemporada.top+100
$ListViewTemporada.Columns.Count	= 1
$ListViewTemporada.SmallImageList	= $IMG_Categoria
$ListViewTemporada.LargeImageList	= $IMG_Categoria
$ListViewTemporada.BackColor		= "Black"
$ListViewTemporada.Sorting 			= 2
$ListViewTemporada.FontName			= "Segoe UI"
$ListViewTemporada.FontBold			= 1
$ListViewTemporada.ForeColor		= 0, 128, 255
$ListViewTemporada.View				= 0
$ListViewTemporada.Anchor			= 15





LonkeroAdministrator
(KiX Master Guru)
2018-04-12 05:05 PM
Re: ListView - Frame image

$=$IMG_Categoria.AddStrip($array[$i-1], $System.Color(0,0,0), 100, 150)

addStrip takes your picture and makes several smaller pictures (strips) out of it.
are you not wanting to use .Add() or .AddRange() intead of .AddStrip()?



AndreLuiz
(Getting the hang of it)
2018-04-13 07:31 AM
Re: ListView - Frame image

[PTBR]
Bom na verdade eu tentei usar, mas a imagem não chega nem aparecer, e não faço ideia do que pode ser.
Ah eu não conheço esse ".addRange()", essa coisa de falta de documentação é difícil.
Bom você pode me dá um exemplo? Obrigado desde já!

[ENG]
Well, actually I tried to use it, but the picture doesn't even show up, and I have no idea what it could be.
Oh, I don't know that. " AddRange()", this lack of documentation is difficult.
Well can you give me an example? Thank you very much.


LonkeroAdministrator
(KiX Master Guru)
2018-04-13 06:33 PM
Re: ListView - Frame image

https://msdn.microsoft.com/en-us/library...(v=vs.110).aspx

looking at the kixforms.chm, it might not be supported since it is not in the chm file.


imageListSmall.Images.Add("C:\MySmallImage1.bmp")

however should work as it is also in the documentation.


AndreLuiz
(Getting the hang of it)
2018-04-16 03:45 PM
Re: ListView - Frame image

[PTBR]
Bom na verdade eu já faço isso só que não funciona, mas sem grandes problemas, por enquanto irei usar do jeito que está consegui redimensionar as imagens no tamanho certo que eu quero!

Muito obrigado por sua disponibilidade.
[ENG]
Well, actually I already do it just that it does not work, but without big problems, for now I will use the way it is that I managed to resize the images in the right size I want!

Thank you very much for your availability.


LonkeroAdministrator
(KiX Master Guru)
2018-04-16 09:49 PM
Re: ListView - Frame image

Glad you found a way to make it work.