通过将图像加载为背景来设置面板滚动 [英] set the panel scrolled by loading an image as background

查看:80
本文介绍了通过将图像加载为背景来设置面板滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张很大的图片.我希望用户将其作为背景加载到面板中,并且希望用户加载图片时面板的滚动条出现.
换句话说,我希望有一个可滚动的面板,以便当用户将大于面板尺寸的picture_加载为背景时,滚动条会消失.
解决方案是什么?
在此先感谢
已更新:
我应该补充一点,我想允许用户在该面板上绘制,因此必须多次调用 myPanel.invalidate .我认为当我调用 invalidate 时,该面板是从顶部再次淹死.

Hi,I have a picture which is so big.I want the user to load it in a panel as background and I want the scollbars of the panel apear when the user loads the picture.
In other words, I want to have a scrollable panel so that when the user loades a picture_which is bigger than the panel size_ as background, the scrollbar apears.
what''s the solution?
Thanks in advance
Updated:
I should add that I want to allow the user to draw on that panel so I have to call myPanel.invalidate many times .I think when I call invalidate, The panel is drown again from the top of it.

推荐答案

尝试此
http://stackoverflow.com/questions/4305011/c-sharp- panel-for-drawing-graphics-and-scrolling [ ^ ]

http://www.dreamincode.net/forums/topic/149251 -create-image-scroller-for-windows-application/ [
try this
http://stackoverflow.com/questions/4305011/c-sharp-panel-for-drawing-graphics-and-scrolling[^]

http://www.dreamincode.net/forums/topic/149251-create-image-scroller-for-windows-application/[^]


这篇关于通过将图像加载为背景来设置面板滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆