Flex滚动条样式问题

发布于 2024-08-12 06:42:18 字数 1012 浏览 8 评论 0原文

我正在尝试在 Vbox 内设置 vscrollbar 和 hscrollbar 的样式。但是右下角总是有一个白色方形的东西,无法设置样式。

出了什么问题与右下角?

我的 CSS 是:

ScrollBar{
downArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
upArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
thumbDownSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbUpSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbOverSkin: Embed(source="assets/images/scrollbar/thumb.png");
trackSkin:Embed(source="assets/images/scrollbar/track.png");    
fillAlphas:0,0,0,0;}

有人能帮我吗?非常感谢!

I'm trying to style vscrollbar and hscrollbar inside a Vbox.But there's always a white square thing at the right bottom cornor which can not be styled.

what's wrong with the right bottom cornor?

My CSS is:

ScrollBar{
downArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
upArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
thumbDownSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbUpSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbOverSkin: Embed(source="assets/images/scrollbar/thumb.png");
trackSkin:Embed(source="assets/images/scrollbar/track.png");    
fillAlphas:0,0,0,0;}

Could anyone help me out?Much Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

度的依靠╰つ 2024-08-19 06:42:18

这是一个奇怪的现象。右下角的白色框实际上是容器的(原始)子代。

为了解决这个问题,您需要对要添加样式滚动条的任何容器进行子类化,并删除名为“whitebox”的子容器:

var whitebox:DisplayObject = rawChildren.getChildByName('whiteBox');
if (whitebox)
   rawChildren.removeChild(whitebox);

IIRC,您需要在两个地方执行上述操作:覆盖 createChildren 和覆盖 validateDisplayList。在这两种情况下,请记住首先调用超类方法!

This is a weird one. The white box at the bottom right is actually a (raw) child of the container.

To get around this you need to subclass whatever container you want to add your styled scrollbars to and remove the child called "whitebox":

var whitebox:DisplayObject = rawChildren.getChildByName('whiteBox');
if (whitebox)
   rawChildren.removeChild(whitebox);

IIRC you need to do the above in two places: an override of createChildren and an override of validateDisplayList. In both cases remember to call the super class method first!

離殇 2024-08-19 06:42:18

该区域不受滚动条控制,它是原始容器的一部分。 VBox 的背景色是否设置为黑色?

That area isn't controlled by the scroll bar(s), it's part of the original container. Does the VBox have it's background colour set to black?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文