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

2001-06-26 Thread Johan Lindstrom
Sean wrote: > This is where you call DoEvents() to give the GUI a chance to handle > messages and respond to user interaction every once in a while. Do > this "as often as possible" to give the impression that the GUI is > always listening to user interaction. So are you suggesting soemthing lik

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

2001-06-26 Thread sean
On 27 Jun 2001, at 1:58, Johan Lindstrom wrote: > This is where you call DoEvents() to give the GUI a chance to handle > messages and respond to user interaction every once in a while. Do > this "as often as possible" to give the impression that the GUI is > always listening to user interaction.

RE: [perl-win32-gui-users] DoEvents

2001-06-26 Thread Piske, Harald
> BTW, most of this has been said before a few times. Browse > the archives for > more info. Yep! I was just about to re-post this (because we know by now that the archive search does not really find all you're looking for): == > Sent: Wednesday,

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

2001-06-26 Thread Johan Lindstrom
Sean wrote: $keep_running. So wouldn't it be easier just to use Dialog and have that event return -1? In most cases, yes. I would guess that Dialog() is a tighter and more efficient loop than you can roll on your own in Perl. What Dialog and DoEvents actually do is this: they process GUI me

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

2001-06-26 Thread Glenn Linderman
Useful for the case when you want to do things that are not window driven, and don't want to fork them into a separate process. Then the GUI becomes less responsive (because you are doing something else sometimes), but, as long as the chunks of something else are not too big, it need not become to

[perl-win32-gui-users] DoEvents

2001-06-26 Thread sean
IN the documentation, I find this about DoEvents: Just like Dialog(), but returns when there are no more events to process. So does that mean that if you leave your window alone, control will return to the script? So to keep your script from exiting as soon as you stop clicking buttons, etc.

Re: [perl-win32-gui-users] Reboot Dialog for Win95/98/NT/2000 ??

2001-06-26 Thread Johan Lindstrom
Andrew wrote: Forgive me if this is an obvious answer, but, I can't find any routines to initiate a shutdown/reboot. I hope this question is appropriate for this list seeing as I will have to use Win32::GUI :) Almost; you can use the Win32 module: http://www.perlmonks.org/index.pl?node_id=38

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

2001-06-26 Thread Andrew Kincaid
Using your exact code on a Windows 95B and a Windows 98SE machine running Activestate Perl v.5.6.1.626 and Win32::GUI 0.0.558, I added the following lines to the end of your code: $W = new Win32::GUI::Window( -title=> "Title Here", -left => 100, -top => 100, -width

Re: [perl-win32-gui-users] Directory Browser/Selector

2001-06-26 Thread Andrew Kincaid
In the Win32::GUI distribution, in the samples directory, there is an example script called "ofn.pl" which demonstrates Win32::GUI::GetOpenFilename. If you don't already have the Win32::GUI distribution, I recommend downloading it from: http://dada.perl.it/Win32-GUI-0.0.558.tar.gz Hope that he

[perl-win32-gui-users] Reboot Dialog for Win95/98/NT/2000 ??

2001-06-26 Thread Andrew Kincaid
Forgive me if this is an obvious answer, but, I can't find any routines to initiate a shutdown/reboot. I hope this question is appropriate for this list seeing as I will have to use Win32::GUI :) I have found the InitiateShutdown stuff in Win32::AdminMisc but it says it's for NT only. Anyone

RE: [perl-win32-gui-users] Updating a window.

2001-06-26 Thread Louis Bohm
Both yours and someone else's answer was mostly what I was looking for. In the long run I am trying to create a window with many (at most 10) lines of words. Each line will contain different text and have a number in it. Ideally I would like the lines to be of different colors. A sub will

RE: [perl-win32-gui-users] Updating a window.

2001-06-26 Thread Peter Eisengrein
It sounds like you want a timer. ### untested @stuff = (0 .. 1000); $main->AddTimer("Timer", 1000); ### once every second. sub Timer_Timer { $x++; $sb->Text("Incrementing value: $stuff[$x]"); } > -Original Message- > From: Louis Bohm [mailto:[EMAIL PROTECTED] > Sent

RE: [perl-win32-gui-users] Updating a window.

2001-06-26 Thread Piske, Harald
I don't quite see where your problem is ... do you want to know HOW to update your window or WHEN? As for the how, your $sb->Text("whatever"); should work fine anytime. As for the when, maybe you are looking for a timer so that you can update the status bar every other second or so. No offence, b

Re: [perl-win32-gui-users] Updating a window.

2001-06-26 Thread Glenn Linderman
If, by "without human intervention" and "periodically", you mean that there is no GUI event which triggers the need to update the status bar text, then the answer to your question depends on what does trigger the need to update the status bar text. If "periodically" is truely the answer, that you

[perl-win32-gui-users] Updating a window.

2001-06-26 Thread Louis Bohm
I am sure this is a really stupid question. But how do I update things in the window I create WITHOUT human intervention. Here is what I have for a script: use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, -text => 'Louis

RE: [perl-win32-gui-users] Disable menu item?

2001-06-26 Thread Peter Eisengrein
that did the trick. thanks! > -Original Message- > From: Glenn Linderman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2001 1:34 PM > To: perl-win32-gui-users@lists.sourceforge.net > Subject: Re: [perl-win32-gui-users] Disable menu item? > > > $Window->Menu -> {'SortNot'} -> Enab

Re: [perl-win32-gui-users] Disable menu item?

2001-06-26 Thread Glenn Linderman
$Window->Menu -> {'SortNot'} -> Enabled ( 0 ); Peter Eisengrein wrote: > How can you disable (grey-out) an item in a menu? I don't see anything in > the docs and it has ignored everything I have tried, including the obvious: > > $Window->Menu->{MenuItem}->Disable(); > > ___

[perl-win32-gui-users] Disable menu item?

2001-06-26 Thread Peter Eisengrein
How can you disable (grey-out) an item in a menu? I don't see anything in the docs and it has ignored everything I have tried, including the obvious: $Window->Menu->{MenuItem}->Disable();

Re: SOLVED Re: [perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Louis Bohm
I originally found the file win32-gui-0.0.558.tar.gz on the web site http://dada.perl.it/. Uncompressing that file you will find a tutorial Win32-GUI-0.0.558/docs/tut/guitut1.html. Oh about 30 or 40 lines down from top. Louis At 06:10 AM 6/26/2001 -0400, you wrote: On Tue, 26 Jun 2001 08:4

Re: SOLVED Re: [perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Erick Bourgeois
On Tue, 26 Jun 2001 08:45:20 -0400, Louis Bohm said: | I found that this line was in error: |$main->AddLabel(-text => "Hello World"); | | I needed to include the -name as shown bellow: |$main->AddLabel( | -name => "Test", | -text => "Hello World", |

Re: [perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Johan Lindstrom
Louis wrote: $main->AddLabel(-text => "Hello, world"); Add a -name option and you're fine. All controls must have a name. I am sure the error is not in perl or your win-gui module Actually, I think it's something that could be fixed in the Win32::GUI module. If I remember correctly, al

SOLVED Re: [perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Louis Bohm
I found that this line was in error: $main->AddLabel(-text => "Hello World"); I needed to include the -name as shown bellow: $main->AddLabel( -name => "Test", -text => "Hello World", ); What bothers me about this is that I pulled the top line right fr

Re: [perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Erick Bourgeois
On Tue, 26 Jun 2001 08:23:16 -0400, Louis Bohm said: > I am getting perl.exe - Application Error when trying to run the > following > code: > use Win32::GUI; > $main = Win32::GUI::Window->new( >-name => 'Main', >-width => 100, >-he

[perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Louis Bohm
I am getting perl.exe - Application Error when trying to run the following code: use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, ); $main->AddLabel(-text => "Hello, world");

[perl-win32-gui-users] Getting Perl.exe - application error

2001-06-26 Thread Louis Bohm
I am getting perl.exe - Application Error when trying to run the following code: use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, ); $main->AddLabel(-text => "Hello, world");