ali raza

C#, .Net ,Asp.net and my thoughts

Category Archives: TX Text Control

How to move on next page in document while using TX Text Control

Naviagation between pages is very  easy while using Tx Text control for documents like doc, txt,rtf and html in you dot net application. We have to use InputPosition of Tx Text Control its syntex is following

public InputPosition(int page, int line, int column);

here is sample code

Dim PageNo As IntegerPageNo = InputBox(“Page no.”, “Go to page”, “1”)If PageNo > 0 And PageNo <= TxtEditor.Pages Then

TxtEditor.ViewMode = TXTextControl.ViewMode.PageViewDim InputPosition As New TXTextControl.InputPosition(PageNo, 1, 0)TxtEditor.InputPosition = InputPosition //TxtEditor is name of txt textControlTxtEditor.ScrollLocation =

New System.Drawing.Point(0, TxtEditor.InputPosition.Location.Y)ElseMsgBox(“Page number outside valid range.”, MsgBoxStyle.Exclamation)End If

reference : http://www.textcontrol.com/downloads/library/menu/position/