Click to See Complete Forum and Search --> : TabStrip control


xxMariusxx
September 21st, 2000, 11:57 AM
Hi! I am very new to Visual J++ 6.0 (I just installed it last night) though I've programmed in Java since '98 (being a college student though, we just use the Solaris JDK and vi editor in lab). Maybe this is a retard question, but I'll ask it anyway.

I have a form...on the form I have a TabStrip (which contains 2 TabItem's). I want to put a treeView on one of the Tabs. Problem is, J++ won't make the treeview part of the tab...or more correctly, tabItem1 doesn't contain treeView1. If I run the application and switch tabs, the treeview is still visible over tabItem2.

My guess is treeView1 is contained by Form1, rather than tabItem1. But I've been racking my brain trying to fix this...it won't let me change treeView1's parent property...even though it has a setParent() method, J++ whine's at me telling me it has no parent property.

Any ideas? I think I'm just looking at this from the wrong angle...maybe I imagine the controls in J++ interact w/each other differently than they really do...

dogbear
September 22nd, 2000, 05:04 AM
xxMariusxx,

I'm not quite sure if I understand the problem fully and I certainly am not familiar with Visual J++, but here's my 2-cents-worth...

For Symantec's TabPanel, you must add a java.awt.Panel first before you can add anything else(such as a TreeView). Try adding a panel to the TabStrip then add the TreeView to the Panel. That might just do the trick.

Otherwise, check out the class methods for TabStrip and that will give you a good idea of how the class is used properly.

Hope this helps.

Regards,

dogBear

PS Please Rate this Response!!!!

xxMariusxx
September 22nd, 2000, 10:30 AM
That's okay...i figured it out...sorta.

I'm guessing Symantec's TabPanel is like J++ TabControl. Problem is, there's a TabControl and a TabStrip control right next to each other on the toolbox. The TabControl has child component TabPage's...you can add new controls to a TabPage.

TabStrip...hell, I don't know what it's used for. It looks just like a TabControl...it has child component TabItems...but you can't add a control to a TabItem...so basically it looks like a TabControl but doesn't do anything useful (as far as I can tell anyway) ...except make me pull my hair out for 3 hours.

I've been over and over the class methods for TabStrip too...first, the documentation Microsoft gives leaves much to be desired. Secondly, they don't give much clue as to how I'd possibly use this thing in to accomplish anything...buncha getThis() and getThat() methods that return read-only properties that don't tell me anything.

*scratching head*...oh well, at least I've got a solution. Thanks for the response!

xxMariusxx