The paper presents a self-consistent mean-field lattice theory of the Scheutjens-Fleer type where segments may adapt to temperature and the local environment by changing their distribution among internal states. Some new features are introduced in the theoretical treatment of incompressible systems, and it is demonstrated how the chemical potential may be calculated without reference to a bulk system. The theory is applied to make a qualitative prediction for the interaction between surfaces with grafted poly-(ethylene oxide), or PEO, chains. A simple two-state model for the PEO segments is used. The attractive force between the PEO-covered surfaces in water is predicted to be related to the temperature-dependent solubility of PEO in water. The contributions to the force are illustrated by simple examples. The attractive force does not change monotonically upon changing the graft density. At low coverages a strong bridging attraction is predicted if the surfaces are hydrophobic. As the surfaces become more polar, repulsion sets in at a larger separation and the overall attraction becomes less strong. A calculated, closed, solubility gap for a crude model of micelles of nonionic surfactants is presented.