Hi Jason,
 
By disabled I mean literally the grayed out condition allowing the user to see (and scroll through) the list but preventing the user from checking/unchecking any checkboxes.  If I set disabled => 1, in AddListView the control is definately disabled ... but it doesn't allow the user to scroll through the list. 
 
Brian
 
On 4/12/06, Plum, Jason <jplum@barrack.com> wrote:
Brian,
 
Could you define "disable an item" for us? Do you mean setting a state where-in the item will not trigger events to occur? Or do you need the single item to somehow be 'non-functional' in some other means? One of my cohorts in my office recently worked out a *cleaner* way to color listview items (fg+bg) via a module, but thats not *exactly* ready for production yet.
 
If you jsut need to keep track of which control is 'working' and 'not working' then consider using the $widget->UserData() method.
 
Jason P.


From: perl-win32-gui-users-admin@lists.sourceforge.net [mailto:perl-win32-gui-users-admin@lists.sourceforge.net] On Behalf Of Brian Fredette
Sent: Wednesday, April 12, 2006 11:28 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: Re: [win32-gui] [perl-win32-gui-users] Examples needed.

 
Hi everyone,
 
Thanks for the pointers.  It seems that Darrik's suggestion of using ListViews may do what I need.  I was able to get the lists setup the way I want.  I would now like to disable certain items in the list.  I am able to use ItemCheck to set the checked state of the checkbox as needed.  I now need to be able to disable certain items in the list.  I can't seem to find out how to do this.  All variations of -disabled => 1 don't work.  I can disable the entire list ... which is okay but once the list is disabled, users can't scroll.  Due to space on the window, I can't display the whole list.
 
So my question ... is there a way to disable the list (either entirely or by item) and still keep it scrollable?  Do I have to setup a routine to check the state of the checkbox and always keep it checked?
 
Brian

 
On 4/10/06, Robert May <rmay@popeslane.clara.co.uk > wrote:
Brian Fredette wrote:
> Greetings all,
>
> I'm kinda new to win32::gui programming and need to develop a frontend
> which is similar to windows explorer.  I would like to have a scrollable
> "pane" on the right hand side which contains lists of checkboxes.  I
> have looked through the mdi packages and suspect i need some flavor of
> midframe/client.  I have not been able to locate any examples which
> might point me in the right direction.
> Can anybody provide some brief code to help get me started?

Have you looked in the 'demos' directory?  For a standard ActiveState
Perl install you should find it at C:\Perl\site\lib\Win32\GUI\demos
(you'll need to adjust the path for your perl installation).  MDI.pl
might be a good place to start.

Regards,
Rob.