开发者

How to move tabs within the Microsoft Tab control?

I have an old app with a tab control (says SSTab开发者_如何学JAVA in properties, says Microsoft Tab ActiveX Control Version 6.0). It has 10 tabs with a multitude of controls on them.

I need to add a new tab, but it needs to be the 2nd from the left. However, the new tab will only show up in the right-most position and I don't see a property to move it relative to other tabs.

So short of copying all controls from tab to tab, how do I move the new tab into the 2nd position?


I'm pretty sure there's no way to do what you want to do with the SSTab.

Maybe you can copy each tab's controls in a container (like a PictureBox?) and copy these containers from tab to tab to simulate positioning tabs. You can edit the tabs' captions through the TabCaption property.


You can try to edit the form file directly and see if you can change the order on witch each Tab is created. Try to edit the file with .frm extension, and find the tab object by name. Its not trivial because the controls are not stored by tab so be carefull editing the file manually.

An alternative is to create a new form, copy and past the tab control to the new form (you will delete the form later). Then add a new tab (by changing the tabs property) and using copy + paste, copy all controls from the tab-1 to tab until you get an empty tab where you need it. When you are happy with the results, elete the tab control from the original form and copy the new one over from the form you created.

The good news is that VB6 auto-wires the controls and events and code, so nothing is lost when you delete and copy the new tab control from the new form.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜