Print Page | Close Window

CXTTabview Addview causes flicker

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2865
Printed Date: 08 November 2025 at 9:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTabview Addview causes flicker
Posted By: AliRafiee
Subject: CXTTabview Addview causes flicker
Date 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. http://forum.codejock.com/uploads/AliRafiee/2005-09-09_131446_XTTabCtrl.zip - 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




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