how to make my rich edit ctrl scroll automatically when insert new text?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to make my rich edit ctrl scroll automatically when insert new text?

  1. #1
    Join Date
    May 2004
    Posts
    70

    how to make my rich edit ctrl scroll automatically when insert new text?

    how to make my rich edit ctrl scroll automatically when insert new text?

    here's how i insert text
    Code:
    	msg.Insert( msg.GetLength() , "\n");
    	m_system_message.SetSel(-1,-1);
    	m_system_message.ReplaceSel(msg);

    here's how the richedit is defined in the resource file

    Code:
        CONTROL         "",IDC_SYSTEM_MESSAGE,"RICHEDIT",ES_MULTILINE | 
                        ES_AUTOVSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP,11,
                        257,241,52
    as you guys can see, ES_AUTOVSCROLL is definately there
    but whenever i insert new text using ReplaceSel, the text focus is always at the top. how do i make it such that it automatically scrolls down to read the latest text inserted?

    using
    - mfc
    - vc6.0
    - winxp

    thanks in advance!

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    there was a bug in one version of visual of this where the scroll variable reversed meaning when the window was maximized or some such along with some other problems. But I thought that was version 5, not 6. Try making it false instead ?

Similar Threads

  1. Building a Rich Text Box Component using ASP.NET
    By Nitin Mistry in forum ASP.NET
    Replies: 3
    Last Post: 07-04-2003, 02:56 PM
  2. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 12:45 PM
  3. scroll bar dosent move automatically
    By mbd7031 in forum Java
    Replies: 2
    Last Post: 08-01-2000, 04:53 PM
  4. Multi-row calculations
    By Bob Hines in forum Database
    Replies: 7
    Last Post: 04-27-2000, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center