Code:
menu @Window {
  lbclick:{
    var %w = $menu
    if ($sline(%w,0) = 1) { %sel.ln = $sline(%w,1).ln }
    elseif (!$sline(%w,0)) { unset %sel.ln } 
    else { 
      var %l = $sline(%w,$iif($sline(%w,1).ln = %sel.ln,2,1)).ln 
      sline -sl %w %l
      %sel.ln = %l
    }
  }
}
on *:close:@Window:{ unset %sel.ln }


Use a menu event as shown to detect the selections in the custom window. Using a global variable you can follow which line is meant to be selected and so when you attempt to select multiple selections in the listbox it will only let you select a single one.

Edit: Found event.

Last edited by Sigh; 08/07/04 08:51 AM.