AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to just list 1 icon in the listview ?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
L-Cartinine



Joined: 28 Nov 2007
Posts: 69

PostPosted: Fri Nov 21, 2008 4:36 am    Post subject: Is it possible to just list 1 icon in the listview ? Reply with quote

I see it possible to retrieve all icons againsts all rows in a Listview but would it possible to retrieve just 1 icon against 1 row selection or against a checkbox to enhance the look that is the row that is selected and the other rows dont have any icons?
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Fri Nov 21, 2008 8:16 pm    Post subject: Reply with quote

Yes.
Code:
Gui, Add, ListView, grid r20 AltSubmit gLV, Name|Size (KB)
ID := IL_Create(1)
LV_SetImageList(ID)
IL_Add(ID,"shell32.dll",44)
Loop, %A_ScriptDir%\*.*
 LV_Add("Icon",A_LoopFileName,A_LoopFileSizeKB)
LV_ModifyCol()

Gui, Show
return
GuiClose:
ExitApp

LV:
If (A_GuiEvent == "I")
{
 If InStr(ErrorLevel,"s",1)
  LV_Modify(A_EventInfo,"Icon0")
 If InStr(ErrorLevel,"S",1)
  LV_Modify(A_EventInfo,"Icon1")
}
return


P.S. It would have been simpler to edit your original question than to double post.
Back to top
View user's profile Send private message Visit poster's website
L-Cartinine



Joined: 28 Nov 2007
Posts: 69

PostPosted: Tue Nov 25, 2008 7:21 pm    Post subject: Reply with quote

great thanks i test it out when i get chance!
Back to top
View user's profile Send private message
L-Cartinine



Joined: 28 Nov 2007
Posts: 69

PostPosted: Tue Nov 25, 2008 7:23 pm    Post subject: Reply with quote

that is not a double post that is something completly different! i need to disable a checkbox in that post. how is that the same as listing 1 icon????

i dont understand how you think there the same question being into code.

i thought the title of the 2 gave it away.

1. how do i disable a checkbox?

2. how do i list 1 icon?

thanks for helping me with the 2. though!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group