Categories > Coding > C# >

Winforms Panel Animation Problem

OwlGuru

Gaming LV

Posts: 25

Threads: 15

Joined: Sep, 2021

Reputation: 0

Posted

Hello, I have a problem with animating a panel. I am using Siticone in Winforms(because it's much more comfortable for me). So when I press a button it slides in a Setting Panel and then after 3640 miliseconds it changes the button to a diffrent one and when you press the new button it slides back in. But the problem is when I do this it works the first time but after it just doesn't work. Here is the code: https://pastebin.com/ihAzbg24

And here is the video of how it works and doesn't work https://files.fm/f/ycwpaht7q

  • 0

I play minecraft and sometimes roblox with cheats

Akula

Pv.Akula

vip

Posts: 220

Threads: 14

Joined: Apr, 2018

Reputation: 37

Replied

its 2 am so spare me the trouble if i'm wrong. but theres no replies so i guess ill help. giving it a quick glance it looks like the issue stems from a syntax error here:

 

"private void animateBack_Tick(object sender, EventArgs e)

        {
            if (!SettingPanel.Visible)
            {
                SettingPanel.Left = _endRight;
                SettingPanel.Visible = true;
            }"
 
wouldnt u want SettingPanel.Visible = true; to be SettingPanel.Visible = false;  since you're hiding the panel instead of opening it? it looks like u copied the code from the open animation and forgot to edit. hope this helps
  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )