C#通过面板上没有的滚动条移动面板 [英] C# moving a panel ith a scroll bar thats not in the panel

查看:73
本文介绍了C#通过面板上没有的滚动条移动面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我认为正确的代码,但无法正常工作


This is the code I think it is but doesn''t work it dose nothing


private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
    panel1.AutoScrollPosition = new Point(panel1.AutoScrollPosition.X + 1, 9);
}



发生什么情况,当我使用滚动条向左/向右滚动时,它会像面板的自动滚动条中的自动滚动条一样移动.

但是我想要的是使用滚动条而不是面板中的自动滚动条



Whats meant to happen, when i scroll left/right with the scroll bar, it will move like the autoscroll bars in the panel''s autoscroll.

but what I want is to use the scroll bar not the auto scroll bar in the panel

推荐答案

看看这个: ^ ]


这篇关于C#通过面板上没有的滚动条移动面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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