Zoom bar use tip

Post your Gambas programming questions here.
Post Reply
User avatar
Posts: 144
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State

Zoom bar use tip

Post by Cedron »

Here is a statement that I put in a ScrollBbar to control the Zoom property of an ImageView:
TheImageView.Zoom = Exp((TheScrollBar.Value - 50) * 0.6)
The same distance on the scroll represents the same multiplication factor. You can vary the midpoint (50 on the default ScrollBar range of 0 to 100), which varies the end cases, and you can vary the extent by changing the multiplier (0.6).

This combination of controls is so helpful.

.... and carry a big stick!
Post Reply