Danno Ferrin | 1 Nov 2007 04:58
Favicon
Gravatar

Re: [groovy-user] tooltiptext...

Thanks for the question, this was actually a huge gap, and is now fixed.  It should show up in the RC-2 builds in the next week or so (or a freshly built snapshot).  ToolTip wasn't the only missing functionality...

What I added was new atttributes that the children of JTabbedPane can have, like the newly minted title: attribute.  The added attributes are:

tabIcon: <Icon>
tabDisabledIcon: <Icon>
tabToolTip: <String>
tabBackground: <Color>
tabForeground: <Color>
tabEnabled: <boolean>
tabMnemonic: <int> or <String : String.length() > 1> or <char>
tabDisplayedMnemonicIndex: <int>

So your example would be...
import groovy.swing.SwingBuilder
swing = new SwingBuilder()
frame = swing.frame(title:'Demo', pack:true, show:true) {
        tabbedPane {
                panel(name: 'hola', tabToolTip:'hi') {
                        label(text:'hello')
                }
                panel(name:'mundo', tabToolTip:"y'all") {
                        label(text:'world')
                }
        }
}


On 10/31/07, John Sanabria <john.sanabria-QCqA1iSflAr2fBVCVOL8/A@public.gmane.org > wrote:
Hi,

How can I add a tooltiptext into a tab in a tabbedpane component?

thanks a lot,

import groovy.swing.SwingBuilder
swing = new SwingBuilder()
frame = swing.frame(title:'Demo') {
        tabbedPane {
                panel(name:'hola') {
                        label(text:'hello')
                }
                panel(name:'mundo') {
                        label(text:'world')
                }
        }
}
frame.pack()
frame.show


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



Gmane