trichview.support
Re: Scrollbar.pagesize |
Author |
Message |
Sergey Tkachenko |
Posted: 09/08/2004 22:02:57 procedure TScrollForm.ScrollAdjust; var PageSize: Integer; begin VertScrollBar.PageSize := 0; if ScrollRichView.VScrollMax>0 then begin PageSize := ScrollRichView.ClientHeight div ScrollRichView.VSmallStep; VertScrollBar.Max := ScrollRichView.VScrollMax+PageSize-1; VertScrollBar.PageSize := PageSize; end else begin VertScrollBar.Max := 0; end; VertScrollBar.Position := ScrollRichView.VScrollPos; VertScrollBar.Visible := VertScrollBar.Max>0; HorizScrollBar.PageSize := 0; if ScrollRichView.HScrollMax>0 then begin PageSize := ScrollRichView.ClientWidth; HorizScrollBar.Max := ScrollRichView.HScrollMax+PageSize-1; HorizScrollBar.PageSize := PageSize; end else begin HorizScrollBar.Max := 0; end; HorizScrollBar.Position := ScrollRichView.HScrollPos; HorizScrollBar.Visible := HorizScrollBar.Max>0; end; > Hi, > > I have my personal Scrollbar and how can i do to synchronize my > scrollbar.pagesize and RichView.pagesize ? > > Actually, i use this code to control my scrollbar > > VertScrollBar.Visible:= RichEdit.DocumentHeight>RichEdit.Height; > VertScrollBar.SetRange(0,RichEdit.VScrollMax,RichEdit.VScrollPos,2); > > > Thx et sorry for my bad english. > > |
Powered by ABC Amber Outlook Express Converter