ra74
ra74

Reputation: 134

CellTree remove blue selection bar

I've customized CellTree so that checkboxes are used to select items.
But I don't how I can remove default blue bar when I select the item ?

Upvotes: 0

Views: 122

Answers (1)

subrunner
subrunner

Reputation: 404

You could edit the CellTree CSS so that the selected item classes (cellTreeKeyboardSelectedItem and cellTreeSelectedItem ) do not modify the color anymore.

See Google Groups for how to introduce your own custom CSS to your CellTree:

CellTree has a constructor that takes a CellTree.Ressource instance.

[...]

You can create an interface that extends CellTree.Ressources (which is a ClientBundle) for overwriting images. To overwrite CSS create an interface that extends CellTree.Style (which extends CssRessource) and return this custom style in your custom CellTree.Ressource interface using "YourStyle cellTreeStyle();"

public interface TreeResources extends CellTree.Resources { @Source("../CellTree.css") public CellTree.Style cellTreeStyle(); }


Alternately, you can set your own SelectionModel in the CellTree so that none of the checkbox-selected items in the tree are actually selected (= get the selection CSS class) in the tree model. You will then have to handle the checkbox selection on your own, though.

Upvotes: 1

Related Questions