Print Page | Close Window

Multiline editing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4952
Printed Date: 16 May 2024 at 9:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiline editing
Posted By: znakeeye
Subject: Multiline editing
Date 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);
}




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net