01-06-2009 05:26 PM
Hi!
A have a lot of problems, because I can't set maximum pane size? Here is an example of it. I have image control that is bigger than screen resolution, so I have to enable vertical and horizontal scrollbars, but then user can scroll into "infinity"and I don't want that, because I have other controls that user must not see. I know that I can achive that with Scrollbar control, but it will be much easier if you could set maximum pane size and place other controls out of this area, so that user can not see them. It is also anoing if you scroll into blank area of the pane, so it will be great if I can limit this scrolling area. If I use Scrollbar control then I have to resize them too when window size is changed. Does anybody know better way to achive that?
Thanks,
andrej
01-06-2009 09:09 PM
01-06-2009 09:09 PM
01-07-2009 08:18 AM
Hi Adnan,
I'm believe that guys are right when they say that there is no way to just set the limits you will be able to scroll in. Maybe if you didn't use upper recommendation, you can keep reading rectangle displayed by your front panel pane (Content Area Rect or Origin property), and you can compare actual values with maximum values. This solution is far not so elegant as it is the one with Image Control Scrolbars, however it offers you some flexibility more since it is not related just to Image Control.
Regards,
Martin
01-07-2009 08:33 AM
Just an idea I have not thought out completely....
How about dropping your own sliders customized to look like the window scroll bars? When the change value, adjust window view, move scroll bars to new location ....
Ben
01-07-2009 08:48 AM
Hi Ben,
I wanted to use them first, but oun sliders would cause more difficulties if you wanted to use scroll button.
On other hand, you would be able to control the possition nicer by event structure. For example on Lava in "Mouse Wheel Scroll Event, Find way to capture scroll event" article you can find simple example how to generate events on mouse scroll. This event could be greatly use to check current possition, check limits and calculate new possition. I believe this approach could work with little of programming
Regards,
Martin