Create an opening
Mark a slit where the gate will go. This should be parallel to the face of the box and extend only halfway through the tube.
Cut out area for gate using a box cutter.
Test the fit of the gate material, should be loose.
Create the Gate
On a scrap piece of cardboard, trace the top edge of the gate. This is a mirror image of the curvature on the inside of the tube! We will use this as a guide to create a door that sits flush inside the tube.
Cut out the "U" shape you traced. This is your guide.
Trace shape onto a long piece of cardboard. Extend the lines further down the piece of cardboard. This is the outline of your gate.
Cut out the gate and poke a small hole in the top edge.
Attach the Arm
Find a paper clip and unbend it so it's a straight(ish) piece of wire.
Use pliers to bend one end over and hook this into the hole in the top of the gate.
Crimp paper clip in place so it hold onto the cardboard tight.
Insert gate into opening in tube. Test that it slides easily up and down.
Check that when the gate is closed it leaves no gaps between itself and the tube that treats might slip through.