CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009
    Posts
    103

    Editbox, Read-Only, Display Screwing up when scrolling

    We have a multi-line editbox with scrollbars. Because it is used to only display a message, we have it set for READ-ONLY. Problem is, when you scroll it, the lines start overlapping. If you click&drag through the messed up text, it appears.

    I turned OFF the READ-ONLY, and it works just fine.

    Is there a problem with READ-ONLY and scrollbars?

    Attached is a picture of the READ-ONLY messed up display.
    Attached Images Attached Images

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Editbox, Read-Only, Display Screwing up when scrolling

    Is it the same problem as you began to ask here, but then cancelled to reply?

    Could you prepare very small and easy working project reproducing such a behaviour and post it in zip archive to the forum?

    PS please, don't include .ncb, .aps, .opt, .clw files nor DEBUG/RELEASE folders.
    Victor Nijegorodov

  3. #3
    Join Date
    May 2009
    Posts
    103

    Re: Editbox, Read-Only, Display Screwing up when scrolling

    Yes, you are correct, it is the same problem.... except now, I know what is causing it. Just not sure if it is a bug in VC++ or something else.

    Originally I thought it was some sort of memory overflow issue trashing the display memory. But with alot more testing... the code works as expected... ONLY if the Editbox is set NOT set for READ-ONLY. Just changing that one check mark, causes the display screw up when scrolled. If I leave it off, it scrolls perfectly.

    So, that is why I am posting again about this issue... it HAS something to do with the READ-ONLY option.


    I even took the liberty of finding "another" multi-line edit box, in another dialog, and flipped that one to READ-ONLY. Same thing happened.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Editbox, Read-Only, Display Screwing up when scrolling

    Perhaps you should just use a listbox instead.

  5. #5
    Join Date
    May 2009
    Posts
    103

    Re: Editbox, Read-Only, Display Screwing up when scrolling

    Hmmmm, dang, never thought about that.... that may be the RIGHT way to handle this. Originally needed to allow for editing in the box so it was originally designed with an editbox but when we decided to make it a READ-ONLY scrollable box, never thought about changing it.

    I will have to give that a try and see if It will work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured