StringEdit の縦幅を中の文字列によって変化させるには
改行コードの数を求めて、
その分、StringEdit の行数を増加させる

void updateStringEditDisplayHeight(FormStringControl _stringEdit)
{
    // テキストボックスの縦幅を調整する
    
    str strTmp;
    str strTmpReplaced;
    int lineNum;
    ;
    
    strTmp = _stringEdit.text();
    // 改行コードの数を取得する
    strTmpReplaced = strReplace(strTmp, num2char(10), "");
    // 縦の行数を算出
    lineNum = strlen(strTmp) - strlen(strTmpReplaced);
    _stringEdit.displayHeight(lineNum + 1);
}
最終更新:2012年06月25日 11:04