vb6如何知道msflexgrid_scroll向上向下单击
当单击向下箭头上的 msflexgrid 滚动条时,我如何知道我已单击向下箭头。如果可能的话给我示例代码。
谢谢
when clicking on the msflexgrid scroll bar on the down arrow, how can i know that i have clicked on the down arrow. give me sample code if possible.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
取决于您想要它的用途(这定义了您需要它的具体程度)。您可以使用 Scroll 事件判断网格何时成功滚动:
如果您需要区分向下和向上(以及单个移动和较大的条形单击移动),则必须跟踪顶行:
如果您实际上需要知道何时具体单击了向下箭头,无论它是否实际滚动网格,现在您都进入了子类化。试试这个:
http://www.planetsourcecode.com/ vb/scripts/ShowCode.asp?txtCodeId=59656&lngWId=1
只需在示例项目中将 flexgrid 替换为 rtfExample -我尝试了一下,似乎效果很好。
Depends on what you want it for (which defines how specific you need it to be). You can tell when the grid has been scrolled successfully with the Scroll event:
If you need to distinguish down from up (and a single move from a larger bar-click move), you'll have to keep track of the top row:
If you actually need to know when you've clicked the down-arrow specifically, whether or not it actually scrolls the grid, now you're into subclassing. Try this:
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=59656&lngWId=1
Just swap out a flexgrid for rtfExample in the sample project - I tried it, seems to work fine.