![]() |
|
|||||||
| Beta Driver Development Discussion of new drivers, finding someone to write a new driver, etc... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
I mentioned in an earlier thread that I had an idea for a partial solution to the need for scrolling text boxes. I've built a driver that will break a text string into pages based on a given number of characters per page and let you page through them.
The driver has just a few fields: Text: String RW - This is the whole string that you wish to break into pages Page: String R - This is the contents of the current page CurrentPageNumber: Card R/W - The current page number PageCount: Card R - Total Number of pages CharactersPerPage: Card R/W - Number of characters per page Scroll: (Next, Prev, Beginning, End) - Action command to move through the pages The driver attempts to break pages at white space when it can. To use this, set the CharactersPerPage to the amount that will fit in your TextField Widget given its width, height, and font settings. This probably requires some experimentation. Then, set the Text field with the text contents that you want to break into pages. This should then result in PageCount reflecting the total number of pages and Page containing the first page. If your TextField widget is then associated with the Page field of the TextPager, the Scroll command will move you through the pages of the text. You can also set the value of CurrentPageNumber to move to a given page. I've done some limited testing and all seems well, but let me know if you find any problems. |
|
#2
|
|||
|
|||
|
Perfect! I will give it a good test and let you know.
__________________
Thanks, Dave
|
|
#3
|
|||
|
|||
|
This seems perfect for the smaller screens I've been working with. Will test and comment.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|