Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Multiline editing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiline editing

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Multiline editing
    Posted: 02 September 2006 at 8:22am
I have a report control with multiple entries. Each entry contains text with an arbitrary number of lines. When editing these items, I want the edit box (and consequently the whole row) to be resized. If I enter a new line I want it to grow, and if I remove it, I want it to shrink again. How do I accomplish this behavior?
 
I did start to experiment a bit. I tried adding two new lines whenever editing is about to take place. This is a step in the right direction, but it does not solve my problem. Any ideas?
 
ON_NOTIFY(XTP_NM_REPORT_REQUESTEDIT, IDC_JOURNALVIEW_REPORT_JOURNAL, OnJournalTextEdit)

void CJournalView::OnJournalTextEdit(NMHDR *pNotifyStruct, LRESULT * /*result*/)
{
    XTP_NM_REPORTREQUESTEDIT *pnmRequestEdit = (XTP_NM_REPORTREQUESTEDIT*)pNotifyStruct;
    CXTPReportRecordItemText *pItem = (CXTPReportRecordItemText*)pnmRequestEdit->pItem->GetRecord()->GetItem(1);
    CString str = pItem->GetValue();
    str.Append(_T("\r\n\r\n"));
    pItem->SetValue(str);
}

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.