Re: Re: Re: Re: Re: Listview checkboxes

May 24 2003 at 1:02 PM
No score for this post
Anonymous  (no login)
from IP address 62.226.76.169


Response to Re: Re: Re: Re: Listview checkboxes

 

to get the text of a special line:
var %line = $did($dname,$did,line)

or to get the text of the first selected line:
var %line = $did($dname,$did).seltext


or to get all selected lines in a loop (i'll use this for an example)

var %i = 1
while ($did($dname,$did,%i)) {
var %line = $did($dname,$did,$ifmatch)
var %tooltip = $gettok(%line,2,4)
tokenize 9 $gettok(%line,1,4) ;cuts off tooltip and tokenize the columns, the hole text of first column is now $1, the text of second column $2 and so on

var %state = $gettok($1,5,32) ; get 5th token of first column, to get the state of the second / third /fourth column, use $gettok(%column,4,32) instead (4 and not 5, cause the first column has on token more for ident)
if (%state == 1) echo -s checkbox is unchecked
elseif (%state == 2) echo -s checkbox is checked
elseif (%state == 0) echo -s there is no checkbox in the first column

inc %i
}

i haven't tested if this works but i think it should

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Responses

Create your own forum at Network54
 Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement