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
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
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
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
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
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
}
}
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
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
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
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
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
Johan,
Thanks very much.
-name => "Packagename::Controlname"
works and is much simpler than changing the XS code.
Cheers,
Kev.
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
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.
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,
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
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
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.
|-+>
|
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.
|-+---
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
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
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
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 =>
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
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
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
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
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
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(
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.
|-+>
|
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
Stephen,
Something like
-addstyle => WS_VISIBLE | 3 | WS_NOTIFY | WS_VSCROLL,
Should do it.
Kev.
|-+>
| | "Stephen \"Flame\" Couchman" |
| | <[EMAIL PROTECTED]> |
|
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
Try -addstyle (or in some cases -addexstyle).
Kev.
|-+>
| | Steven Swenson |
| | <[EMAIL PROTECTED]|
| | >|
| |
34 matches
Mail list logo