Coloring boxes appropriately. Selecting boxes from list changes values and drawn box