[MFC] -- Autoscrolling vertical d' un EditControl multiligne

[MFC] -- Autoscrolling vertical d' un EditControl multiligne - C++ - Programmation

Marsh Posté le 26-07-2002 à 23:09:51    

Comment faire pour que la scrollbar vertical de mon EditControl multiligne descende toute seule lorsque que j'ecris une nouvelle ligne ?
Je m'explique, j'ai besoin de faire une console afin d'afficher à l'utilisateur certaines des opérations effectuées durant l'execution (les afficher a la volée).
Le probleme est lorsque que j'ecris une nouvelle ligne par l'intermediaire d'une fonction (et que le texte generé ligne par ligne devient plus grand que mon editcontrol) la barre de scrolling vertical a gauche s'active normalement mais je voudrais la faire descendre automatiquement afin que la derniere ligne ecrite soit juste au dessus du bord inferieur de mon edit box.
Merci :)
 
(sorry pour les fautes d'ortho :P)


Message édité par DonPichol le 26-07-2002 à 23:11:01
Reply

Marsh Posté le 26-07-2002 à 23:09:51   

Reply

Marsh Posté le 27-07-2002 à 03:07:48    

CEdit::LineScroll  
void LineScroll( int nLines, int nChars = 0 );
 
Parameters
 
nLines
 
Specifies the number of lines to scroll vertically.
 
nChars
 
Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.
 
Remarks
 
Call this function to scroll the text of a multiple-line edit control.  
 
This member function is processed only by multiple-line edit controls.  
 
The edit control does not scroll vertically past the last line of text in the edit control. If the current line plus the number of lines specified by nLines exceeds the total number of lines in the edit control, the value is adjusted so that the last line of the edit control is scrolled to the top of the edit-control window.  
 
LineScroll can be used to scroll horizontally past the last character of any line.
 
For more information, seeEM_LINESCROLL in the Win32 documentation.
 
CEdit Overview |  Class Members |  Hierarchy Chart
 
See Also   CEdit::LineIndex

Reply

Marsh Posté le 27-07-2002 à 04:44:38    

Merci bien :)
G u du mal a le faire marcher mais c bon mnt !! :)

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed