Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Hide filter in FilteredTree
Hide filter in FilteredTree [message #335438] Wed, 08 April 2009 13:05 Go to next message
Mohamed Hussein is currently offline Mohamed HusseinFriend
Messages: 76
Registered: July 2009
Member
Hello,

I want to create a FilteredTree where I can have a button in the view
toolbar that hides and shows the filter text box.

I tried the filterTree.getFilterControl().setVisible(false) but it hides
the text box while the panel under it is still displayed and taking space
from the view.

Is there a way to make the whole strip of the text box appear and
disappear?

Thanks,
Mamado.


Best Regards,
Mohamed.
Re: Hide filter in FilteredTree [message #335446 is a reply to message #335438] Wed, 08 April 2009 17:29 Go to previous message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

Hi Mamado,

in Eclipse Error Log view we do something like this to show/hide filter
control:
(you can ignore lines with fMemento)

private void showFilterText(boolean visible) {
fMemento.putBoolean(P_SHOW_FILTER_TEXT, visible);

Text filterControl = fFilteredTree.getFilterControl();
Composite filterComposite = filterControl.getParent(); // FilteredTree
new look lays filter Text on additional composite

GridData gd = (GridData) filterComposite.getLayoutData();
gd.exclude = !visible;
filterComposite.setVisible(visible);

// reset control if we aren't visible and if we get visible again
filterControl.setText(Messages.LogView_show_filter_initialTe xt);

if (visible) {
filterControl.selectAll();
fFilteredTree.setFocus();
}

fFilteredTree.layout(false);
}



Mamado pisze:
> Hello,
>
> I want to create a FilteredTree where I can have a button in the view
> toolbar that hides and shows the filter text box.
>
> I tried the filterTree.getFilterControl().setVisible(false) but it hides
> the text box while the panel under it is still displayed and taking
> space from the view.
>
> Is there a way to make the whole strip of the text box appear and
> disappear?
>
> Thanks,
> Mamado.
>
Previous Topic:FormText Tabbing.
Next Topic:continous full build, resource tree is lost
Goto Forum:
  


Current Time: Fri Apr 26 09:27:27 GMT 2024

Powered by FUDForum. Page generated in 0.02984 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top