#89303 - 2002-11-05 06:42 PM
Re: Kixforms - Scrolling through a ListView object
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Is this what you're after?
code:
$Item.Selected = 1
|
|
Top
|
|
|
|
#89305 - 2002-11-05 07:12 PM
Re: Kixforms - Scrolling through a ListView object
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
I think the only way you can do this now is to do a SendKeys() on the ListView item.
Give this a try...
code:
FOR EACH $Item IN $List.Items $Item.SetFocus $nul=SendKeys({right}) $RC = IsPing($Item.SubItems(0).Text) $PingError = @error SELECT CASE $PingError = 0 $PingStatus = 'On' CASE $PingError = 1 $PingStatus = 'RAS' CASE $PingError = 2 $PingStatus = 'Off' CASE $PingError = 3 $PingStatus = 'Gone' CASE 1 $PingStatus = 'PROBLEM' ENDSELECT $Item.SubItems(1).Text = $PingStatus $Item.SubItems(2).Text = $AddressIP $Item.SubItems(3).Text = $AddressName $Item.SubItems(4).Text = $IPError NEXT
|
|
Top
|
|
|
|
#89308 - 2002-11-05 07:38 PM
Re: Kixforms - Scrolling through a ListView object
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
I tested this method on my CompPswdAge script. It worked...
code:
FOR EACH $Item IN $List.Items $List.SetFocus $Item.Selected = 1 $RC = IsPing($Item.SubItems(0).Text) $PingError = @error SELECT CASE $PingError = 0 $PingStatus = 'On' CASE $PingError = 1 $PingStatus = 'RAS' CASE $PingError = 2 $PingStatus = 'Off' CASE $PingError = 3 $PingStatus = 'Gone' CASE 1 $PingStatus = 'PROBLEM' ENDSELECT $Item.SubItems(1).Text = $PingStatus $Item.SubItems(2).Text = $AddressIP $Item.SubItems(3).Text = $AddressName $Item.SubItems(4).Text = $IPError $List.Items.Selected = 0 NEXT
I agree on the 'Goto' suggestion, however. [ 05. November 2002, 19:41: Message edited by: Chris S. ]
|
|
Top
|
|
|
|
#89311 - 2002-11-05 07:55 PM
Re: Kixforms - Scrolling through a ListView object
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
krabourn,chris:
Man, you guys are way too fast for me. I thought this feature wouldn't be missed in the first pass of ListView but obviously your way ahead of me.
I will implement this in the next release, I will also step up the release to this weekend (or sooner) to correct this grievous over-sight on my part. The following is some information
$ListView.InsureVisible(Index)
Ensures that the specified item is visible within the control, scrolling the contents of the control if necessary.
Index The zero-based index of the item to scroll into view.
Remarks You can use this method to ensure that a specific item is visible within the ListView control. When performing validation on the items in a ListView, you can call the EnsureVisible method to ensure that an item that failed validation is displayed in the ListView control to allow the user to perform changes on the item. If the item that you want to ensure is visible is located above the viewable region of the ListView control, calling the EnsureVisible method will scroll the contents of the control until it is the first item in the viewable area of the control. If the item is below the viewable region of the ListView control, calling the EnsureVisible method will scroll the contents of the ListView control until the item is the last item in the viewable area of the control.
|
|
Top
|
|
|
|
#89317 - 2002-11-06 03:05 AM
Re: Kixforms - Scrolling through a ListView object
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Kixforms is very forgiving in terms of unsupported methods, props ... it basically doesn't sqwak about any bad input ![[Wink]](images/icons/wink.gif) [ 06. November 2002, 03:07: Message edited by: Shawn ]
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 884 anonymous users online.
|
|
|