skip to main content
Programmers documentation > Styling > Using Cascading Style Sheets > Customizing selection in a table or a tree
 
Customizing selection in a table or a tree
How to customize selection in the tree component
To customize object selection in the tree component, you should use the "selected" pseudoclass, and define the behavior that you want using the CSS properties that are available for the business objects displayed.
The following example changes the label foreground of the object to red when it is selected:
 
object {
  labelForeground: black;
}
object:selected {
  labelForeground: red;
}
How to customize selection in the table component
To customize object selection in the table component, you should use the "selected" pseudoclass, and define the behavior that you want using the CSS properties that are available for the business objects and attributes displayed.
For example, in a table component that displays network element objects, you can change the color of the label in the Name column using the following CSS extract:
 
object."ilog.tgo.model.IltObject/name" {
  labelForeground: black;
}
object."ilog.tgo.model.IltObject/name":selected {
  labelForeground: red;
}

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.