Print Page | Close Window

BUG?: Hiding tab does not change current item

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=10297
Printed Date: 28 March 2024 at 5:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG?: Hiding tab does not change current item
Posted By: mgampi
Subject: BUG?: Hiding tab does not change current item
Date Posted: 18 April 2008 at 9:34am
Hi;
 
I created a tab control with several tabs. The first four of them are visible at startup. When changing the visible state of the tab items to the opposite item(s) - first four are no longer visible and only the fifth is shown - the normally no longer visible tab pane stays still visible.
To reproduce:
 
Create a tab control with - lets say - 3 items. For better visibility switch the control to OneNote colors and then hide item index 2.
When pressing a button or menu item call
 
tab.GetItem(0)->SetVisible(FALSE);
tab.GetItem(1)->SetVisible(FALSE);
tab.GetItem(2)->SetVisible(TRUE);
 
Now you can see that the item 0 is still visible.
 
Just after clicking on the item(2) tab the selection changes.
 
I'm using Toolkit 11.2.2.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Replies:
Posted By: Oleg
Date Posted: 18 April 2008 at 1:08pm

Hi,

by "item 0 is still visible" do you mean Client of Item or Item Tab  ?
 
if client - its quite right - you hide tabs but don't change selection -
add
m_wndTab.GetItem(2)->Select();


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 18 April 2008 at 2:00pm
Hi Oleg;
Both are visible client of item and border around it. Suppose item 0 has a blue tab/area and item 2 a green one.
After hiding item 0 and 1 the tabs dissappear, but the whole client area still remains unchanged.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: Oleg
Date Posted: 18 April 2008 at 2:06pm
Hi,
 
You need manually select new Tab.  Item 0 is hidden but still selected.
 
Just add
m_wndTab.GetItem(2)->Select();


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 18 April 2008 at 2:17pm
Ok, I'll do that...
But I still believe that a hidden tab should automatically loose its selection state.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net