The 'title' can be set with the static 'setTabData' method. http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TabPane.html#setTabData(org.apache.pivot.wtk.Component, java.lang.Object)
In Pivot terms I think this is known as an 'attached' property. See the section named 'Static Properties' here http://pivot.apache.org/tutorials/bxml-primer.html (I am not at a development PC now, so this might not be correct code) Label tabContent = new Label("Content of tab"); tabPane.getTabs().add(tabContent); TabPane.setTabData(tabContent, "The default renderer knows how to show this text as the title"); The Object that is passed to setTabData as the 2nd argument can be any Object. TabPane has a default renderer which will show Strings, but you can set a custom one with http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TabPane.html#setTabDataRenderer(org.apache.pivot.wtk.Button.DataRenderer) Chris On 2 August 2011 08:15, Frams <[email protected]> wrote: > http://apache-pivot-users.399431.n3.nabble.com/file/n3217569/ApplicationView.java > ApplicationView.java > > Thank you, > > tabPane.getTabs().add(--component--) words, however I still don't know how > to set the tittle for it yet. > > Thanks a lot! > Frams > > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/TabPane-in-desktop-application-via-code-tp3217080p3217569.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com. >
