don't know how
here created 4 listviews, see 3 icons / row
Code:
MODIFIED=20100124
#NoEnv
#SingleInstance force
SetBatchlines -1
setworkingdir, %a_scriptdir%
transform,S,chr,32
IXE=%A_programfiles%\Mozilla Firefox\firefox.exe
WA=%A_screenwidth%
HA=%A_screenheight%
SW :=(WA*99)/100 ;Gui width
GSH :=(HA*94)/100 ;Gui height
R3CSV=%A_scriptDir%\LV_MENU_ICONS_Subfolder ;subfolder for this script
ifnotexist,%R3CSV%
FileCreateDir,%R3CSV%
CSVFILES=%R3CSV%\CSVFILES ;here are files for row/colums saved
ifnotexist,%CSVFILES%
FileCreateDir,%CSVFILES%
F11=%CSVFILES%\File11.txt
F12=%CSVFILES%\File12.txt
F13=%CSVFILES%\File13.txt
F14=%CSVFILES%\File14.txt
gosub,gosub11 ;create testfiles if not exist firsttime for test ( see lastlines )
;---------Columns width --------------------------------------
T1 :=(SW/24)
LSW :=(SW/22) ;ListView width
T4 :=(SW/7)
LSW4 :=(SW/6) ;ListView4 width
LSH :=(HA*83)/100 ;ListView height
DRI2:=(1*T1)
DRI3:=(2*T1)
DRI4:=(3*T1)
Gui,2:Font,CDefault s14 , Verdana
;---- LV-1 -----------------------------------------------------------------------------------------------------
Gui,2:Add, ListView, backgroundGray grid x0 y30 h%LSH% w%LSW% +hscroll altsubmit vMLV1A gMLV1B, A
FileXX=%F11%
MLVXX =MLV1A
gosub,FillListview
;---- LV-2 -----------------------------------------------------------------------------------------------------
Gui,2:Add, ListView, backgroundSilver grid x%DRI2% y30 +hscroll altsubmit h%LSH% w%LSW% vMLV2A gMLV2B,B
FileXX=%F12%
MLVXX =MLV2A
gosub,FillListview
;---- LV-3 -----------------------------------------------------------------------------------------------------
Gui,2:Add, ListView, backgroundSilver grid x%DRI3% y30 +hscroll altsubmit h%LSH% w%LSW% vMLV3A gMLV3B,C
FileXX=%F13%
MLVXX =MLV3A
gosub,FillListview
;---- LV-4 -----------------------------------------------------------------------------------------------------
Gui,2:Add, ListView, backgroundSilver grid x%DRI4% y30 +hscroll altsubmit h%LSH% w%LSW4% vMLV4A gMLV4B,D
FileXX=%F14%
MLVXX =MLV4A
gosub,FillListview
Gui,2: Show,x1 y1 w%SW% h%GSH%, MENU_ICONS RightClick opens Folder %MODIFIED%
return
;=============================== END GUI ==================
2GuiClose:
exitapp
;--------------------------------------
FillListview:
Gui,2:default
Gui,2:Submit,nohide
Gui,2:ListView,MLVXX
;ILStatus := IL_Create(1,1,0) ;small
ILStatus := IL_Create(1,1,1) ;bigger
LV_SetImageList(ILStatus, 1)
LV_Delete()
I=0
X++
if X=4
LV_ModifyCol(1,T4)
else
LV_ModifyCol(1,T1)
loop,read,%FileXX%
{
I++
BX1=
stringsplit,BX,A_LoopReadLine,`;,
IconNumber := IL_Add(ILSTATUS, "%pictxx05%" ) ;picture which not exist
;if BX1 contains http://
; IconNumber := IL_Add(ILSTATUS, "LV_MENU_ICONS_Subfolder\ico\ie.ico" )
IconNumber := IL_Add(ILSTATUS, BX1 )
if x=4
LV_Add("",BX1)
else
LV_Add("icon". IconNumber,BX1)
}
return
;-----------------------------------------------------------------
;------------------------------
MLV1B:
Gui,2:Submit,nohide
Gui,2:ListView,MLV1A
FileXX=%F11%
MLVXX =MLV1A
gosub,events
return
;--------------------------------------
;------------------------------
MLV2B:
Gui,2:Submit,nohide
Gui,2:ListView,MLV2A
FileXX=%F12%
MLVXX =MLV2A
gosub,events
return
;--------------------------------------
;------------------------------
MLV3B:
Gui,2:Submit,nohide
Gui,2:ListView,MLV3A
FileXX=%F13%
MLVXX =MLV3A
gosub,events
return
;--------------------------------------
;------------------------------
MLV4B:
Gui,2:Submit,nohide
Gui,2:ListView,MLV4A
FileXX=%F14%
MLVXX =MLV4A
gosub,events
return
;--------------------------------------
;############# EVENTS ############################
EVENTS:
RN:=LV_GetNext("C")
RF:=LV_GetNext("F")
GC:=LV_GetCount()
if (RF="" OR RF=0)
return
;LV_GetText(C1,A_EventInfo,1)
;C1=%C1%
if A_GuiEvent=normal
{
LV_GetText(C1,A_EventInfo,1)
stringmid,C1v,C1,2,2 ;:\
stringmid,C1a,C1,1,4
if C1v=:\
{
ifexist,%C1%
run,%C1%
else
msgbox,%C1% not exist
return
}
; to make firefox to standard browser open a text file with firefox
if (C1a="http" or C1a="www.")
run,%IXE% %C1%
;return
}
/*
if A_GuiEvent=K
{
stringmid,C1v ,C1,2,2 ;:\
GetKeyState,state,f ;open folder
if state=D
{
if C1v=:\
{
SplitPath,C1, name, dir2, ext, name_no_ext, drive
run,%dir2%
return
}
return
}
C1=
}
*/
;------------------ END GUIEVENT K -------------------------------------------
if A_GuiEvent=Rightclick
{
LV_Modify(RN, "-Select")
LV_GetText(C1,A_EventInfo,1)
stringmid,C1v,C1,2,2 ;:\
if C1v=:\
{
SplitPath,C1, name, dir2, ext, name_no_ext, drive
run,%dir2%
return
}
return
}
if A_GuiEvent = DoubleClick
{
LV_GetText(C1,A_EventInfo,1)
return
}
return
;################ END EVENTS ###########################
;------------ CREATE TEST FILES --------------------------------------------------------------
GOSUB11:
ifnotexist,%F11%
{
Fileappend,C:\WINDOWS\system32\clipbrd.exe`;`r`n,%F11%
;Fileappend,C:\WINDOWS\system32\sysedit.exe`;`r`n,%F11%
Fileappend,c:\windows\system32\calc.exe`;`r`n,%F11%
}
ifnotexist,%F12%
{
Fileappend,C:\WINDOWS\system32\taskmgr.exe`;`r`n,%F12%
Fileappend,C:\WINDOWS\system32\restore\rstrui.exe`;`r`n,%F12%
}
ifnotexist,%F13%
{
Fileappend,C:\WINDOWS\system32\perfmon.exe`;`r`n,%F13%
Fileappend,C:\WINDOWS\system32\charmap.exe`;`r`n,%F13%
}
ifnotexist,%F14%
{
Fileappend,Tools1`;`r`n,%F14%
Fileappend,Tools2`;`r`n,%F14%
}
return
;====================== end create testfiles =======================