Re: [perl-win32-gui-users] Child Windows.

2003-12-01 Thread Jeremy White

Hi,

Sounds like using parent/child windows should work for you - I do something 
similar. To create a "child" window simply specify the parent (using 
-parent) when creating the window.


Cheers,

jez.



From: "Chris" <[EMAIL PROTECTED]>
To: 
Subject: [perl-win32-gui-users] Child Windows.
Date: Sat, 29 Nov 2003 14:10:00 -0800

Okay, I'm working on an application, but I need to use a child window from
what I was reading, so that I don't have anything showing up in the 
taskbar,

when my app runs. I only want the window to be visible at times, and the
tray icon nothing else. I was told I need to use a parent windows and then 
I

could hide that and have the child window howing, and it should do what I'm
looking for, if anyone could help, I would very much appreciate it.



_
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger





RE: [perl-win32-gui-users] Child Windows.

2003-12-01 Thread Peter Eisengrein
When you create the child window, add this arg:

-parent => $Window,

Yes, you can hide the parent and leave the child showing...

-Pete


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 29, 2003 5:10 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Child Windows.


Okay, I'm working on an application, but I need to use a child window from
what I was reading, so that I don't have anything showing up in the taskbar,
when my app runs. I only want the window to be visible at times, and the
tray icon nothing else. I was told I need to use a parent windows and then I
could hide that and have the child window howing, and it should do what I'm
looking for, if anyone could help, I would very much appreciate it.


RE: [perl-win32-gui-users] Child Windows.

2003-12-01 Thread Peter Eisengrein
However, if you are just looking to run an app in the background like a
service, you do not need to make it a gui (probably not the most efficient
solution). In that case, check out Win32::Daemon

-Pete

-Original Message-
From: Peter Eisengrein 
Sent: Monday, December 01, 2003 8:02 AM
To: 'Chris'; perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Child Windows.


When you create the child window, add this arg:

-parent => $Window,

Yes, you can hide the parent and leave the child showing...

-Pete


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 29, 2003 5:10 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Child Windows.


Okay, I'm working on an application, but I need to use a child window from
what I was reading, so that I don't have anything showing up in the taskbar,
when my app runs. I only want the window to be visible at times, and the
tray icon nothing else. I was told I need to use a parent windows and then I
could hide that and have the child window howing, and it should do what I'm
looking for, if anyone could help, I would very much appreciate it.


RE: [perl-win32-gui-users] not a CODE reference

2003-12-01 Thread Howard, Steven \(US - Tulsa\)

If I follow what you are asking, basically you are asking how to sort
through the keys of a hash, and see what the values are associated with
the keys in that hash. If this is correct, then this can be done very
simply:

foreach (keys %PLZ)
{
print "$_ is checked\n" if $PLZ->{$_}->{Checked};
}

Inside the for, or foreach loops, the current variable is identified by
$_. When you are doing a foreach (keys) or foreach (sort keys) on a
hash, the $_ is the current key in the evaluation. You don't need to put
them into a list context in the intermediate like you are doing.

Does this work for you?

Steve H.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
YANDEX
Sent: Sunday, November 30, 2003 10:37 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] not a CODE reference

Hello perl-win32-gui-users,

  I have a small window with many checkboxes. I need to ask every
  checkbox, so I:
  for(0..((keys %PLZ) - 1)){
  if($Window->(sort keys %PLZ)[$_]->Checked == 1){
  print $PLZ{(sort keys %PLZ)[$_]}." is checked\n";
  }

  this dont works, the error: "Not a CODE reference at ..."

  perldiag say to me: "(W overload) The second (fourth, sixth, ...)
  argument of overload::constant needs to be a code reference.
  Either an anonymous subroutine, or a reference to a subroutine."
  
  so I write workaround:

  for(0..((keys %PLZ) - 1)){
   $Ch = (sort keys %PLZ)[$_];
   if($ModalWindow->$Ch->Checked == 1){
   print $PLZ{(sort keys %PLZ)[$_]}." is checked\n";
  }

  can somebody tell me how can I do this without using intermediate
  variable ($Ch) ??
-- 
Best regards,
Pavel mailto:[EMAIL PROTECTED]



---
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


This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, you should delete this message and are
hereby notified that any disclosure, copying, or distribution of this
message, or the taking of any action based on it, is strictly prohibited.




RE: [perl-win32-gui-users] Child Windows.

2003-12-01 Thread Chris
That worked perfectly, by chance, can you change the color of the progress
bar, cause I've been having trouble changing it's colors, so I'm not sure if
it's possible.

 

  _  

From: Peter Eisengrein [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 5:02 AM
To: 'Chris'; perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Child Windows.

 

When you create the child window, add this arg: 

-parent => $Window, 

Yes, you can hide the parent and leave the child showing... 

-Pete 

 

-Original Message- 
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 29, 2003 5:10 PM 
To: perl-win32-gui-users@lists.sourceforge.net 
Subject: [perl-win32-gui-users] Child Windows. 

 

Okay, I'm working on an application, but I need to use a child window from
what I was reading, so that I don't have anything showing up in the taskbar,
when my app runs. I only want the window to be visible at times, and the
tray icon nothing else. I was told I need to use a parent windows and then I
could hide that and have the child window howing, and it should do what I'm
looking for, if anyone could help, I would very much appreciate it.



Re[2]: [perl-win32-gui-users] not a CODE reference

2003-12-01 Thread YANDEX
Hello perl-win32-gui-users,

1. thanks a lot, it is solved (not a CODE reference - error)
2. How can I put hyperlink in Win32::GUI::Grid-Cell?
   example: http://home.arcor.de/paulwup/gui/1.gif (montage)
3. How can I get rid of grey area around Grid?
4. How can I kill a thread, that is startet with 

++

1.
HSUT> But it's probably because you need to add { } around (sort keys %PLZ)[$_].
HSUT>
HSUT> It's probably better to do something like that :
HSUT> 
HSUT> foreach (sort keys %PLZ) {
HSUT> if($Window->{$_}->Checked == 1) {
HSUT> print $PLZ{$_}." is checked\n";
HSUT> }
HSUT> }
HSUT> 
HSUT> Laurent

You are 100% right! "{}" is a trick!


HSUT> If I follow what you are asking, basically you are asking how to sort
HSUT> through the keys of a hash, and see what the values are associated with
HSUT> the keys in that hash. If this is correct, then this can be done very
HSUT> simply:

HSUT> foreach (keys %PLZ)
HSUT> {
HSUT> print "$_ is checked\n" if $PLZ->{$_}->{Checked};
HSUT> }

HSUT> Inside the for, or foreach loops, the current variable is identified by
HSUT> $_. When you are doing a foreach (keys) or foreach (sort keys) on a
HSUT> hash, the $_ is the current key in the evaluation. You don't need to put
HSUT> them into a list context in the intermediate like you are doing.

HSUT> Does this work for you?

Yes, I rewrite my code. It become cleaner to understand and shorter.

HSUT> Steve H.

Your answers ware very helpful for me.

Can you give me some more useful hints?

2. How can I put a hyperlink (clickable und colored, with a cursor,
that seems like a hand, if I point at link) in Win32::GUI::Grid-Cell.
I played with SetDefCellTextColor/GetFocusCell/etc but it is not good
solution for me. Are there "SetCellType(GVIT_HREF) or (GVIT_LINK)"? :-))
Example: http://home.arcor.de/paulwup/gui/1.gif (montage)

3. I have grey areas around Grid. How can I get rid of it?
   Example: http://home.arcor.de/paulwup/gui/1.gif

4. How can I stop/cancel/kill a thread, that was started with

$thr = threads->create(\&Subprogram);

I mean a user are clicking a "Cancel"-button to break a task, but the
thread continue to run and she/he get a undesirable result.  I readed
"perlthrtut" and couldnot find some hints for me.


-- 
Best regards,
Pavelmailto:[EMAIL PROTECTED]




[perl-win32-gui-users] Progress bar's

2003-12-01 Thread Chris
Okay, I need to know how I can specify a custom color for a progress bar, so
it can be red or blue, depending on the status of my application. I've tried
to do it by changing the -fill and - color commands and have had no luck, if
anyone knows anything about how to do this please help, I've spent 4 hours
trying to figure it out now.



Re: Re[2]: [perl-win32-gui-users] not a CODE reference

2003-12-01 Thread Laurent ROCHER
Hi,

> Can you give me some more useful hints?
>
> 2. How can I put a hyperlink (clickable und colored, with a cursor,
> that seems like a hand, if I point at link) in Win32::GUI::Grid-Cell.
> I played with SetDefCellTextColor/GetFocusCell/etc but it is not good
> solution for me. Are there "SetCellType(GVIT_HREF) or (GVIT_LINK)"? :-))
> Example: http://home.arcor.de/paulwup/gui/1.gif (montage)

Actualy, no hyperlink cell but probably in a futur version ;o)

> 3. I have grey areas around Grid. How can I get rid of it?
>Example: http://home.arcor.de/paulwup/gui/1.gif

You can use ExpandToFit function when you cells area is smaller than your
grid area.
Or, you can change background color with SetGridBkColor (not very nice).

I know this grid have need to be improve.
I use  MFC Grid control 2.24 By Chris Maunder.
But, no new release for a long time :(
See : http://www.codeproject.com/miscctrl/gridctrl.asp

> 4. How can I stop/cancel/kill a thread, that was started with
>
> $thr = threads->create(\&Subprogram);
>
> I mean a user are clicking a "Cancel"-button to break a task, but the
> thread continue to run and she/he get a undesirable result.  I readed
> "perlthrtut" and couldnot find some hints for me.

I don't know very well thread.

Have you try to share a $stop variable with threads::shared ?
So when user cancel, you set this variable and wait thread finish.
And, in you thread you test this variable an stop it if is set.

Laurent.




[perl-win32-gui-users] Coloring again,

2003-12-01 Thread Chris
I'm trying to read in some custom colors though a configuration file. But
they don't seem to work, here's what I have so far.

 

 

sub skin {

if ($settings{'skin'} ne 'default') {

if (-e("./$settings{'skin'}/skin.ini")){

logit("Skinning file exists");

$sk=1;

} else {

logit("Skin Files isn't here");

goto DefaultSkin;

}

if ($sk) {

open(TMP,
"./$settings{'skin'}/skin.ini");

@skin = ;

close(TMP);

foreach $line (@skin) {

if ($line =~
/(.*?)=(.*?)$/i) {

$skin{$1}=$2;

}

logit("\$skin{$1}=$skin{$1}");

}

}

} else {

DefaultSkin:

$skin{urlcolor} = 0xFF;

$skin{errorcolor} = 0xFF;

$skin{normalcolor} = 0x00;

$skin{icon} = "icon.ico";  

}

}

 

My custom skin file looks like

 

urlcolor=0x00FF00

errorcolor=0xFF

normalcolor=0xFF

icon=icon.ico

if someone could help me resile my issue, it would help

 



Re: [perl-win32-gui-users] Progress bar's

2003-12-01 Thread Steve Pick
Oh dear. I tried so much to get this to work, mucking about with classes and
stuff and I couldn't figure out how. Best way I found is to paint your own
damn rectangle using a Graphic object :) I realise that's not ideal, but
it's the best solution I've got i'm afraid. I'd be interested as well if
anyone can enlighten me on how to do coloured progress bars.

Steve



- Original Message - 
From: Chris
To: perl-win32-gui-users@lists.sourceforge.net
Sent: Monday, December 01, 2003 6:15 PM
Subject: [perl-win32-gui-users] Progress bar's


Okay, I need to know how I can specify a custom color for a progress bar, so
it can be red or blue, depending on the status of my application. I've tried
to do it by changing the -fill and - color commands and have had no luck, if
anyone knows anything about how to do this please help, I've spent 4 hours
trying to figure it out now.