Edit box scroll

This is a discussion on Edit box scroll within the Windows Programming forums, part of the Platform Specific Boards category; How would one go about scrolling to the end of a multiline edit box? e.g. when i fill an edit ...

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    34

    Edit box scroll

    How would one go about scrolling to the end of a multiline edit box?

    e.g. when i fill an edit box with 1000 chars, the control shows a scroll bar, but i cant make that scroll-bar scroll down automaticly!

    ive tried setscroll(x,y) but it has no effect!

    help!

    joe
    #

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Try EM_SETSEL to place the cursor at the end of the contents of the edit control, followed by a EM_SCROLLCARET to bring the cursor into view. You might only need the first message, however.

    Hope that is of some use to you.

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    34
    Sorry, im new to this!

    How would i do that using MFC?

    m_MyEdit.SetPropery(EM_SCROLLCARRET);

    ?

    joe
    #

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,648
    I don't know MFC, but it's probably:

    m_MyEdit.SendMessage(EM_SCROLLCARET);

    You may even have to call it whenever you get a key message from the edit.
    Very basic "thin" socket API:
    ip.hpp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. edit box
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 11-11-2006, 03:40 AM
  2. WS_HSCROLL in ES_READONLY edit box error
    By Homunculus in forum Windows Programming
    Replies: 4
    Last Post: 02-13-2006, 07:46 AM
  3. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  4. display a file in dropdown edit box
    By sunburnbyRA in forum Windows Programming
    Replies: 2
    Last Post: 03-10-2004, 12:58 PM
  5. Edit box question
    By learning110 in forum Windows Programming
    Replies: 6
    Last Post: 03-28-2003, 07:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21