Re: [perl-win32-gui-users] weird textfield issue

2001-05-15 Thread Tom Paton
On 10 May 01, at 11:16, Marjolein Katsma wrote:

> Debuggers are a wonderful invention - and I use them. But you don't
> need them (need to *pay* for them!) until you've exhausted all
> possibilities of displaying traces and variable values of your program
> while it's executing. With Perl on Win - that's just what you need
> your command-line window for: without it (or a debugger): how do you
> know what's happening?

my 2c (pretty useless AUDs but...):
i would have to disagree pretty whole-heartedly with that (in the 
most friendly, constructive way i can manage :).  

I think almost the opposite attack should be tried.  learn to use the 
debugger and use that first.  if you can't get the debugger to give 
the information you require, THEN put in trace statements etc.

the debugger has the wonderful benefit of not requiring any extra 
code to run, no modifications to code, no extra errors and no weird 
side effects.  well almost.  also, you can watch variables and 
expressions that seemed obvious when writing the code but now 
mysteriously don't work...

a nice tip i read somewhere, was to always run the code through 
the debugger the first few times you run it (literally) to make sure it 
does what you think.

very rarely do you spend hours on a problem when you point the 
debugger at it first.

admittedly debuggers used to be too hard to use and way too 
much effort (gdb anyone?). but the current crop of visual debuggers 
are fantastic (eg VC++).   the debugger in the activestate PDK is 
well worth the download, and seems to work for a fair while without 
costing anything :).

- Tom
(who wishes he'd learnt how to use the debugger -- and there'd 
been decent debuggers -- before he learnt to program, it would have 
saved me year's by now...)

tompaton (at) connect (dot) net (dot) au
http ... people.connect.net.au/~tompaton



RE: [perl-win32-gui-users] Win32::GUI::Label

2001-05-15 Thread Jeremy Aiyadurai
Hi All

Thank you for your knowledge and help so far.

Hi, I have tried this procedure...it does make the labels transparent, but
it makes them hidden
how do i go about showing my text in the labels, with the labels being
transparent to the background

Jeremy

>I struggled for an entire night trying to figure this out. ;-)  Actually, I
>was trying to mimic Winamp's skins and while I'm not quite there, I can
>"skin" my GUI (okay, so it may be cheesy but it was fun to do).
>
>Here's how I did it:
>
>Create the window, create a label (the size of the window), fill the label
>with the bitmap, create two labels with the -bitmap & -notify options set.
>This allows the labels to respond to events but they don't actually
>"appear", they're "hidden".  If my memory serves me, I had to create the
>elements in this exact order, otherwise the "hidden" label events would not
>fire.
>
>Code sample is below.
>
>Jeremy Blonde
>
>$Window = Win32::GUI::Window->new(
>  -name=> "Window",
>  -text=> $PREFS{TITLE},
>  -pos => [ $PREFS{LEFT},  $PREFS{TOP} ],
>  -size=> [ $PREFS{WIDTH}, $PREFS{HEIGHT} ],
>  -topmost => $PREFS{ONTOP},
>  -resizable => 0,
>);
>
>$Window->AddLabel(
>  -name   => "Background",
>  -pos=> [ 0, 49 ],
>  -size   => [ $Window->Width(), 35 ],
>  -bitmap => 1,
>);
>
>$Window->Background->SetImage($BACKGROUND);
>
># Creates the label for the About "button"
>$Window->AddLabel(
>  -name   => "About",
>  -pos=>
>
>   $PREFS{ABOUTLEFT} + $Window->Background->Left(),
>   $PREFS{ABOUTTOP}  + $Window->Background->Top(),
> ],
>  -size   => [ $PREFS{ABOUTWIDTH}, $PREFS{ABOUTHEIGHT} ],
>  -notify => 1,
>  -bitmap => 1,
>);
>
># Creates the label for the Preferences "button"
>$Window->AddLabel(
>  -name   => "Preferences",
>  -pos=>
>
>   $PREFS{PREFSLEFT} + $Window->Background->Left(),
>   $PREFS{PREFSTOP}  + $Window->Background->Top(),
> ],
>  -size   => [ $PREFS{PREFSWIDTH}, $PREFS{PREFSHEIGHT} ],
>  -notify => 1,
>  -bitmap => 1,
>);
>
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of
>Jeremy Aiyadurai
>Sent: Friday, May 11, 2001 9:28 PM
>To: perl-win32-gui-users@lists.sourceforge.net
>Subject: [perl-win32-gui-users] Win32::GUI::Label
>
>
>Hi all,
>
>Thankyou for your help so far.
>If you have not seen my previous email "about the console icons" please do
>so.
>
>my question is, I have made a bmp to cover the entire background of a
>window. how do I make all the labels transparent, to blend with the
>background image?
>
>
>Thankyou
>
>Jeremy
>
>
>
>
>
>
>
>
>___
>Perl-Win32-GUI-Users mailing list
>Perl-Win32-GUI-Users@lists.sourceforge.net
>http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
>
>_
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>___
>Perl-Win32-GUI-Users mailing list
>Perl-Win32-GUI-Users@lists.sourceforge.net
>http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>




[perl-win32-gui-users] Win32::GUI::Icon and Win32::Console - an icon for a console

2001-05-15 Thread Jeremy Aiyadurai
Hi all,

Thankyou for your help so far.

how do i get an icon to work for a console window...eg. i want to get rid
of the console-window-dos-prompt icon when i run my console program.


Thankyou

Jeremy







favicon.ico
Description: Binary data



Re: [perl-win32-gui-users] Win32::GUI::Icon and Win32::Console - an icon for a console

2001-05-15 Thread Johan Lindstrom

Jeremy Aiyadurai wrote:

how do i get an icon to work for a console window...eg. i want to get rid
of the console-window-dos-prompt icon when i run my console program.


Untested, but try something like this:

my $icoDOS = ... create your icon object here ...;
my $hwindDOS = Win32::GUI::GetPerlWindow();
Win32::GUI::SetIcon($hwindDOS, $icoDOS, 0);

I found the docs for this in the Win32_GUI.html file.


/J

--
Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua
[EMAIL PROTECTED]