You do have the correct idea. Just recall that a component is a maximally connected subset. So there is no problem getting a neighborhood as a subset.
I want to show the following :
Let U be a open subset of IR^2.
If f is constant on each connected component, then f:U->\IR is locally constant.
My Idea was this:
Let x be a arbitrary point of U. We have to show that there is a (open) nbh. V of x, s.t.
f|V is constant.
We know x is an elm. of a conn. component V' of U and f is constant on V'.
Now i couldn't show that there exist an (open) nbh. V of x, s.t. V is a subset of V'.
Is this the right way? how can i show this property of conn. components.
Thank you for your help
Theorem: Let be a topological space. Then, every connected component of is open if and only if is locally connected.