Große JPG Bilder in ListView hinzufügen

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Große JPG Bilder in ListView hinzufügen

Re: Große JPG Bilder in ListView hinzufügen

Post by KHA » 22 May 2019, 16:35

Danke, das hat wunderbar funktioniert.

Re: Große JPG Bilder in ListView hinzufügen

Post by garry » 21 May 2019, 13:41

kurz ein Beispiel , von 'just me'
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=64560

Code: Select all

;- see here  https://www.autohotkey.com/boards/viewtopic.php?f=76&t=64560 
#warn
#noenv
Setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: -DPIScale
Gui,2: Font,s14 CBlack,Lucida Console
;-------------------------
e4x=
(Ltrim Join`r`n
123;wasser;	0.30
124;	cola;	0.80
125;	fanta;	1.20
)
   Gui,2:Add, ListView, backgroundGray  grid x10 y5  h720 w1050 +hscroll altsubmit vMLV1A gMLV1B      , Nr|art-nr|name|PREIS-EURO
   gosub,lb
gui,2:show, x100 y10 h780 w1100,LV-Icon
return
;-----------------
2Guiclose:
exitapp
;-----------------
lb:
Gui,2:Submit,nohide
Gui,2:ListView,mlv1a
t1:=250
t2:=250
t3:=250
t4:=250
LV_ModifyCol(1,T1)
LV_ModifyCol(2,T2)
LV_ModifyCol(3,T3)
LV_ModifyCol(4,T4)

ils := IL_Create(1,1,0)                 ;-
IL_EX_SetSize(ils, 150,150)             ;- set ICO size  <<<<<<<<<<<<<<
LV_SetImageList(ils,1)
IL_Add(ILS, "C:\Windows\regedit.exe")   ;- define ICON-1
IL_Add(ILS, "C:\Windows\notepad.exe")   ;- define ICON-2
IL_Add(ILS, "C:\Windows\explorer.exe")  ;- define ICON-3
LV_Delete()
GuiControl,2: -Redraw,MLV1a
i=0
loop,parse,e4x,`n,`r
  {
  i++
  x:=a_loopfield
  c1=
  c2=
  c3=
  stringsplit,C,x,`;,
  LV_Add("icon" . i,i,c1,c2,c3)
  }
GuiControl,2: +Redraw,MLV1a
LV_ModifyCol(1,"right")     ;- move text to right
LV_ModifyCol(4,"right")
return
;--------
mlv1b:
return
;-----------------------------------------------------------------
IL_EX_SetSize(ILID, W, H) { ; just me  https://github.com/AHK-just-me/IL_EX 
   Return DllCall("ComCtl32.dll\ImageList_SetIconSize", "Ptr", ILID, "Int", W, "Int", H, "Int")
}
;=====================================

Große JPG Bilder in ListView hinzufügen

Post by KHA » 21 May 2019, 11:21

Hi,
ist es irgendwie möglich, jpg Bilder ca. 150x150 pixel große Datein in Listview einzubetten.
Habe mit ImageList versucht, aber die Bilder leider klein.
Und wie kann ich die Zeilen Höhe festlegen?

Danke und viele Grüße

Code: Select all

FileEncoding , UTF-8

MeineListe=
(
123	wasser	0,30€
124	cola	0,80€
125	fanta	1,20€
)

gui, +resize
Gui, Add, ListView, vMyListView r3 w700 Grid, Bild|ID|art-nr|name|preis

i := 0

Loop, parse, MeineListe, `n
{
if InStr(A_LoopField, "`t")
{
i++
ZkSplit := StrSplit(A_LoopField, "`t", "`n")
LV_Add("", "Bild150x150", i, ZkSplit[1], ZkSplit[2], ZkSplit[3] )
}
}

LV_ModifyCol()
Gui, Show, w700 h300
return

GUISize:
width:=A_GuiWidth-20
height:=A_GuiHeight-80
guicontrol, move, MyListView, w%width% h%height%
return

GuiClose:
GuiEscape:
Exitapp

Top