Control position of text in single line CEdit 
Author Message
 Control position of text in single line CEdit

Using VC1.52c under WfW3.11 :

In a Dialogbox I created some edit controls, derived from CEdit. The dwStyle
used to Create them has been copied from different edit controls on the same
dialog, created in AppStudio (Single Line, Read Only)

The text in the "normal" edit controls is vertically centered, but the text
in the dynamically created ones is shifted to the top left corner of the
edit box.
Is there a way to control the positioning of text in single line edit
controls ?

Thanks for suggestions,
Mike Hirsch



Tue, 06 Mar 2001 03:00:00 GMT  
 Control position of text in single line CEdit
I don't know about Wfw311, but when I tried this, both the
static and dynamic versions were both flush with the top of
the window. I guess I would recommend setting a font such
that if fills the window as much as possible without clipping,
so there won't be any dead space. If you are creating controls
dynamically, you may want to do SetFonts to force the control
to use a certain font anyway. You may not be too happy with
what it comes up with as a default, especially in older windows
versions. - Doug S.
Quote:

> Using VC1.52c under WfW3.11 :

> In a Dialogbox I created some edit controls, derived from CEdit. The dwStyle
> used to Create them has been copied from different edit controls on the same
> dialog, created in AppStudio (Single Line, Read Only)

> The text in the "normal" edit controls is vertically centered, but the text
> in the dynamically created ones is shifted to the top left corner of the
> edit box.
> Is there a way to control the positioning of text in single line edit
> controls ?

> Thanks for suggestions,
> Mike Hirsch



Tue, 06 Mar 2001 03:00:00 GMT  
 Control position of text in single line CEdit
Sorry -  I forgot to mention that I did SetFont after dynamic creation - It
did not make a change to the described text positioning.

Mike Hirsch

Douglas Sutherland schrieb in Nachricht

Quote:
>I don't know about Wfw311, but when I tried this, both the
>static and dynamic versions were both flush with the top of
>the window. I guess I would recommend setting a font such
>that if fills the window as much as possible without clipping,
>so there won't be any dead space. If you are creating controls
>dynamically, you may want to do SetFonts to force the control
>to use a certain font anyway. You may not be too happy with
>what it comes up with as a default, especially in older windows
>versions. - Doug S.



Tue, 06 Mar 2001 03:00:00 GMT  
 Control position of text in single line CEdit
I was saying set the font large enough so there are no
positioning issues. - Doug S.
Quote:

> Sorry -  I forgot to mention that I did SetFont after dynamic creation - It
> did not make a change to the described text positioning.

> Mike Hirsch

> Douglas Sutherland schrieb in Nachricht

> >I don't know about Wfw311, but when I tried this, both the
> >static and dynamic versions were both flush with the top of
> >the window. I guess I would recommend setting a font such
> >that if fills the window as much as possible without clipping,
> >so there won't be any dead space. If you are creating controls
> >dynamically, you may want to do SetFonts to force the control
> >to use a certain font anyway. You may not be too happy with
> >what it comes up with as a default, especially in older windows
> >versions. - Doug S.



Tue, 06 Mar 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Enter in single line CEdit control

2. Set text color for 1 line in a CEdit control (MultiLine)

3. multiple-line CEdit set multi-line text

4. CEdit toggle between left and center in single-line

5. Text Positioning in CEdit

6. Position of text in CEdit

7. Change text color of single line in CListBox?

8. Can't display single line text?

9. reading a single line from a text file?

10. Edit position in CEdit control

11. How can I get the text in CEdit(Multi-line)

12. CEdit control and placing the cursor position

 

 
Powered by phpBB® Forum Software