Scrolling |
Post Reply |
Author | |
thodgson
Groupie Joined: 11 August 2003 Status: Offline Points: 78 |
Post Options
Thanks(0)
Posted: 19 January 2007 at 1:49pm |
I have a View which is derived from the SyntaxEditorView class. My class does not have a CDocument associated with it.
In the Syntax Editor control, I am loading a different file in the same control when the user changes what they are looking at.
To accomplish this, I have to do the following:
GetEditCtrl().Scroll(0,0);
GetEditCtrl().SetScrollRange(SB_VERT, 1, 1); GetEditCtrl().Scroll(0, pXTPSyntaxEditBufferManager->GetRowCount());
int nPos = GetEditCtrl().GetScrollPos(SB_VERT); GetEditCtrl().GoToRow(nPos); GetEditCtrl().Scroll(0, nPos); The problem is that if the previously loaded file is larger than the current file, the control is still retaining some old values that prevent the scrolling from working properly.
Perhaps this is a bug...or maybe my code will help someone else out.
|
|
Tim H(http://www.ExclamationSoft.com)
Product: Xtreme Toolkit v13.1 Platform: Vista(x64)-SP1 Language: Visual C++ 6.0 Currently: Satisfied w/ Toolkit |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
try adding:
-- WBR, Serge |
|
thodgson
Groupie Joined: 11 August 2003 Status: Offline Points: 78 |
Post Options
Thanks(0)
|
Adding that seems to have no affect.
Not sure how that would allow me to scroll the the last line (bottom) of the file/document.
|
|
Tim H(http://www.ExclamationSoft.com)
Product: Xtreme Toolkit v13.1 Platform: Vista(x64)-SP1 Language: Visual C++ 6.0 Currently: Satisfied w/ Toolkit |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |