P
Paul Engel
I have an application on which I have a tab control with two tabs. When a
user double-clicks on an item in tab1 of my tabs collection, tab2 becomes
the visible tab. (tabImageTabs.SelectedIndex = 1) When they double-click on
the content in tab2, they are taken back to tab1.
(tabImageTabs.SelectedIndex = 0)
When tab1 is restored, I have lost the position of the scrollbar and the
user must re-scroll to get back to where they were. I've tried setting the
scroll value (grab the verticlescroll value when leaving tab1 and assigning
it that value when I go back, but it doesn't seem to work.
Any ideas?
Here's the code I use to capture the position of the scrollbar when changing
to tab2:
ScrollBarLocation = tabThumbNails.VerticalScroll.Value
tabImageTabs.SelectedIndex = 1
Here's the code I am using to move back to the tab1 with the verticle scroll
value set:
tabImageTabs.SelectedIndex = 0
tabThumbNails.VerticalScroll.Value = ScrollBarLocation
(At this point, I get my tab1 back in front, but the scroll bar is back at
the top.)
user double-clicks on an item in tab1 of my tabs collection, tab2 becomes
the visible tab. (tabImageTabs.SelectedIndex = 1) When they double-click on
the content in tab2, they are taken back to tab1.
(tabImageTabs.SelectedIndex = 0)
When tab1 is restored, I have lost the position of the scrollbar and the
user must re-scroll to get back to where they were. I've tried setting the
scroll value (grab the verticlescroll value when leaving tab1 and assigning
it that value when I go back, but it doesn't seem to work.
Any ideas?
Here's the code I use to capture the position of the scrollbar when changing
to tab2:
ScrollBarLocation = tabThumbNails.VerticalScroll.Value
tabImageTabs.SelectedIndex = 1
Here's the code I am using to move back to the tab1 with the verticle scroll
value set:
tabImageTabs.SelectedIndex = 0
tabThumbNails.VerticalScroll.Value = ScrollBarLocation
(At this point, I get my tab1 back in front, but the scroll bar is back at
the top.)