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,
Pavel                            mailto:[EMAIL PROTECTED]


Reply via email to