Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - BUG?: Hiding tab does not change current item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG?: Hiding tab does not change current item

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: BUG?: Hiding tab does not change current item
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.