Re: [perl-win32-gui-users] TextField entry

2003-11-26 Thread Johan Lindstrom

At 01:58 2003-11-26, Ross Clunie wrote:

I would like to be able to use the ENTER key as an event trigger for a
textfeild. I have the _LostFocus event set and this works when the tab key
is used but I would like ENTER key to emulate this function. Is it poosible.


Fake it by adding a button that is -ok and/or -default (I think -ok is an 
option proper). Turn off the -tabstop and put the button outside the window 
(e.g. at 10, 10).


The button's _Click event will be triggered when you press Enter in the 
Textfield.



/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: "Oracle9i Database Concepts -- Contents"

dmoz (1 of 7): /Computers/Internet/E-mail/Free/ 9




[perl-win32-gui-users] DC fullscreen

2003-11-26 Thread Peter Janson
Hi!

Is there a way to whrite graphics in "fullscreen" mode?
One could always place the window at -xx, -xx and make the window a trifle
bigger than the actual screen resolution, but that solution feels "dirty".

Is there a better way?

/Peter Janson




Re: [perl-win32-gui-users] TextField entry

2003-11-26 Thread Steve Pick
Hi,

I've just submitted an addition for Win32::GUI v0.0.665 which adds the
keycode and extra info as arguments to the onKeyDown handler. This allows
you to do this, to create a single-line text entry field which detects a
press of the Enter key.

my $textfield = new Win32::GUI::Textfield ($win,
 -name => "textfield1",
 -left => 0,
 -top => 0,
 -width => 100,
 -height => 20
 -multiline => 1,
 -autohscroll => 1,
 -autovscroll => 0,
 -onKeyDown => \&keydown,
);

sub keydown {
 my ($additional_data,$keycode) = @_;
 if($keycode == 13) {
print "Enter has been pressed.\n";
 }
}

Hopefully this will be included in the next CVS update, and will allow you
to get Enter presses without using that nasty "default button" method.

Steve

- Original Message - 
From: "Johan Lindstrom" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, November 26, 2003 2:04 PM
Subject: Re: [perl-win32-gui-users] TextField entry


> At 01:58 2003-11-26, Ross Clunie wrote:
> >I would like to be able to use the ENTER key as an event trigger for a
> >textfeild. I have the _LostFocus event set and this works when the tab
key
> >is used but I would like ENTER key to emulate this function. Is it
poosible.
>
> Fake it by adding a button that is -ok and/or -default (I think -ok is an
> option proper). Turn off the -tabstop and put the button outside the
window
> (e.g. at 10, 10).
>
> The button's _Click event will be triggered when you press Enter in the
> Textfield.
>
>
> /J
>
>  --  --- -- --  --  -- -  - -
> Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]
>
> Latest bookmark: "Oracle9i Database Concepts -- Contents"
>

> dmoz (1 of 7): /Computers/Internet/E-mail/Free/ 9
>
>
>
> ---
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>




Re: [perl-win32-gui-users] DC fullscreen

2003-11-26 Thread Steve Pick
You can get the DC of the screen like this (ripped from
http://jeb.ca/perl/win32-gui-docs/index.pl/win32-gui-dc):

$Screen = new Win32::GUI::DC("DISPLAY");

Then you can write what you like all over it. However this isn't great. You
can also make a window with the style WS_CHILD, which has no titlebar or
border, and call $win->Maximize() on startup to make it fill the whole
screen (except for the taskbar if that's not on auto-hide), then you can
paint in that window's DC (obtain it with $win->GetDC()).

I hope one of these helps.

Steve


- Original Message - 
From: "Peter Janson" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, November 26, 2003 9:14 PM
Subject: [perl-win32-gui-users] DC fullscreen


> Hi!
>
> Is there a way to whrite graphics in "fullscreen" mode?
> One could always place the window at -xx, -xx and make the window a trifle
> bigger than the actual screen resolution, but that solution feels "dirty".
>
> Is there a better way?
>
> /Peter Janson
>
>
>
> ---
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>




Re: [perl-win32-gui-users] TextField entry

2003-11-26 Thread Glenn Linderman
Hi, the overall effect can also be achieved via accelerator keys... 
define Enter as an accelerator key.


On approximately 11/26/2003 4:07 PM, came the following characters from
the keyboard of Steve Pick:

Hi,

I've just submitted an addition for Win32::GUI v0.0.665 which adds the
keycode and extra info as arguments to the onKeyDown handler. This allows
you to do this, to create a single-line text entry field which detects a
press of the Enter key.

my $textfield = new Win32::GUI::Textfield ($win,
 -name => "textfield1",
 -left => 0,
 -top => 0,
 -width => 100,
 -height => 20
 -multiline => 1,
 -autohscroll => 1,
 -autovscroll => 0,
 -onKeyDown => \&keydown,
);

sub keydown {
 my ($additional_data,$keycode) = @_;
 if($keycode == 13) {
print "Enter has been pressed.\n";
 }
}

Hopefully this will be included in the next CVS update, and will allow you
to get Enter presses without using that nasty "default button" method.

Steve

- Original Message - 
From: "Johan Lindstrom" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, November 26, 2003 2:04 PM
Subject: Re: [perl-win32-gui-users] TextField entry




At 01:58 2003-11-26, Ross Clunie wrote:


I would like to be able to use the ENTER key as an event trigger for a
textfeild. I have the _LostFocus event set and this works when the tab


key


is used but I would like ENTER key to emulate this function. Is it


poosible.


Fake it by adding a button that is -ok and/or -default (I think -ok is an
option proper). Turn off the -tabstop and put the button outside the


window


(e.g. at 10, 10).

The button's _Click event will be triggered when you press Enter in the
Textfield.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: "Oracle9i Database Concepts -- Contents"