The invention provides a digital camera having a viewfinder with an adjustable
length. The digital camera includes a first viewfinder member, a second viewfinder
member, a first resilient member, a first engagement member, and a second engagement
member. In this invention, the first viewfinder member is mounted in the digital
camera. The second viewfinder member is mounted in the first viewfinder member
and is capable of sliding relative to the first viewfinder member. The first resilient
member is connected to the second viewfinder member and capable of pushing the
second viewfinder member from a ready position to an ejected position. The first
engagement member is mounted on the second viewfinder member. The second engagement
member cooperates with the first engagement member so as to press against the first
engagement member to keep the second viewfinder member at the ready position when
the second engagement member is at an engaged position, and to be pushed toward
the ejected position by the first resilient member when the second engagement member
moves toward a non-engaged position.