Dave,
Here's a fairly straight-forward solution that won't show joints in any configuration and it is easier (IMHO) that earlier suggestions. I'll call it the "Lincoln Log" solution.
First, standardize on the length of the short dividers -- you show 4 from front-to-back -- make another and assume that the existing small compartments are the smallest you'd ever want. Make the long dividers in some optional lengths, cut at 1/2 way across the lap joint. Obviously, you need to make extras and the ends touching the box sides could have a small pin near the bottom to engage them into the sides. These half lap joints could be shallow on the long divider pieces and deep on the standard short dividers (clarified below).
Second, cut the shallow half lap joints at additional intervals on the short dividers to correspond to all possible partition positions.
For example, in the illustrated box, if you wanted six even-sized compartments, add a shallow half-lap at the middle of each short divider and exchange each "two-compartment" long divider sections with two short ones. If the top divider half laps are 2/3's to 3/4's shallower than the corresponding ones on the long divider segments, they should be close to invisible if unused, yet long enough to secure the partition segments from each side.
Clear as mud?
Rob