![]() |
CXTTabview Addview causes flicker |
Post Reply
|
| Author | |
AliRafiee
Groupie
Joined: 06 May 2004 Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTTabview Addview causes flickerPosted: 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. 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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |