[[Property:modification_date|Wed, 12 Sep 2018 00:07:36 GMT]]
[[Property:publication_date|Wed, 12 Sep 2018 00:07:36 GMT]]
[[Property:title|Viewport Sample]]
[[Property:weight|4]]
[[Property:uuid|e8722685-0343-c411-83b1-32f0c4e0175b]]
[[Image:viewport|viewport]]
==Compiling==
To compile the example:
* Launch EiffelStudio.
* Click '''Add project'''
* Browse to ''$ISE_EIFFEL\examples\vision2\viewport\''.
* Choose ''viewport.ecf''
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
* Click '''OK'''.
==Running==
After launching the application, you will see a window displayed with a similar appearance to the one above. Modifying the values of the spin buttons will alter the position of the pixmapped button, relative to the viewport in which it is contained.
==Under the Hood==
The features set_x_offset and set_y_offset are used to modify the position of the EV_VIEWPORT relative to the EV_BUTTON contained within.
This sample contains the following class:
* VIEWPORT
{{seealso|
[[ref:libraries/vision2/ev_viewport_chart.html|EV_VIEWPORT]]
[[ref:libraries/vision2/ev_spin_button_chart.html|EV_SPIN_BUTTON]]
[[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]]
}}