Re: [perl-win32-gui-users] Net::FTP with AddStatusBar()

2001-01-19 Thread Kevin . ADM-Gibbs
Erick, I'm convinced that there must be a simple way to do this but, I've tried everything I can think of but haven't found it yet. The PerlDocs seemed to suggest using Forks, Pipes and/or IPC, but this will probably be abit more complicated than you want. You could redirect STDOUT (and/or STDER

Re: [perl-win32-gui-users] Event routines

2001-02-07 Thread Kevin . ADM-Gibbs
Thomas, It is possible to dynamically create windows. I wrote the accompanying script in response to a query quite a while ago. It creates 4 windows and hides all but one of them. Clicking OK brings up the next window. Hope this helps. Kev. [EMAIL PROTECTED] on 07/02/2001 12:03:17 To: pe

Re: [perl-win32-gui-users] looping in win32 GUI

2001-02-14 Thread Kevin . ADM-Gibbs
Chris, I guess what you want to do is have a status window on which you can display the status text from the RASE call? If that's the case you can do something like this use Win32::GUI; my $Win = new Win32::GUI::Window( -left => 341, -top=> 218, -width => 300, -hei

Re: [perl-win32-gui-users] Shutdown, reboot, logoff and lock on NT and 2000 with perl?

2001-05-22 Thread Kevin . ADM-Gibbs
Tim, The Win32 module has Win32::InitiateSystemShutdown(MACHINE, MESSAGE, TIMEOUT, FORCECLOSE, REBOOT) I haven't come across modules which do of the other things. Kev. "Thomas, Timothy B" <[EMAIL PROTECTED]>@lists.sourceforge.net on 21/05/2001 23:20:02 Please respond to perl-win32-gu

[perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-12 Thread Kevin . ADM-Gibbs
Has anyone else found that under Windows 2000 leaving the mouse cursor over a list view item causes an ItemClick event? Its almost as if there is a MouseOver event. If its not just me that gets this, does anyone have any thoughts on how to turn this behaviour off so that only a real click of the

Re: [perl-win32-gui-users] Capturing 'enter key' with Richedit

2001-06-13 Thread Kevin . ADM-Gibbs
Carol, In the KeyPress sub for the richedit you need to check if enter (ascii 13) has been pressed. Something like sub RichEdit_KeyPress { my($key) = @_; if ($key == 13) then { # Enter key pressed } else { # some other key } }

Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan, I didn't even notice you'd put Windows 200 until you sent the second email. Its a shame about the ItemClick event for ListViews, I'd hope to use ItemClick for selecting and then the double click for doing something with the selected items. Guess I'll just have to use double click for s

Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan, The particular app that this is for will use the ListView to display files. I was hoping to allow a single click to select a file, further single clicks to select multiple files and a double click to perform an action on the files that had been selected. This would mean over riding the

Re: [perl-win32-gui-users] ListView Item Click and Windows 2000

2001-06-13 Thread Kevin . ADM-Gibbs
Jonathan, You're right, removing -hotrack => 1 gives exactly what I want. You'd think I might have noticed that option and wondered what it did. I must be too used to using GB to design the forms and not be paying any attention to what all the things are its doing for me. Thanks very much for t

[perl-win32-gui-users] Re: Win32:: GUI Capturing the enter key

2001-06-15 Thread Kevin . ADM-Gibbs
Carol, Your code looked fine to me but didn't work when I ran it either so I looked at Aldo's PRIDE program and found that I could only get the keypress event to be called if I declared a new class and then made the richedit a member of that class: my $EC = new Win32::GUI::Class( # With

[perl-win32-gui-users] GUI event handling in Modules

2001-10-31 Thread Kevin . ADM-Gibbs
This may have come up before, in which case I apologise, but has anyone tried creating a module to package up commonly used windows? I've been trying this but found I have to export the event (Button_Click etc) handlers into the Main namespace. Does anyone know if there is a way to handle these

Re: [perl-win32-gui-users] GUI event handling in Modules

2001-11-01 Thread Kevin . ADM-Gibbs
Johan, Thanks very much. -name => "Packagename::Controlname" works and is much simpler than changing the XS code. Cheers, Kev.

RE: [perl-win32-gui-users] GUI & OLE (WAS: Drag-n-Drop?)

2001-11-05 Thread Kevin . ADM-Gibbs
The only problem I've had with GUI and OLE is that OLE::Constants doesn't work. Apart from that it works fine. Aldo seems to have gone very quiet on new releases but then again he seems to be developing all the XS code on his own. A big project for just one person I'd say. Anyone sufficiently c

[perl-win32-gui-users] Rich Text and Unicode characters

2001-11-13 Thread Kevin . ADM-Gibbs
Has anyone found out how to display unicode characters in a text or rich edit control? It doesn't seem to work for me. 'ç' comes out as '├º' when I try to use it (apologies if various email systems have destroyed the original character but it was a unicode 00E7 character). Cheers, Kev.

Re: [perl-win32-gui-users] cosmetic items

2001-11-29 Thread Kevin . ADM-Gibbs
Howard, It sounds like you want to have a label next to your check box. Something like $Window->AddLabel( -text=> "Click here to enable a great feature", -name=> "Viewby", -left=> 500, -top => 32, -width => 45,

Re: [perl-win32-gui-users] Keyboard accelerators possible?

2002-01-15 Thread Kevin . ADM-Gibbs
Nathan, I've never tried to use the accelerator key but Aldo's Pride script does use Ctrl-G from within the RichEdit field to bring up a dialog box to goto a particular line I added a few things to this and the code looks like this sub Editor_KeyPress { my($key) = @_; if ($k

[perl-win32-gui-users] Fork() and BringWindowToTop()

2002-02-19 Thread Kevin . ADM-Gibbs
Hi All, I'm trying to use fork() to create a parent and child process. The parent will deal with Win32::GUI events, tell the child which buttons etc have been pressed, the child will carry out the actions and update the appropriate controls on the window. This way I can allow the main window to

RE: [perl-win32-gui-users] How I have to separe the Win32::GUI between pm module

2002-02-26 Thread Kevin . ADM-Gibbs
Guillem, I found that things worked best if I fully qualified variable names, eg $module_a::window instead of $window I have a module that I use that I can send you if you want to have a look. Cheers, Kev. |-+> |

Re: [perl-win32-gui-users] Perl as EXE

2002-02-27 Thread Kevin . ADM-Gibbs
I've been using the latest version of Perl2Exe and it works very well. The its doesn't require extra comments to find modules, executables are smaller than with previous versions, they load quicker, and it works with Win32::GUI. Haven't tried ActiveState's PDK. Kev. |-+---

[perl-win32-gui-users] Problem With Fork and Win32::GUI

2002-02-27 Thread Kevin . ADM-Gibbs
I'm getting a problem using using fork() with Win32::GUI and wondered if anyone else had had any success. I can get a program to create a pipe for communication, and fork. I then have the parent handle the window actions and the child do any actual work required. When a windows event happens the

Re: [perl-win32-gui-users] Win32::GUI Release 0.0.665

2002-02-28 Thread Kevin . ADM-Gibbs
I've downloaded and compiled the new version. The only script I've had problems with so far is one based on Aldo's pride.pl example but then pride.pl doesn't work any more either. Tried a simple test with the NEM and fork() and it still works (except for the crash on exit with a double fork menti

Re: [perl-win32-gui-users] Using fork to avoid a frozen window while using LWP

2002-03-25 Thread Kevin . ADM-Gibbs
Guillem, You'll probably find that forking and then using waitpid doesn't do what you want. If you're parent process is waiting it won't be able to respond to user input. What I think you need to do is disable any user input controls that might cause problems if they are clicked while you're dow

Re: [perl-win32-gui-users] popup window

2002-04-10 Thread Kevin . ADM-Gibbs
Make the second window a dialog window and use the -parent option when you create it Example code below. Cheers, Kev. use Win32::GUI; $Win = new Win32::GUI::Window( -left => 341, -top=> 218, -width => 300, -height => 300, -name => "Win", -text =>

Re: [perl-win32-gui-users] keystrokes

2002-05-18 Thread Kevin . ADM-Gibbs
Mark, I think something like the example at the below used to work but it doesn't seem to work any more on my system. Aldo's PRIDE example had something like this in it but this doesn't work now on my system either (it only worked if I commented out the " -class=> $EditorClass," line from th

Re: [perl-win32-gui-users] sorting a listview

2002-06-27 Thread Kevin . ADM-Gibbs
Mark, Haven't had time to examine your code to closely but it looks as though you're sorting everything as strings. I assume the quantity should be a number? I've used something like the code below to try to deal with this. I can send you a working example if you need it and this is your proble

Re: [perl-win32-gui-users] communication between GUI scripts

2002-07-09 Thread Kevin . ADM-Gibbs
Peter, Win32::Pipe allows you to use named pipes for interprocess communication. One process has to act as a server, any others as clients. You might want to have a look at the PerlIPC doc as well. Here's a very simple Win32::Pipe server: use Win32::Pipe; $p = new Win32::Pipe("MyPi

Re: [perl-win32-gui-users] LWP + Fork + Win32::GUI

2002-10-17 Thread Kevin . ADM-Gibbs
Michael, I did quite a bit of experimenting with Fork and Win32::GUI a while ago. The main problem I hit was perl crashed when the window closed. I guessed there was some sort of memory management problem but couldn't figure out what. Eventually I gave up and used a doevents approach (I did try

Re: [perl-win32-gui-users] double click buttons

2002-10-22 Thread Kevin . ADM-Gibbs
Usually with this sort of thing I'd disable the window containing the button, eg $win->disable(); If $win is the window with the button in. You might also want to consider making the second window a dialogbox and setting its parent to the first window. From memory this stops the second wi

Re: [perl-win32-gui-users] Richedit selected text

2002-11-08 Thread Kevin . ADM-Gibbs
Joe, Something like my ($x, $y) = $RE->Selection(); should do it. $x and $y will be the character positions of the selection, the whole text in the richedit being treated as a single long string. If you want to find out line numbers you can use my $line1=$RE->LineFromChar(

Re: [perl-win32-gui-users] odd hash behavior

2002-11-22 Thread Kevin . ADM-Gibbs
Pete, You forgot the 'keys' in your foreach statement. ie foreach my $number (%countother) should be foreach my $number ( keys %countother) otherwise the foreach loops through both keys and values. Cheers, Kev. |-+> |

Re: [perl-win32-gui-users] set button as default

2002-12-13 Thread Kevin . ADM-Gibbs
Marc, You could give the button focus: $Win_info_srv->Button_ok_srv->SetFocus(); would do that. To have "enter" press the button when another control had focus there needs to be a way of getting the window to call your button click routine when enter is pressed. So far I've only seen thi

Re: [perl-win32-gui-users] Scrollbars on Drop List

2002-12-15 Thread Kevin . ADM-Gibbs
Stephen, Something like -addstyle => WS_VISIBLE | 3 | WS_NOTIFY | WS_VSCROLL, Should do it. Kev. |-+> | | "Stephen \"Flame\" Couchman" | | | <[EMAIL PROTECTED]> | |

Re: [perl-win32-gui-users] "Can't locate loadable object for module Win32::GUI in @INC..."

2003-01-24 Thread Kevin . ADM-Gibbs
Anton, The answer is it depends. If you have the source (lots of files, including GUI.xs) you need a C compiler and the installation is perl Makefile.pl make make install With some versions perl Makefile.pl POLLUTE=1 is required as the first line instead of 'perl Makef

Re: [perl-win32-gui-users] -style

2003-02-06 Thread Kevin . ADM-Gibbs
Try -addstyle (or in some cases -addexstyle). Kev. |-+> | | Steven Swenson | | | <[EMAIL PROTECTED]| | | >| | |