to do something that takes away all of your choices They've painted themselves into a corner by promising to announce the results of their investigation.The army painted the rebels into a corner, and the only choice they had was to fight.
to do something which puts you in a very difficult situation and limits the way that you can act I've painted myself into a corner here. Having said I won't take less than £20 an hour, I can't then be seen to accept a job that pays less.