开发者

Add tabs in reverse order?

By default tabs get added from right to left, so if I insert 1,2,3,4,5 then the tabs will read 5,4,3开发者_开发问答,2,1. How can I make it read 1,2,3,4,5 thanks. http://img96.imageshack.us/i/ahhh.png/

http://img96.imageshack.us/i/ahhh.png

This is obtained from inserting Untitled Project first and Untitled 5 last. What I would want would be for Untitled 5 to be selected at the far right and for Untitled Project to be at the far left and the ones inbetween following this idea...


If you are using win32 to insert the tabs, both the TCM_INSERTITEM and TabCtrl_InsertItem take the index of the tab as an argument. If you increment the index you insert the tabs in, as per the example on msdn, then they are inserted left-to-right. If you insert every tab at index 0, newer tabs push the existing tabs to the right and you get them reversed.


Insert them in the correct order in the first place. If they're already there and you want to reorder them, remove them, sort them how you want, and then add them in the correct order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜