I am on Windows 10, and I am using Win32::GUI module to create a GUI-based application. The problem is, when I tried to use the Animate method (which is a common method) with a label, only the top left part of the label was applied to the animation. I had tried to change the size of the label but, the affected area was always at the top left corner, and the ratio of the affected area with respect to the whole label area seemed to remain the same.

Here is the code, when we press the button, the animation will be applied to the label:

use strict; use warnings; use Win32::GUI(); my $mainWindow = new Win32::GUI::Window( -name => 'mainWindow', -title => 'sample window', -size => [1200, 800], -minsize => [1200, 800], -onTerminate => sub { return -1; }, ); $mainWindow->AddLabel( -name => 'label1', -text => 'string in label 1', -background => 0x00ff00, -size => [500, 300], -pos => [300, 300], ); $mainWindow->AddButton( -name => 'b1', -text => 'label 1', -pos => [100, 0], -onClick => sub { $mainWindow->label1->Animate( -show => !$mainWindow->label1->IsVisible(), -activate => 1, -time => 600, -direction => 'lr', -animation => 'roll', ); }, ); $mainWindow->Show(); Win32::GUI::Dialog();

Why is that and how to solve it?

Btw, I also couldn't use any direction other than 'lr' and 'tb'.


In reply to Object isn't fully affected by the Animate method in Win32::GUI module by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.