in reply to Re^2: Object isn't fully affected by the Animate method in Win32::GUI module
in thread Object isn't fully affected by the Animate method in Win32::GUI module

I'm not following exactly what you mean, but here is the code I'm currently using. Your original code worked also, but the toggle seemed weird.
$mainWindow->AddButton ( -name => 'b1', -text => 'label 1', -pos => [100, 0], -onClick => sub { $mainWindow->label1->Hide; $mainWindow->label1->Animate ( -show => 1, # !$mainWindow->label1->IsVisible(), -activate => 1, -time => 600, -direction => 'brtl', -animation => 'roll', ); }, );
So that you can compare, I'm using the latest perl and modules available from cygwin on windows 11. Perl 5.36.3, Win32::GUI v1.14.
  • Comment on Re^3: Object isn't fully affected by the Animate method in Win32::GUI module
  • Download Code

Replies are listed 'Best First'.
Re^4: Object isn't fully affected by the Animate method in Win32::GUI module
by Anonymous Monk on Aug 11, 2024 at 15:11 UTC

    The image in this link: 'https://i.postimg.cc/yx8n5CBv/hide.png' is what I get when I click 'label 1 hide' button on the right. The showing process worked OK if I hide the label at first.

    I am using Strawberry Perl and Win32::GUI at the latest version

      I don't know why '-show 0' is only removing the top left of the green for you. I can't reproduce it. Compare your perl and Win32::GUI versions to those I posted as a first step. You could also install a temporary minimal cygwin to check if it's something other than your perl/modules.

        I haven't used cygwin in a very long time, but from I can remember the only way to cleanly uninstall and remove cygwin is to reinstall Windows - because there are parts of cygwin that are not removed during uninstall. Based on that experience, I'm not sure that there is such a thing as a temporary install of cygwin. At least that's my opinion based on personal experience. Perhaps the newer versions of cygwin have a better uninstaller that does completely remove all of it without needing a reinstall of Windows.