Product, version and build: PowerShell Studio 5.4.140
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit
PowerShell Version: 5.1
I'm seeing some behavior with a tabcontrol object and tabpages that I think is strange. I'm hoping someone can help clear it up.
I have a form that has a tabcontrol with 4 tabs. Near the tabcontrol object is a button that when clicked will set the selected tab for the tabcontrol to tabpage1. On each tabpage on enter an entry is written to a log file indicated that tabpageX was entered, and then "stuff" happens. Each tabpage also logs when it's left. What I'm seeing happen is that when I'm on tabpage3 (for example, happens regardless of which tab I'm on) and I click the button, I see the following in my log:
- Tabpage3 left
- Button has been clicked
- Tabpage3 entered
- Tabpage3 left
- Tabpage1 entered
What I would expect to see is:
- Button has been clicked
- Tabpage3 left
- Tabpage1 entered
Does anyone have any clue as to why I'm seeing this type of behavior? I only see this strange behavior when having the button click switch the tabs. If I use the mouse to click between the tabs it functions as expected.
Edit: My current work around is on the tabpage enter event, check to see if the current tabpage is visible. If it's not visible, then run the stuff it needs to. If the tabpage is visible during the enter event, then don't do anything.
Thanks,
Cody
Strange behavior with tabcontrol and tabpages
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- cdouglas_nch
- Posts: 16
- Last visit: Wed Feb 28, 2024 10:55 am
Strange behavior with tabcontrol and tabpages
Last edited by cdouglas_nch on Mon Jun 12, 2017 10:50 am, edited 1 time in total.
Re: Strange behavior with tabcontrol and tabpages
[TOPIC MOVED TO THE POWERSHELL GUIS FORUM BY MODERATOR]
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.