DekGenius.com
Previous Section  < Day Day Up >  Next Section

Recipe 9.17 Enabling and Disabling Table Items

9.17.1 Problem

You want to gray out table items so that they can't be selected.

9.17.2 Solution

Use the table item's setGrayed method.

9.17.3 Discussion

To gray out a table item, call that item's setGrayed method with a value of true; to enable the item again, pass the setGrayed method a value of false.

    Previous Section  < Day Day Up >  Next Section