The use of a segmented, transmitted-x-ray detector in the scanning transmission x-ray microscope (STXM) allows a number of different image modes to be realised simultaneously, from a single scan of the specimen. A software-configurable detector system that is based on an 80x80-element CCD array has been tested using the STXM on ID21 at the ESRF. The whole CCD sub-system is controlled by software running on a PC, which handles the synchronisation of image data collection with the raster scan of the STXM, and returns a real-time image signal to the STXM control system, while storing a 3-D set of image data locally on the detector control PC. The readout electronics allow full CCD frames to be recorded in under 10ms for each pixel in the STXM image, so there is no significant time penalty associated with the collection of such a large volume of image data, when compared to STXM imaging with a single-element detector. Subsequent processing allows any appropriate image signals to be synthesised, and the user can quickly be presented with absorption, phase contrast, and darkfield images, all in perfect registration, to facilitate a rapid quantitative interpretation of the sample structure.