RE: [perl-win32-gui-users] ListView question: What event should I use when checking an item on a list?

2003-05-16 Thread Stuart Arnold
I gave up on _ItemClick, Just try the "_Click" like a Listbox does. You don't get anything as part of your call like ItemClick does, you just have to inspect the selected item(s). Besides, you get better control on what's going on. To inspect, just get SelectedItems, then loop thru them for their

[perl-win32-gui-users] ListView question: What event should I use when checking an item on a list?

2003-05-16 Thread sam . dela . cruz
Hi All, Another question. There are only three events in the documentation for ListView: 1. ColumnClick 2. ItemClick 3. KeyDown So if I want to capture the moment that a user checks on a list item, what do I use. Nothing seems to fit, I tried ItemClick but this only responds when you sele

RE: [perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Darrik, That worked very well. Thanks! Regards, Sam Dela Cruz try this: foreach (0..$count) { $MainWin->ListView->ItemCheck($_,1); } :) darrik >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Behalf Of >> [EMAIL PROTECTED] >> Sent: Fr

RE: [perl-win32-gui-users] select all items in ListView

2003-05-16 Thread Darrik Mazey
try this: foreach (0..$count) { $MainWin->ListView->ItemCheck($_,1); } :) darrik >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Behalf Of >> [EMAIL PROTECTED] >> Sent: Friday, May 16, 2003 2:46 PM >> To: perl-win32-gui-users@lists.sourceforge.net

RE: [perl-win32-gui-users] dynamic menu accelerators (was: How to define generic handler for buttons)

2003-05-16 Thread Darrik Mazey
just a thought, but couldn't you make your menus something like this? $serverNum=0; @serverList=qw(ServerA ServerB ServerC); push(@menuOpts,"&Server","menuServer"); foreach $serverName (@serverList) { push(@menuOpts,"> &$serverNum $serverName","menu$serverName"); eval("sub menu$

Re: [perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Hi, I'm sorry let me clarify my question, I mean, how do I check mark all of the items in a listview? Regards, Sam Dela Cruz Hi, Is there a way to select all items in a ListView? I tried doing this using this code, but it doesn't work: sub SelectAll_Click { my $count = $MainWin->Li

[perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Hi, Is there a way to select all items in a ListView? I tried doing this using this code, but it doesn't work: sub SelectAll_Click { my $count = $MainWin->ListView->Count(); foreach (0..$count) { $MainWin->ListView->ItemCheck($_); } } Regards, Sa

RE: [perl-win32-gui-users] How to define generic handler for buttons

2003-05-16 Thread Frazier, Joe Jr
While I have not tested, the use of "eval" should work if you play with it enough. I perform something simular with building a list of menu items based off a "grepped" list of unique server names from a Database query. These are inserted into the Menu at runtime so if a new servername is added

Re: [perl-win32-gui-users] How to define generic handler for buttons

2003-05-16 Thread Gerard ter Haar
Hello Jeremy, > I know Im going to regret replying with out testing my codeJ No need. I used it and it is great! I had to modify my buttonnames a little because it contained _ and the beginnen and .. > The way I handle this kind of thing is to eval the handler for each object, > which in turn c

Re: [perl-win32-gui-users] How to define generic handler for buttons

2003-05-16 Thread Jeremy White
I know I’m going to regret replying with out testing my codeJ The way I handle this kind of thing is to eval the handler for each object, which in turn calls a generic handler, something like this: foreach my $button ('one','two','three','four') { my $string='sub ::'.$button.'_Click { ::G

[perl-win32-gui-users] How to define generic handler for buttons

2003-05-16 Thread Gerard ter Haar
Hi, I have just started with Win32::GUI. I want to create a small application which starts a main window with a lot of buttons on it. The buttons are read from a config-file. So far so good, the visual creation works just fine! However I now have a lot of dynamically created buttons and therefo

[perl-win32-gui-users] Listview -> old questions, new answers?

2003-05-16 Thread Dean Lennox
Just wondering: 1.is there any way to change the text/background colour per row? 2.is there a ListView control class to add a dropdown combobox control to each subitem? Thanks. - Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo.