#91943 - 2003-04-22 04:20 PM
changing Icon in listview
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I am populating a listview with a 'default icon (32) and then later on the script does some testing and then changes (32) into (9 or 34)
problem is, the icon doesn't change...
code:
Function PCStatus() DIM $mac,$name
for each $item in $list.items $name=$item.SubItems(1).Text if wshping($name)[1] >0 $Item.subitems(0).icon=34 else $return = EnumMAC('164.51.34.5',$name) if not @error $mac = $return[2,0] shell 'cmd /c \\a06\logon\tools\wol.exe ' + $mac +' > nul' sleep 10 if wshping($name)[1] >0 $Item.subitems(0).icon=34 else $Item.subitems(0).icon=9 endif else $Item.subitems(0).icon=9 endif endif $list.refresh next EndFunction
help...
|
|
Top
|
|
|
|
#91945 - 2003-04-22 05:36 PM
Re: changing Icon in listview
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
thanks. I got it to work with: $Item.imageindex = 9 [ 22. April 2003, 17:37: Message edited by: Radimus ]
|
|
Top
|
|
|
|
#91946 - 2003-07-17 07:47 PM
Re: changing Icon in listview
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
how do I get the icon/index of the icon in the listview?
|
|
Top
|
|
|
|
#91948 - 2003-07-17 08:15 PM
Re: changing Icon in listview
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
nope
for each $item in $ListViewEx1.items $index = $item.subitems(0).imageindex ? $index next
returns nothing
|
|
Top
|
|
|
|
#91953 - 2003-07-18 01:55 PM
Re: changing Icon in listview
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Captain, yes I remember your comment. And then just lately, Kelly brought up the same issue. Your right, of course ... between the private build and the subsequent beta release, I switched from system drawn tabs to owner drawn tabs. In the process, the tab text and the image got thrown out of alignment. Plus, the behavior of the tabs when they are clicked changed. Instead of popping-up in 3D, they kinda look to be dropping down.
Anyways, I fixed the text part of the tab last night. I am currently working on the image part now. So this will be fixed in the next release. Because the tabs are owner-drawn, have lots of flexibility in terms of their appearance, so might have to re-cycle on it a couple of times before its perfect.
-Shawn
|
|
Top
|
|
|
|
#91954 - 2003-07-18 01:58 PM
Re: changing Icon in listview
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#91957 - 2003-07-18 03:02 PM
Re: changing Icon in listview
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#91960 - 2003-07-18 10:33 PM
Re: changing Icon in listview
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Yes, Shell is going away in favour of Diagnostics.Process() and Diagnostics.ProcessStartInfo classes. Here's a link to how these classes work. The re-direction of stdout will NOT be there on day one guaranteed, but the framework will be and and will set the stage for day two. I'm just waiting to iron-out the new Namespace names before I proceed. I dont count this item as a "biggie" because its new and stand-alone.
Run a second console app and read its output.
Let me know what you think of that link. It looks like lots-o-fun.
|
|
Top
|
|
|
|
#91962 - 2003-07-19 12:55 AM
Re: changing Icon in listview
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 657 anonymous users online.
|
|
|