Hello
I have a status bar and when I open my table and the text is displayed in my DBSRichViewEdit1, I want to inform in the statusbar the current page and total pages of my doc.
I tried to put this code in several places:
afterscroll of my table
OnLoadDocument
OnEnter
But it didn't work and only work when I click on the DBSRichViewEdit1.
StatusBar1.Panels[1].Text := 'Pág: ' + IntToStr(DBSRichViewEdit1.CurrentPage) + '/' + IntToStr(DBSRichViewEdit1.PageCount)
It only display correct when I click on the DBSRICh because it is trigger the event Onenter.
But if I scroll my records, I want to inform the page total of each doc.
Where is it the better place?
Thanks
What event is better to get the total of page of my doc?
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
Sergey
I inserted the code on the event and it didn't work as it should work.
I prepared an simple example with dabatase in access and some rows.
Please, take a look at it and tell me how to do this:
http://www.infosoftlanguages.com/arquivos/editorg.zip
How to do:
1) When I open my table and the doc is displayed, I want to show the total of pages that the doc has.
2) When I scroll my table with dbnavigator, when the text is displayed, it must inform the total of pages.
Another thing that I notice and I don't know how to do.
When I scroll my doc with mouse wheel, and the pages are changed, I need to inform what page of the doc I am. like this:
pag 2/4 or pag: 3/5 etc
Please, return my example changed so that I can see what were changed.
thanks my friend
Alex
I inserted the code on the event and it didn't work as it should work.
I prepared an simple example with dabatase in access and some rows.
Please, take a look at it and tell me how to do this:
http://www.infosoftlanguages.com/arquivos/editorg.zip
How to do:
1) When I open my table and the doc is displayed, I want to show the total of pages that the doc has.
2) When I scroll my table with dbnavigator, when the text is displayed, it must inform the total of pages.
Another thing that I notice and I don't know how to do.
When I scroll my doc with mouse wheel, and the pages are changed, I need to inform what page of the doc I am. like this:
pag 2/4 or pag: 3/5 etc
Please, return my example changed so that I can see what were changed.
thanks my friend
Alex