none
Is this a known issue of CEdit, or I miss something ? RRS feed

  • Question

  • I simply call pMyEditCtrl->SetMargins(20, 20).

    Input some characters to fill over the length of Edit Control (subtract the margins),

    See picture 1, when caret is at the end, it's ok.

    then picture 2, caret is at the begin, characters are draw over right margin, is this a problem? How to fix it?

    Condition: VSS2010, Win7


    • Edited by zhiyazw Thursday, June 14, 2012 8:33 AM
    Thursday, June 14, 2012 8:32 AM

Answers

  • Your data is longer than the space between the margins. So it scrolls left or right to let the user see the data at the caret. It is a user-friendlly feature, not an "known issue."

    The way to fix it is to make the control wider, or the margins narrower, so the available space is larger than the data.

    • Proposed as answer by Helen Zhao Friday, June 15, 2012 6:16 AM
    • Marked as answer by Helen Zhao Friday, June 22, 2012 6:06 AM
    Thursday, June 14, 2012 1:06 PM

All replies

  • Your data is longer than the space between the margins. So it scrolls left or right to let the user see the data at the caret. It is a user-friendlly feature, not an "known issue."

    The way to fix it is to make the control wider, or the margins narrower, so the available space is larger than the data.

    • Proposed as answer by Helen Zhao Friday, June 15, 2012 6:16 AM
    • Marked as answer by Helen Zhao Friday, June 22, 2012 6:06 AM
    Thursday, June 14, 2012 1:06 PM
  • But the characters will not draw over the left margin, in picture 1, when caret is at the end, there are also some characters at the left side which are invisible, but they are not drawn over the left margin.

    I was intending to draw a icon in the right margin, but the characters draws over the icon. I was think it's a margin so it should not be filled by text. How to put an icon at the right of an edit box, just like the bing search box ?

    Friday, June 15, 2012 10:23 AM
  • Bing is web page code. It is not using CEdit. CEdit is very difficult to customize and I recommend you simply put your icon outside of the control.

    Or you could use CHTMLDialog and design the UI with web page code.

    Saturday, June 16, 2012 12:25 AM