Print Page | Close Window

multiple lines for CXTPControlEdit

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=23157
Printed Date: 24 April 2024 at 4:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: multiple lines for CXTPControlEdit
Posted By: sehnkim
Subject: multiple lines for CXTPControlEdit
Date 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



Replies:
Posted By: olebed
Date Posted: 11 October 2016 at 9:44am
m_slide_description->SetWrap(TRUE);

Also don't use ES_AUTOHSCROLL style. "If you specify the  https://msdn.microsoft.com/ru-ru/library/windows/desktop/bb774367%28v=vs.85%29.aspx#ES_AUTOHSCROLL" rel="nofollow -  style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control."



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