Just solved it on paper, programing tonight:
Example: 4 Cols
b1 = int (subcats/cols); if rest b1++
do till b1
b2 = int (subcats-b1)/(cols-1); if rest b2++
do till b2
b3 = int(subcats-b1-b2)/(cols-2); if rest b3++
do till b3
do rest
Seems this is something for a function that calls itself; i dont know the english word.
Beacause i have only four cols i will do it on this way, if someone could program a function for x cols,
it would be helpful for others.
Example: 4 Cols
b1 = int (subcats/cols); if rest b1++
do till b1
b2 = int (subcats-b1)/(cols-1); if rest b2++
do till b2
b3 = int(subcats-b1-b2)/(cols-2); if rest b3++
do till b3
do rest
Seems this is something for a function that calls itself; i dont know the english word.
Beacause i have only four cols i will do it on this way, if someone could program a function for x cols,
it would be helpful for others.