Edit box
-
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
-
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
-
EditBox (CEdit in MFC), created with the multiline flag... see the properties box in design mode into Visual Studio
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
This sounds like an owner drawn control to me, unless the richedit box has a property to centre the text. Christian Graus - Microsoft MVP - C++
-
line height ?:confused: you want to count 3 lines or what ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
-
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
You can use MFC CEdit::GetLineCount() or the Win32 Message EM_GETLINECOUNT to get the number of lines. --> . If the number of lines is three or less it should come the center of the dialog vertically. I can't understand your question properly. do you meant to say if the number of lines are 3 or less, you don't want any scrollbar? " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan
-
I want to show multiline text in my dialog. I have some conditions. . If the number of lines is three or less it should come the center of the dialog vertically. . If it exceeds 3 lines, 3 lines should appear to the user and a vertical scrollbar should come to view the remaining lines by scrolling down. Which control should I use for the best result? The text will be unicode format. Thanks for suggestions. - NS -
It sounds like you need to use the
ES_CENTER
andES_MULTILINE
styles.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
-
I have an idea to dynamically set the window pos to center. If I have the line height then can calculate the window pos. And also set the visible line count to 3.
Nishad S wrote: I have an idea to dynamically set the window pos to center. If you are wanting to center the actual edit control within its parent, you'll need to use
MoveWindow()
orSetWindowPos()
. If you are using MFC, check out theCWnd::CenterWindow()
method.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb