RE: [perl-win32-gui-users] get value from list

2001-02-15 Thread Thomas, Timothy B
There is a SelectedItems function you can use. Here's a bit of code that will get the data from all the selected items. Once you determine which item you have selected you can use that other piece of code to get the data from every column, or you can use this example if you just want the first colu

RE: [perl-win32-gui-users] get value from list

2001-02-15 Thread Michael Solomon
Tim, Thanks for this Unfortunately this gets all the items from the list What I want to do is to click on an item in the list and just capture that For example If I have a list showing 1 2 3 if I click on the 3, I want to capture 3 I hope this makes sense Regards Mike Solomon Technical

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Aldo Calpini
Erick J. Bourgeois wrote: > XSRETURN_NO; #Is the problem here?# exxxactly, should be XSRETURN_UNDEF; instead. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Aldo Calpini
Erick J. Bourgeois wrote: > Aldo, can I correct it myself and compile it with DJGCC? I hope so :-) I could not compile it with cygwin's gcc, but I'll be very happy to know how it goes with djgcc. but please post build reports and pleas for help on the Perl-Win32-GUI-Hackers mailing list, since thi

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Erick J. Bourgeois
Aldo, I had a look at the GUI.XS (Version: 0.0.558) and I found the following lines (at line: 9930~) for SelectedItems return: scount = ListView_GetSelectedCount(handle); if(scount > 0) { index = -1; tcount = 0; EXTEND(SP, scount); index = ListView_GetNextItem(handle, index, LVNI_S

RE: [perl-win32-gui-users] get value from list

2001-02-15 Thread Thomas, Timothy B
Someone else has written a win32::Gui program to do just what you are trying to do. I don't seem to have the code anymore. Maybe they can post it again, or you can search the archives. Here's a piece of code I just wrote that gets all the data, including the image, from a listview, it puts it into

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Erick J. Bourgeois
Aldo, can I correct it myself and compile it with DJGCC? erick never stop questioning www.jeb.ca

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Aldo Calpini
Erick J. Bourgeois wrote: > Sorry to bother the list again, but Aldo, checking it's > undef"ness" with defined does not work either, it falls > through not matter what. I tried putting print > "$index[0]\n"; to see it's value and indeed it is undef (ie. > it did not print anything), so why does it

[perl-win32-gui-users] get value from list

2001-02-15 Thread Michael Solomon
I am querying a database and putting the output into a listview What I would like to next is to click on an item in the list and then drilldown into the data base The question is how can I return the value from a List I am fairly new at using Win32::GUI and apologise if this is a stupid question

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Erick J. Bourgeois
Sorry to bother the list again, but Aldo, checking it's undef"ness" with defined does not work either, it falls through not matter what. I tried putting print "$index[0]\n"; to see it's value and indeed it is undef (ie. it did not print anything), so why does it pass the if statement? erick never

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Erick J. Bourgeois
> UNDEF IS NOT THE SAME AS 0! this is, speaking in perl terms, > an heresy and you shall be punished with eternal fire ;-) Mia colpa, mia colpa...won't happen again :) erick never stop questioning www.jeb.ca

Re: [perl-win32-gui-users] SelectedItems method

2001-02-15 Thread Aldo Calpini
Erick J. Bourgeois wrote: > [...] > When "Button" is pressed it always falls through the if > statement. Even in the case of no selection it falls through > because @index[0], in this case, is undef. I know undef is > the same as 0, but how could I get around this? UNDEF IS NOT THE SAME AS 0! this