Print Page | Close Window

HOWTO: Rearrange tabs of CXTPTabControl by code

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=24304
Printed Date: 22 December 2024 at 8:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: Rearrange tabs of CXTPTabControl by code
Posted By: mgampi
Subject: HOWTO: Rearrange tabs of CXTPTabControl by code
Date Posted: 07 July 2022 at 12:28pm
Hi;

I try in vain to rearrange tab items by code using CXTPTabControl::MoveItem().
For example, I want to bring the last item to the front using

auto Item=Control_.GetItem(Control_.GetItemCount()-1);
if (Item!=nullptr) {
  Control_.MoveItem(Item, 0);
}

but nothing happens, all tabs are shown at their initial position as inserted when the control has been created!
Is it due to the fact that a few items inbetween are not visible?

What's wrong?


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

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Replies:
Posted By: mgampi
Date Posted: 07 July 2022 at 1:17pm
Forget the question, just found the answer in my own legacy code. It's been prevented using a strange solution.


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

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



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