int iwith = this.rowheaderwidth;
using(stringformat sf = new stringformat())
{
sf.formatflags = stringformatflags.nowrap;
sf.trimming = stringtrimming.ellipsischaracter;
sf.alignment = stringalignment.near;
sf.linealignment = stringalignment.center;
rectanglef rect;
if(!captionvisible)
{
rect = new rectanglef(new pointf(ix, 3), new sizef(iwith, this.preferredrowheight));
}
else