You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by lello <rb...@gmail.com> on 2011/02/16 23:20:27 UTC

TabPane close button

Hi group,

is there a way to have a button to close a tab on a TabPane?



-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2513494.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Greg Brown <gk...@verizon.net>.
> Adding a static 'closeable' property to TabPane would allow this to be set for specific tabs.  

That was actually the original design, but I moved it up to TabPane since I didn't think there would be that many use cases for closing individual tabs. It is certainly possible to do it on a per-tab basis though.

G


Re: TabPane close button

Posted by Greg Brown <gk...@verizon.net>.
Yup, looks fine.

On Feb 18, 2011, at 9:52 AM, lello wrote:

> 
> Done,
> 
> is it correct?
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2527074.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.


Re: TabPane close button

Posted by lello <rb...@gmail.com>.
Done,

is it correct?
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2527074.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Sandro Martini <sa...@gmail.com>.
Hi Lello,
can you add a ticket in jira for this (targeted to 2.1) as an enhancement ?

And add this as a reference:
http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-td2513494.html

Thank you very much,
Sandro

-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2526459.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by lello <rb...@gmail.com>.
Just a comment,

at the moment I solved the problem by using a TabPaneSelectionListener and
changing the closeable property
of the tabPane according to the tab that I have selected. Not very clean but
it works...waiting for 2.1.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2526280.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Sandro Martini <sa...@gmail.com>.
Hi Lello, 
don't worry, suggestions are always good ...

And excuse me, my previous post should have been "Hi Lello and Chris" ...
:-) .

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2525844.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by lello <rb...@gmail.com>.
Glad to read that my request was not that bad. :-)
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2525824.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Sandro Martini <sa...@gmail.com>.
Hi Chris,
what do you think on add this in jira as an enhancement for the 2.1 release
?

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2525587.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Chris Bartlett <cb...@gmail.com>.
The current implementation uses the 'closeable' property of TabPane to make
all tabs closeable/non-closeable.

It seems like a reasonable feature request to allow individual tabs to have
their own 'closeable' property.

Adding a static 'closeable' property to TabPane would allow this to be set
for specific tabs.  The current property might be used as a the default
value for whether individual tabs are closeable.

Chris

On 18 February 2011 15:35, lello <rb...@gmail.com> wrote:

>
> Last info,
> is it possible to set this property on a single tab, i.e. all tabs
> closeable
> but one?
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2525247.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>

Re: TabPane close button

Posted by lello <rb...@gmail.com>.
Last info,
is it possible to set this property on a single tab, i.e. all tabs closeable
but one?
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2525247.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by lello <rb...@gmail.com>.
Sorry for the stupid question, I missed the "closeable2 property completely.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2515952.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TabPane close button

Posted by Chris Bartlett <cb...@gmail.com>.
Set the 'closeable' property on the TabPane.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TabPane.html#isCloseable()
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TabPane.html#setCloseable(boolean)

See the demo here
http://pivot.apache.org/tutorials/tab-panes.html

Chris

On 17 February 2011 05:20, lello <rb...@gmail.com> wrote:

>
> Hi group,
>
> is there a way to have a button to close a tab on a TabPane?
>
>
>
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/TabPane-close-button-tp2513494p2513494.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>