Rob, I tried what you have below and it worked so I started stripping my sample down line by line until I figured it out. The listview I had looked like this:
$Main->AddListView( -name => "BuildView", -singlesel => 1, -text => "hello world!", -left => 360, -top => 450, -width => 305, -height => 100, -style => WS_CHILD | WS_VISIBLE | 1, -fullrowselect => 1, -gridlines => 1, -checkboxes => 1, -font => $normal_text, ); The bulk of this was just a cut and paste from a sample I had found on the web. What I found is that the -style line is the culprit. When this is included the -singlesel option doesn't do anything. I'm not sure what the -style option is specifically doing, but that is the source of the problem. Thanks! Greg -----Original Message----- From: Robert May [mailto:[EMAIL PROTECTED] Sent: Thursday, June 01, 2006 12:59 PM To: Greg Dance Cc: perl-win32-gui-users@lists.sourceforge.net Subject: Re: [win32-gui] [perl-win32-gui-users] -singlesel If I add -singlesel => 1, to the constructor for the listview_drag_drop.pl demo that is distributed with Win32::GUI, then it works fine for me. Perhaps you could post a short, complete example of what doesn't work for you (along with what version of Win32::GUI you are using)? Regards, Rob. Greg Dance wrote: > I know that the FAQ says: > > *How can I prevent the user from choosing more than one item in a > Listview?* > > > You can use the > > -singlesel > > option on the ListView to achieve what you want. > > However, this option seems to do nothing.* Has anyone ever been able > to actually do this?* I even tried loading up the GUI Loft to see if > it would work correctly there, but I get the same results. It doesn't > seem to matter if you enable or disable this option, you can always > pick multiple items in a listview. > > Greg >