GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

Paste operation is not proper when the SetLineLimit property set to 'n'.

Last post 08-03-2009, 2:35 PM by scotts. 9 replies.
Sort Posts: Previous Next
  •  05-06-2009, 5:46 AM 77592

    Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    I am working in TMemo control in my application. We are using MEM32D30.dll and the version is 3.0.0.38. We have MemClass class. Our application has been developed by using Borland C++ 5.02.

    Memo control has the following settings as initMemo function. (BaseMemo is derived from TMemo from MemClass file).

    -------------------------------------------------------------------------------------------------------------
    void BaseMemo::initMemo(TFont* fixedWidthFont)
    {
        SendMessage(WM_SETFONT, (WPARAM)(HFONT)*fixedWidthFont,(LPARAM)MAKELONG((WORD)TRUE, 0));
        SetTextMode(FPMEMO_TEXTMODE_NORMAL);
     
        // Set the text limit by setting the pixel for number characters allowed.
        SetWordWrap(true);
        SetPageWidth((fixedWidthFont->GetTextMetrics().tmAveCharWidth * m_textLimit) + 1);
     
        // Set the number of lines allowed.
        if (m_lineLimit != 0)
            SetLineLimit(m_lineLimit);
     
        if (m_bVerScrollbar)
            SetScrollBars(FPMEMO_SCROLLBARS_VERTICAL_FIXED);
    }
    -------------------------------------------------------------------------------------------------------------

    The BaseMemo should accept only 5 lines. It has been attained by calling SetLineLimit(m_lineLimit). This BaseMemo also have a settings for pagewidth. That is SetPageWidth((fixedWidthFont->GetTextMetrics().tmAveCharWidth * m_textLimit) + 1). Let m_textLimit is 18. It is working fine while typing directly to the Memo control. But it is not working fine while paste the text to the Memo control.

    Here, I found two issues.
    1. It is accepting more than 5 line while paste the bunch of text.
    2. At the same time pasting also not proper. There is a blank line as a second line when I copy more than n lines when the m_linelimit is n. For example, in the above code snippet I set the line limit as SetLineLimit(m_lineLimit). Let m_linelimit is 5. If I paste six lines as below.
    ------------------------------------
    NEVER DO TODAY
    WHAT YOU CAN PUT
    OFF TILL TOMORROW.
    DELAY MAY GIVE
    CLEARER LIGHT AS
    TO WHAT IS BEST TO
    ------------------------------------

    Then, The BaseMemo looks like as below.
    ------------------------------------
    NEVER DO TODAY
     
    WHAT YOU CAN PUT
    OFF TILL TOMORROW.
    DELAY MAY GIVE
    CLEARER LIGHT AS
    TO WHAT IS BEST TO
    ------------------------------------

    But the expected behavior is  as follows
    ------------------------------------
    NEVER DO TODAY
    WHAT YOU CAN PUT
    OFF TILL TOMORROW.
    DELAY MAY GIVE
    CLEARER LIGHT AS
    ------------------------------------

    Note: It accepts more than 5 lines while paste the bunch of text even though there was a settings like SetLineLimit(m_lineLimit). Consider the text which is inside the lines in the above example. This lines is to help the border of the memo control.

    So, Please let me know how to solve this issue. The text should truncate automatically based on the line limitation and there should not be any blank lines unnecessarily.

    Regards
    Mohan.


    Filed under:
  •  05-06-2009, 4:39 PM 77631 in reply to 77592

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    This is a known bug (#10264) for the developers to research for the next maintenance release.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  05-08-2009, 1:41 AM 77690 in reply to 77631

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    Please let me know when will you have the next maintenance release approximately.

    Regards
    Mohan.

     

  •  05-08-2009, 12:42 PM 77728 in reply to 77690

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Mohan,

    There is not a scheduled date for a maintenance release at this time. However we do have an issue with using the product in VS2008 that is causing us to start planning a maintenance to fix this issue. We should know more about a maintenance release within the next couple of weeks.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  06-08-2009, 11:14 AM 78843 in reply to 77728

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    Please let me know about maintenance release which is discussed in the previous post.

    Regards
    Mohan.

     

  •  06-08-2009, 2:14 PM 78859 in reply to 78843

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Mohan,

    We are putting the finishing touches to the having this available for release. This particular bug has not been fixed yet. If it is not going to be fixed, I will let you know what the development team says.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  06-25-2009, 1:37 AM 79472 in reply to 78859

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    Please update me as you mentioned in your previous mail.

    Regards,
    Mohan.

     

  •  06-25-2009, 2:46 PM 79506 in reply to 79472

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Mohan,

    This should have been fixed in the latest mainetnance release. Have you tried the lates release we posted?


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  08-03-2009, 1:00 PM 81096 in reply to 79506

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Hello,

    It is related with the post 77592.

    I tested the updated version. Now it does not allow the text through paste operation when the text has more than 5 lines (The control is set as the line limitation is 5, the page limitation is 18). Its works better. But I need one more solution. When I try to copy the big sentence like below.

    "NEVER DO TODAY WHAT YOU CAN PUT OFF TILL TOMORROW. DELAY MAY GIVE CLEARER LIGHT AS TO WHAT IS BEST TO BE DONE."

    The Memo control allows this text to paste. But it will be more than 5 lines. i.e., it will look like below.

    -----------------------
    NEVER DO TODAY
    WHAT YOU CAN PUT
    OFF TILL TOMORROW.
    DELAY MAY GIVE
    CLEARER LIGHT AS
    TO WHAT IS BEST TO
    BE DONE.
    -----------------------

    But, My expectation is only five lines like below.
    -----------------------
    NEVER DO TODAY
    WHAT YOU CAN PUT
    OFF TILL TOMORROW.
    DELAY MAY GIVE
    CLEARER LIGHT AS
    -----------------------

    The text in 6th and 7th line to be truncated automatically. Please let me  know the way how to attain this.

    Regards
    Mohan.

     

  •  08-03-2009, 2:35 PM 81098 in reply to 81096

    Re: Paste operation is not proper when the SetLineLimit property set to 'n'.

    Mohan,

    This is expected behavior. Since the text has no CRLF characters in it, then the Memo control does not know the number of lines that will be pasted.There is not a way to have the behavior you are looking for since the paste will clip the entire text from the clipboard and not just part of it.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
View as RSS news feed in XML
     FarPoint Forums Home