C#V滚动条在运行时可见时不可见 [英] C# V Scrollbar when made visible at runtime is not visible

查看:60
本文介绍了C#V滚动条在运行时可见时不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我面临一个问题:

我有一个listview,其scrollable设置为false,并且添加了另一个VScrollbar来控制listview中的数据填充.

问题是我已经使vscrollbar最初可见= false,并且将listview调整为其宽度.

现在,当我必须打开可见控件时,我调整了列表视图的大小(缩小了),将vscrollbar设置为visible = true,但不显示vscrollbar ID.

我也尝试过broketofront,sendtoback函数,但没有帮助.

请给我一些有关这方面的见识!因此,当您调整大小时,它要么不在屏幕上,要么被列表视图覆盖.我希望这两种情况都不是您想要的.尝试将.Dock属性设置为Right,或将.Anchor属性设置为Top | Right | Bottom.


Hi,

I am facing an issue:

I have a listview whose scrollable is set to false and another VScrollbar is added to control the data population in the listview.

Issue is that I have made the vscrollbar initially visible = false and listview is resized to its width.

Now when I am the point where the visible has to be turned ON i resized (shrinked) the listview, set the vscrollbar visible = true, but the vscrollbar id not displayed.

I have tried the bringtofront, sendtoback functions as well but of no help.

Kindly give me some insight on this!!!

解决方案

From the code above it looks like you haven''t set the anchor or Dock properties of the scrollbar. So when you resize things it''s either off screen or covered by the listview. I expect neither situation is what you want. Try setting the .Dock property to Right, or the .Anchor property to Top | Right | Bottom.


这篇关于C#V滚动条在运行时可见时不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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