Multiline header editing. Visual goof fix. |
Post Reply |
Author | |
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(1)
Posted: 13 March 2016 at 4:35pm |
This issue has been around for a long, long time but I ran into a situation where I required a fix.
A body section row edits and sizes without trouble. A header section row does not! The problem is that when you edit a multiline Header row the edited cell does not update visually. The cell will not accommodate your entry properly because the layout does not change automatically. First, the non-obvious steps to make a multiline Header row. Set up the column options: (m_align will be whatever you want.. center, left, right)
*Please note that header/footer sections do not have their own column structures, edit controls and so forth. Everything under every column in every section behaves the same way. Then fix the header cell size after edit: 1. Set up a notify message: ON_NOTIFY(XTP_NM_REPORT_VALUECHANGED, XTP_ID_REPORT_CONTROL, OnReportValueChanged) void CMyReportView::OnReportValueChanged(NMHDR * pNotifyStruct, LRESULT*) { XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct; if(!pItemNotify) return; if(pItemNotify->pRow->GetType() == xtpRowTypeHeader) { if(pItemNotify->pItem) { GetReportCtrl().AdjustLayout(); } } } The call to AdjustLayout fixes the new cell size properly. Hopefully this will help simplify the process. V. 16.26. I believe V. 17.1 has same problem. |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hello Algae,
I think we fixed this issue in version 17.0. I have check this behavior in last version (17.1) with ReportSample -> MergeTest. And I didn't notice any troubles. Except I could not get multiline InplaceEdit. After using your settings I could edit cells (long text was added) in footer section and row's high are changed after finish editing with [Enter]. Setting text with code after creation and population gives the same good result.
Regards, Oleksandr Lebed |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |