Not with Harry, but with Rosie our labrador when she was tiny - my son made a 'line' out of masking tape near our dining-room table - she had to stay 'behind the line' when we were eating

And she did.
After a few months, I got fed up of vaccuuming the line (!!) and took it away - but she never did over-step that mark while we were at the table God bless her

Sally + Harry x