Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTTabview Addview causes flicker
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTTabview Addview causes flicker

 Post Reply Post Reply
Author
Message
AliRafiee View Drop Down
Groupie
Groupie


Joined: 06 May 2004
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote AliRafiee Quote  Post ReplyReply Direct Link To This Post Topic: CXTTabview Addview causes flicker
    Posted: 09 September 2005 at 1:15pm

Hi Everyone,

I sent this to company using their Bug Report Link and I got an automated email saying that I don't have an active contract.  I need an active contract to report a bug!?!?!

Anyway thought it might help someone out. This is for 8.70

What I have done is added a variable to the AddView method which allows the user to indicate if the newly added tab should be activated or not.  I was getting alot of flickering with the original implementation (I think they are trying to do too much for the user, what does adding a tab have to do with activating it!)

Download this for the modified files.2005-09-09_131446_XTTabCtrl.zip

Anyway, see below for more details.

Hi guys,

I have an SDI Application that has a Listbox on the left and a CXTTabView on the right. Depending on the users selection on the left I add 3 views to the Tab view. Every time the selection changes, I clear the views and add new ones, 3 views 1 2 and 3. Now here is my problem everytime I call AddView the tab control sets that view as the active view, so at the end of the calls tab 3 is the active tab, but I want tab 1 to be the active tab, and I have to call SetActiveView. And this causes a flicker. In order to get around this, I had to get rid of the call to SetActiveView in CXTTabCtrlBaseEx::AddControl, and also change the default window style in CXTTabCtrlBaseEx::CreateTabView from AFX_WS_DEFAULT_VIEW to WS_CHILD|WS_BORDER, in order to get rid of the WS_VISIBLE flag.

I also tried to insert the items in reverse order and that didn''t help the flickering because each tab is displayed as it is inserted. So inserting many tabs in a row will cause alot of flicker.

I was wondering if you guys would be intersted in allow the user to pass a bool to the AddView method to indicate whether they want to switch to the tab after it was created or not (if not don''t use the WS_VISIBLE flag and don''t call SetActiveView()). That would make my life easier when it comes time to upgrade to your new version.

If you know of a better way to do this please feel free to let me know.

Thanks

Ali Rafiee

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.047 seconds.