For a hobby project I am planning, it would be quite convenient to have an off-the-shelf battery holder (3*AA or 3*AAA) complete with on/off switch and external DC connector (e.g. barrel type, switching off the battery supply when a plug is inserted). The whole thing should be prepared for mounting in a back panel, using screws or molded retaining clips/tabs. I.e. the battery lid, switch and connector must all face the same side, and it should be possible to open the actual battery compartment while the total assembly/frame remains installed in the panel.
This seems like an obvious and useful piece of kit. But I did not find anything at the usual sources, i.e. major distributors, hobby shops, AliExpress. All I can find are little boxes where I am not sure about the use case -- apparently they are supposed to dangle loosely on their two flimsy wires? Not suitable for my intended mounting scheme since the switch is on the side of the box, and they don't have a DC connector.
If you have come across such a gadget suitable for panel mounting, many thanks for pointing me in the right direction!