麻球开发者平台,麻球开发者大赛

只看楼主 楼主

本主题由 Junidea 于2009-6-29 13:43:00 执行移动主题 (查看更多)
艾睿会员有特权,登陆后广告自动屏障。
现在就花5秒钟免费注册!更有好礼相送!

新手请教两个Flex界面设计问题

1.我的横竖滚动条都自己设计了样式,但是在横竖滚动条同时出现的情况下,右下角会有一个白色的方框,试了多种方法都没能改变它的颜色,请老鸟指点!见下图:



2.ComboBox下拉菜单里出滚动条时,滚动条背景有一片白色,试过多次无法改变!见下图:

(您是游客)您没有权限查看附件

评分

举报 使用道具 TOP

只看该用户 沙发!

你这样式能共享么?

评分

举报 使用道具 TOP

只看该用户 板凳

纯黑的看起来不错。
autumndawn的签名

评分

举报 使用道具 TOP

只看该用户 地板

1.http://www.tommyb.com/2006/11/30/flex-using-custom-scrollbar-skins-youll-run-into-this-problem/
2.http://www.pixelbox.net/demos/flex_custom_scroll_bar_example/srcview/index.html
[本帖最后由 Edison.sl 于 2009-01-13 21:29:16 编辑]
Edison.sl的签名
在命运降临的伟大瞬间,市民的一切美德——小心、顺从、勤勉、谨慎,都无济于事,它始终只要求天才人物,并且将他造就成不朽的形象。
命运鄙视地把畏首畏尾的人拒之门外。
命运——这世上的另一位神,只愿意用热烈的双臂把勇敢者高高举起,送上英雄们的天堂!
最重要的是:
搞IT的还是得搞好鸟语!

评分

举报 使用道具 TOP

只看该用户 #4

1的最终解决方案,利用Monkey Patch重定义了一下FlexSprite

Panel背景为黑色,Canvas背景为灰色
点击按钮出现滚动条

滚动条出现后右下方为黑色

[FlexSprite.as]
////////////////////////////////////////////////////////////////////////////////
//
//  Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
//  All Rights Reserved. The following is Source Code and is subject to all
//  restrictions on such code as contained in the End User License Agreement
//  accompanying this product.
//
////////////////////////////////////////////////////////////////////////////////

package mx.core
{

import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;

import mx.events.FlexEvent;
import mx.utils.NameUtil;

/**
*  FlexSprite is a subclass of the Player's Sprite class
*  and the superclass of UIComponent.
*  It overrides the <code>toString()</code> method
*  to return a string indicating the location of the object
*  within the hierarchy of DisplayObjects in the application.
*/
public dynamic class FlexSprite extends Sprite
{
//include "../core/Version.as";

//--------------------------------------------------------------------------
//
//  Constructor
//
//--------------------------------------------------------------------------

/**
 *  Constructor.
 *
 *  <p>Sets the <code>name</code> property to a string
 *  returned by the <code>createUniqueName()</code>
 *  method of the mx.utils.NameUtils class.</p>
 *
 *  <p>This string is the name of the object's class concatenated
 *  with an integer that is unique within the application,
 *  such as <code>"Button17"</code>.</p>
 *
 *  @see flash.display.DisplayObject#name
 *  @see mx.utils.NameUtil#createUniqueName()
 */
public function FlexSprite()
{
    super();

    try
    {
        name = NameUtil.createUniqueName(this);
    }
    catch(e:Error)
    {
        // The name assignment above can cause the RTE
        //   Error #2078: The name property of a Timeline-placed
        //   object cannot be modified.
        // if this class has been associated with an asset
        // that was created in the Flash authoring tool.
        // The only known case where this is a problem is when
        // an asset has another asset PlaceObject'd onto it and
        // both are embedded separately into a Flex application.
        // In this case, we ignore the error and toString() will
        // use the name assigned in the Flash authoring tool.
    }
    if(this is Container)
    {
        addEventListener(FlexEvent.UPDATE_COMPLETE,updateCompleteHandler);
    }
}

//--------------------------------------------------------------------------
//
//  Overridden methods
//
//--------------------------------------------------------------------------

/**
 *  Returns a string indicating the location of this object
 *  within the hierarchy of DisplayObjects in the Application.
 *  This string, such as <code>"MyApp0.HBox5.Button17"</code>,
 *  is built by the <code>displayObjectToString()</code> method
 *  of the mx.utils.NameUtils class from the <code>name</code>
 *  property of the object and its ancestors.
 *
 *  @return A String indicating the location of this object
 *  within the DisplayObject hierarchy.
 *
 *  @see flash.display.DisplayObject#name
 *  @see mx.utils.NameUtil#displayObjectToString()
 */
override public function toString():String
{
    return NameUtil.displayObjectToString(this);
}

private function updateCompleteHandler(event:Event):void
{
    var whiteBox:DisplayObject = DisplayObject(this["rawChildren"].getChildByName("whiteBox"));
    if(whiteBox)
    {
        this["rawChildren"].removeChild(whiteBox);
    }
}
}
}
[本帖最后由 Edison.sl 于 2009-01-14 09:37:18 编辑]

(您是游客)您没有权限查看附件

Edison.sl的签名
在命运降临的伟大瞬间,市民的一切美德——小心、顺从、勤勉、谨慎,都无济于事,它始终只要求天才人物,并且将他造就成不朽的形象。
命运鄙视地把畏首畏尾的人拒之门外。
命运——这世上的另一位神,只愿意用热烈的双臂把勇敢者高高举起,送上英雄们的天堂!
最重要的是:
搞IT的还是得搞好鸟语!

评分

举报 使用道具 TOP

只看该用户 #5

再次学习了...刚刚当当买了  Flex第一步..
k.sl的签名
I am newcomer...SecondLife

评分

举报 使用道具 TOP

只看该用户 #6

大哥,呃不,是前辈,高手啊,谢谢了...

评分

举报 使用道具 TOP

只看该用户 #7

请 Edison.sl 解释一下什么是Monkey Patch, 用来干嘛的,怎么用呢?

评分

举报 使用道具 TOP

只看该用户 #8

再次学习了...刚刚当当买了  Flex第一步..
-- by k.sl (2009-1-14 12:58:57)

淘宝买好。

评分

举报 使用道具 TOP

只看该用户 #9

请 Edison.sl 解释一下什么是Monkey Patch, 用来干嘛的,怎么用呢?
-- by Ender (2009-3-29 12:18:53)

google一下 flex monkey patch或者wiki monkey patch,有详细的说明
Edison.sl的签名
在命运降临的伟大瞬间,市民的一切美德——小心、顺从、勤勉、谨慎,都无济于事,它始终只要求天才人物,并且将他造就成不朽的形象。
命运鄙视地把畏首畏尾的人拒之门外。
命运——这世上的另一位神,只愿意用热烈的双臂把勇敢者高高举起,送上英雄们的天堂!
最重要的是:
搞IT的还是得搞好鸟语!

评分

举报 使用道具 TOP
艾睿会员有特权,登陆后广告自动屏障。现在就花5秒钟免费注册!更有好礼相送!