Re: [perl-win32-gui-users] Pre selecting items in list Views and List Boxes

2004-12-03 Thread Jez White
Thanks for this Glenn. You are correct, it was the focus.

I still can't get it working within my app - the code that uses Select is being 
called from a tab strip event (which shows the listview) - so perhaps it has 
something to do with that. I'll do more digging.

jez.
  - Original Message - 
  From: Glenn W Munroe 
  To: 'Jez White' ; 'Win32-GUI' 
  Sent: Thursday, December 02, 2004 7:07 PM
  Subject: RE: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


  Yes, but that's just focus. Adding

$mainWindow->ListView->SetFocus;

  after

$mainWindow->ListView->Show;

  fixes that. I'm not quite sure why the Listbox example doesn't need it.

  Glenn



--
  From: Jez White [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, 02 December, 2004 16:00
  To: Glenn W Munroe; 'Win32-GUI'
  Subject: Re: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


  Interesting - it does work - although the selected items are grey not blue 
(but if a third item is selected by clicking and holding shift, they all turn 
blue) - this is using XP styles - do you get the same?

  Now, as for why it doesn't work in my main app...

  Thanks,

  jez. 
- Original Message - 
From: Glenn W Munroe 
To: 'Jez White' ; 'Win32-GUI' 
Sent: Thursday, December 02, 2004 5:01 PM
Subject: RE: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


Jez,

Hummm. I was pretty sure you would have tried that. There must be something 
else wrong. Does this modification to your example not work for you?

===

use Win32::GUI;
 
my $mainWindow = new Win32::GUI::Window (
-name => "mainWindow",
-title=> "Testing",
-pos  => [0, 0],
-size => [300, 300],
);
 
my $lb=$mainWindow->AddListView (
   -name   => "ListView",
   -pos  => [20, 60],
   -size => [100, 120],
);

$mainWindow->ListView->InsertColumn(
 -index  => 0,
 -text  => "Item",
);

$mainWindow->ListView->ColumnWidth(0,90);

$mainWindow->ListView->InsertItem(-text => 'One');  
$mainWindow->ListView->InsertItem(-text => 'Two');  
$mainWindow->ListView->InsertItem(-text => 'Three');  
$mainWindow->ListView->InsertItem(-text => 'Four');  
$mainWindow->ListView->Hide;
 
my $show=$mainWindow->AddButton (
   -name   => "Button",
   -pos  => [20, 20],
   -size => [40, 40],
   -text => 'Show',
   -onClick => \&Show,
);
 
my $hide=$mainWindow->AddButton (
   -name   => "Button2",
   -pos  => [60, 20],
   -size => [40, 40],
   -text => 'Hide',
   -onClick => sub {$mainWindow->ListView->Hide;},
);

$mainWindow->Show;
 
Win32::GUI::Dialog();
 
sub Show {
  #select the first and last items
  $mainWindow->ListView->Show;
  $mainWindow->ListView->Select(0);
  $mainWindow->ListView->Deselect(1);
  $mainWindow->ListView->Deselect(2);
  $mainWindow->ListView->Select(3);
  return 1;
}





From: Jez White [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 02 December, 2004 13:39
To: Glenn W Munroe; 'Win32-GUI'
Subject: Re: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


Hi Glenn,

Yeah - I tried that - but no joy - if Select is used in the list box it 
doesn't work either. Well, it doesn't work when the -multisel option is used, 
and only 1 row is selected when it's turned off.

Cheers,

jez.

  - Original Message - 
  From: Glenn W Munroe 
  To: 'Jez White' ; 'Win32-GUI' 
  Sent: Thursday, December 02, 2004 4:33 PM
  Subject: RE: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


  Jez,

  I hope this isn't a stupid question, but have you tried Select(INDEX) and 
Deselect(INDEX)? I don't think they are exact equivalents of SetSel, but they 
do what I *think* you want to do.

  Glenn



--
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jez White
  Sent: Thursday, 02 December, 2004 13:07
  To: Win32-GUI
  Subject: [perl-win32-gui-users] Pre selecting items in list Views and 
List Boxes


  Hi,

  I'm trying to pre select several items that appear in a list view. These 
items have been selected by the user previously, so when the list is reshown 
later I want those items to be pre-selected. The example below works with a 
list box - but for the life of me, I can't seem to get it working with a list 
view? Am I missing something?

  Cheers,

  jez.

  --

[perl-win32-gui-users] Button disabled ?

2004-12-03 Thread Vassiliy Truskov

Hello, everybody.

I'm having a problem with Button view when i set status as 'disabled => 
0'. After I change status of button to "disabled => 1',
I'm able to push button, but is still has a gray status "disabled". It 
will be 'viewable' after i change status back to "disabled"

Here is a simple code to reproduce the problem:


use Win32::GUI;

$W = new Win32::GUI::Window(
   -title=> "Win32::GUI::Button test",
   -left => 100,
   -top  => 100,
   -width=> 360,
   -height   => 260,
   -name => "Window",
);

$i = 0;
$my_but = $W->AddButton(
   -name => "Sample",
   -left => 5,
   -top  => 5,
   -text => "Click button",
   -disabled => 1,
);

$check1 = $W->AddCheckbox(
   -name => "Check1",
   -left => 8,
   -top  => 50,
   -text => "Checkbox 1",
);

$W->Show;

Win32::GUI::Dialog();

sub Window_Terminate {
   return -1;
}


sub Check1_Click {
 if($i==0)
 {
   $my_but->Change(-disabled => 0);
   $i = 1;
 } else {
   $my_but->Change(-disabled => 1);
   $i = 0;
 }
 return 1;
}


Any help is appreciated,

Vassiliy




RE: [perl-win32-gui-users] Button disabled ?

2004-12-03 Thread Peter Eisengrein
I would change it to:

$my_but->Enable();
$my_but->Disable(); 

instead of trying to change the -disabled parameter of the button itself.



> -Original Message-
> From: Vassiliy Truskov [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 03, 2004 3:55 PM
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: [perl-win32-gui-users] Button disabled ?
> 
> 
> Hello, everybody.
> 
> I'm having a problem with Button view when i set status as 
> 'disabled => 
> 0'. After I change status of button to "disabled => 1',
> I'm able to push button, but is still has a gray status 
> "disabled". It 
> will be 'viewable' after i change status back to "disabled"
> Here is a simple code to reproduce the problem:
> 
> 
> use Win32::GUI;
> 
> $W = new Win32::GUI::Window(
> -title=> "Win32::GUI::Button test",
> -left => 100,
> -top  => 100,
> -width=> 360,
> -height   => 260,
> -name => "Window",
> );
> 
> $i = 0;
> $my_but = $W->AddButton(
> -name => "Sample",
> -left => 5,
> -top  => 5,
> -text => "Click button",
> -disabled => 1,
> );
> 
> $check1 = $W->AddCheckbox(
> -name => "Check1",
> -left => 8,
> -top  => 50,
> -text => "Checkbox 1",
> );
> 
> $W->Show;
> 
> Win32::GUI::Dialog();
> 
> sub Window_Terminate {
> return -1;
> }
> 
> 
> sub Check1_Click {
>   if($i==0)
>   {
> $my_but->Change(-disabled => 0);
> $i = 1;
>   } else {
> $my_but->Change(-disabled => 1);
> $i = 0;
>   }
>   return 1;
> }
> 
> 
> Any help is appreciated,
> 
> Vassiliy
> 
> 
> 
> ---
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 
> 
> __
> Message transport security by GatewayDefender.com
> 3:56:24 PM ET - 12/3/2004
> 


Re: [perl-win32-gui-users] Button disabled ?

2004-12-03 Thread Vassiliy Truskov

Great! Thanks, Peter.
I didn't know about Enable-Disable staff.
Any recommendation about Win32::GUI documentation? I red attached with 
the module,

but it is not covering everything very much.

Thanks,
Vassiliy

Peter Eisengrein wrote:


I would change it to:

$my_but->Enable();
$my_but->Disable();

instead of trying to change the -disabled parameter of the button itself.



> -Original Message-
> From: Vassiliy Truskov [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 03, 2004 3:55 PM
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: [perl-win32-gui-users] Button disabled ?
>
>
> Hello, everybody.
>
> I'm having a problem with Button view when i set status as
> 'disabled =>
> 0'. After I change status of button to "disabled => 1',
> I'm able to push button, but is still has a gray status
> "disabled". It
> will be 'viewable' after i change status back to "disabled"
> Here is a simple code to reproduce the problem:
>
>
> use Win32::GUI;
>
> $W = new Win32::GUI::Window(
> -title=> "Win32::GUI::Button test",
> -left => 100,
> -top  => 100,
> -width=> 360,
> -height   => 260,
> -name => "Window",
> );
>
> $i = 0;
> $my_but = $W->AddButton(
> -name => "Sample",
> -left => 5,
> -top  => 5,
> -text => "Click button",
> -disabled => 1,
> );
>
> $check1 = $W->AddCheckbox(
> -name => "Check1",
> -left => 8,
> -top  => 50,
> -text => "Checkbox 1",
> );
>
> $W->Show;
>
> Win32::GUI::Dialog();
>
> sub Window_Terminate {
> return -1;
> }
>
>
> sub Check1_Click {
>   if($i==0)
>   {
> $my_but->Change(-disabled => 0);
> $i = 1;
>   } else {
> $my_but->Change(-disabled => 1);
> $i = 0;
>   }
>   return 1;
> }
>
>
> Any help is appreciated,
>
> Vassiliy
>
>
>
> ---
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from
> real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
>
>
> __
> Message transport security by GatewayDefender.com
> 3:56:24 PM ET - 12/3/2004
>





RE: [perl-win32-gui-users] Button disabled ?

2004-12-03 Thread Peter Eisengrein

> Any recommendation about Win32::GUI documentation? I red attached with the
module,
> but it is not covering everything very much.


Jeb created a website/project for the documentation. Not sure how complete
it is, but I'm sure it's a good place to start: 
http://jeb.ca/perl/win32-gui-docs/index.pl/home

Aldo's original documentation is at http://dada.perl.it/gui_docs/gui.html


[perl-win32-gui-users] PPM for Ver 1.0

2004-12-03 Thread Joseph . Vieira
Is there a ppm for version 1.0, sourceforge only had the source and I
couldn't find any instructions on how to install it?

Thanks