画布总宽度(可视宽度+隐藏滚动部分) [英] Canvas total width (visible width + hidden scrollable part)

查看:138
本文介绍了画布总宽度(可视宽度+隐藏滚动部分)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这也许是没有道理的,但我已经花了近40分钟,以便寻找它没有avial。

It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial.

我有一个Canvas控件具有固定宽度和水平滚动条。 我试图找到控制的实际宽度。 该.WIDTH(固定宽度)+部分所揭示的滚动条。 我试过的explicitWidth,宽+的maxHorizo​​ntalScrollPosition,和其他一些组合,但非他们打的地方。

I have a Canvas control with a fixed width and a horizontal scrollbar. I'm trying to find the actual width of the control. The .width (fixed width) + the part being revealed by the scrollbar. I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot.

推荐答案

嗯,因为它似乎宽度+的maxHorizo​​ntalScrollPosition 确实是足够了。 问题是,在我的应用程序事件的顺序(滚动条没有足够的时间来更新它的显示)。我结束了添加自定义事件类重presenting画布的内容。

Well as it seem width + maxHorizontalScrollPosition is indeed enough. The problem was with the order of events in my application (the scrollbar didn't have enough time to update it's display). I ended up adding a custom event to the class representing the content of the Canvas.

这篇关于画布总宽度(可视宽度+隐藏滚动部分)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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