Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Behaving like an iPhone
Message
From
24/11/2018 07:53:08
 
 
To
24/11/2018 07:11:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Application:
Desktop
Miscellaneous
Thread ID:
01663703
Message ID:
01663779
Views:
73
>>>>>Hello all!
>>>>>
>>>>>Would it be possible to make the content of a form slide upward on downward like we can slide contents appearing on an iPhone or iPad?
>>>>
>>>>I use this for quite some time already in my interfaces. See attached for the code.
>>>
>>>Christian,
>>>
>>>when I start your testform it results in a from with a yellow background empty grid, nothing else. What am I doing wrong here?
>>>
>>>Regards,
>>>
>>>Koen
>>
>>The yellow items are container objects that I put into the scrolling frame for test purposes. Those should be srollable and you can also use the MouseWheel and MouseMove events (similar as you would using touch screen). The scrolling with movement should result in the typical IPhone scrolling effect. I created this control when we had a POS touchscreen application and the sales person could scroll with the finger through the items.
>>
>>For implementation you need to check the init of the form, where the container objects are added into the frame. The container objects you need to adjust to your needs, so they can contain the data. By default they have a Recordkey property which must be unique, in this case just sys(2015) but in real life the guid of the data object.
>>
>>So it's not a grid, it is just a list of conainers in a scrolling frame that moves up or down inside a visible area. There is a seperate class for horizontal movement and another one that moves in all directions.
>>
>>To make mousewheel work, if you have lots of controls on the container, bind all mousewheel events of the objects inside the container to the mousewheel of the container, same as mousemove.
>>
>>All events inside the containers should actually be forwareded to a business object that handles the container events, like if you edit data or show information. For the testform I only implemented the click, which then changes the color of the container that has been clicked.
>
>Christian,
>
>All clear. Thanks for sharing.
>
>Koen

To show you what's possible, here an example of a more complex container object, which in itself contains again scrolling regions. The main frame scrolls horizontally, while the inside lists scroll vertically.

Each control is bound to event handlers, which in turn update the information if the related data is being edited.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform