Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - HOWTO: Rearrange tabs of CXTPTabControl by code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOWTO: Rearrange tabs of CXTPTabControl by code

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

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: HOWTO: Rearrange tabs of CXTPTabControl by code
    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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
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.375 seconds.