Ok here ya go. It now auto sizes pretty much correctly. The only catch is that the larger the bag the more "off" the auto sizing gets and you end up with a bit larger than neccesary window. Unfortunately this is internal to EQ2 and nothing I can do about it. IIRC even the default UI suffers from this problem, though to a smaller extent. If you REALLY want to save space just fade the background and borders out and you'll never notice.
Also I had to employ some trickery to do this so if anyone has over about a 13 or 14 slot bag and sees anything funky let me know what it says
Heres some screenies to. The first shows the basic bags with everything on. You can see here how the one row bags are perfect (or damn near) but as the rows increase so does the error.
The second shot shows the larger bag with the frame and background faded out. It works well.