Do I want TPageScroller or is something else required?
Posted on 2003-12-10
The application is to use a touch screen display.
Several parts of the system require the user to type in things which are then used to match entries in a list.
The display shows 0-9 and A-Z in a QWERTY style layout.
There is also SPACE and DELETE.
This works fine for any list entry which only has these characters. The display also disables unrequired buttons.
Say the list contains (this is an example list I am using and not the real data which comes from a DB) ...
The code realises that from this short list, the first letter ('a') is the only choice, so it will "accept" that automatically.
Then, the letters 'b', 'c', 'd' and 'g' are next. These are enabled and the rest disabled.
As the user chooses a letter, by pressing the appropriate button, the list is reworked from the master list to provide a speed search mechanism. It deals with entries like "acos" and "acosh" properly. And the delete works too.
As the letters are chosen they are shown in an edit box. If there is only 1 choice then this is taken automatically.
But, some entries include other symbols, not all of which are known at design time (and they can add more).
What I want to do is have an scrollable area between the ZXCVBNM line and the SPACE button which contains the available symbols as they appear (the letters are enabled/disabled to avoid mistyping).
I thought that the TPageScroller with a series of buttons in it would work, but I cannot work out how to get it to function.
The buttons are all the same width.
Does anyone have any example code (dfm and pas please) that demonstrates the usage of this control?
Is there an better/easier way of getting an unknown number of buttons into a left-right scrolling area that can be operated in a touch screen environment. Ideally, buttons to scroll left and right would be the thing.
I know I could physically build this by having a TScrollBox, but this ends up a LOT more work when I think all I need is a working example of the TPageScroller.
I know with the TPageScroller I am going to be creating the buttons are runtime,