Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Report Control Footer Text Multiline
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control Footer Text Multiline

 Post Reply Post Reply
Author
Message
carlitm View Drop Down
Newbie
Newbie
Avatar

Joined: 17 March 2016
Location: South Africa
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote carlitm Quote  Post ReplyReply Direct Link To This Post Topic: Report Control Footer Text Multiline
    Posted: 17 March 2016 at 9:59am
Hi
Please enlighten me as to how I can specify LFCR in the footer text to make it multiline.

TIA

Carl
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2016 at 3:52am
Hello,

Firstly you should turn on multiline
void CReportSampleView::OnReportcontrolMultilinesample()
{
     m_bMultilineSample = !m_bMultilineSample;

     int nCount = GetReportCtrl().GetColumns()->GetCount();
     for( int i = 0; i < nCount; i++) 
     {
          CXTPReportColumn* pColumn = GetReportCtrl().GetColumns()->GetAt(i);
          if (pColumn) 
          {
              int nAlign = pColumn->GetAlignment();
              nAlign = m_bMultilineSample ? (nAlign | DT_WORDBREAK) : (nAlign & (~DT_WORDBREAK));
              pColumn->SetAlignment(nAlign);
          }
     }
     GetReportCtrl().GetPaintManager()->SetFixedRowHeight(!m_bMultilineSample);
     GetReportCtrl().GetPaintManager()->m_bUseColumnTextAlignment = TRUE;

     GetReportCtrl().AdjustScrollBars();
}


then add  ES_WANTRETURN  to editOptions
   for (nColumn = 0; nColumn < nFreezeCount+nColumnCount; nColumn++)
     {
        CXTPReportColumn *pColumn = wndReport.GetColumns()->GetAt(nColumn);

        pColumn->SetAlignment(xtpColumnTextWordBreak | xtpColumnTextVCenter);
        pColumn->GetEditOptions()->m_dwEditStyle |= ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN;
     }

[Enter] and [Shift]+[Enter] now gives only carriage return. For saving changes in cell and exit from edit mode - use [Tab] key or [Ctrl]+[Enter]. [Esc] key cancels all changes. 

Regards,
 Oleksandr Lebed
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.