2010-05-24 4 views

답변

1

완료.

불꽃 호출하여 자동 스크롤을 할 수 있습니다

Scintilla1.Scrolling.ScrollBy(0, Scintilla1.Lines.Count)

그래서 마지막 텍스트 행으로 스크롤합니다.

+0

또한 SCI_SCROLLCARET을 인수없이 사용하여 위와 동일하게 수행하고 캐럿 정책을 확인합니다. – RaptorX

+0

@RaptorX SCI_SCROLLCARET 옵션으로 어떤 기능을 호출합니까? –

0

Text 속성을 업데이트 한 후 ScintillaNET 편집기 컨트롤 스크롤을 맨 아래 줄로 만들려고 할 때 허용 된 솔루션이 작동하지 않았습니다. 아마도 그것은 WPF WindowsFormsHost에 포함시키기 때문입니다. 여하튼, 내 문맥에서 ScintillaNET 편집기가 자동 스크롤을 제어하는 ​​데 사용한 코드는 다음과 같습니다. (코드는 C#에 있습니다.)

// Declaration for the WinAPI SendMessage() method. 
[DllImport("user32.dll")] 
public static extern IntPtr SendMessage(IntPtr hWnd, uint wMsg, UIntPtr wParam, IntPtr lParam); 

/// WM_VSCROLL -> 0x0115 
public const int WM_VSCROLL = 277; 

/// SB_BOTTOM -> 7 
public const int SB_BOTTOM = 7; 

// scintillaCtl should be a reference to the Scintilla control you want to scroll vertically. 
SendMessage(scintillaCtl.Handle, WM_VSCROLL, new UIntPtr(SB_BOTTOM), IntPtr.Zero); 
관련 문제