Page 1 of 1 1
Topic Options
#213257 - 2018-04-10 09:21 PM ListView - Frame image
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 86
Loc: Brasil, João pessoa
[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




Top
#213258 - 2018-04-12 05:05 PM Re: ListView - Frame image [Re: AndreLuiz]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
$=$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()?

_________________________
!

download KiXnet

Top
#213259 - 2018-04-13 07:31 AM Re: ListView - Frame image [Re: Lonkero]
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 86
Loc: Brasil, João pessoa
[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.

Top
#213260 - 2018-04-13 06:33 PM Re: ListView - Frame image [Re: AndreLuiz]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
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.
_________________________
!

download KiXnet

Top
#213261 - 2018-04-16 03:45 PM Re: ListView - Frame image [Re: Lonkero]
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 86
Loc: Brasil, João pessoa
[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.

Top
#213262 - 2018-04-16 09:49 PM Re: ListView - Frame image [Re: AndreLuiz]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
Glad you found a way to make it work.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  ShaneEP, Mart, Radimus, Jochen, Allen, Glenn Barnas 
Hop to:
Shout Box

Who's Online
0 registered and 165 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.032 seconds in which 0.011 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org