Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - multiple lines for CXTPControlEdit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

multiple lines for CXTPControlEdit

 Post Reply Post Reply
Author
Message
sehnkim View Drop Down
Newbie
Newbie


Joined: 07 October 2016
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote sehnkim Quote  Post ReplyReply Direct Link To This Post Topic: multiple lines for CXTPControlEdit
    Posted: 07 October 2016 at 11:17am
Hello experts,

I am working on adding a text area (Multiple lines of text), but not sure why it's not working.
What I want to is... 
While a user is entering some text, if the text is long, some words need to be moved to the next line. (That is, "word wrap")
Here is my code. 

m_slide_description = new CXTPControlEdit;
m_slide_description->SetTooltip(_T("Set description for slide."));
m_slide_description->SetFlags(m_slide_description->GetFlags() | xtpFlagControlStretched);
m_slide_description->SetEnabled(true);
m_slide_description->SetEditText(TO_WIDE(PresentationDesigner::get().getScene().getDescription()));
m_slide_description->SetEditStyle(ES_MULTILINE);
m_slide_description->SetWidth(200);
m_slide_description->SetHeight(500);
AddControl(_T("Slide Desc"), m_slide_description);

Any advice would be appreciated. 
Thanks
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: 11 October 2016 at 9:44am
m_slide_description->SetWrap(TRUE);

Also don't use ES_AUTOHSCROLL style. "If you specify the ES_AUTOHSCROLL style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control."
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.156 seconds.