- 浏览: 45279 次
- 性别:
- 来自: 大连
文章分类
最新评论
-
ITvision:
嗯,就是的,ISO8859-1只支持chrome。
Struts2文件下载中文名乱码解决方法 -
xjsimon:
不错,好方法
Struts2文件下载中文名乱码解决方法 -
hzxlb910:
嗯我搞错了,我当JAVA了,呵呵
js判断变量是否空值的代码 -
hzxlb910:
第6,8句也是同样的错误
js判断变量是否空值的代码 -
hzxlb910:
你的第9行有点语法错误:(!==)if(undefined ! ...
js判断变量是否空值的代码
panel title的背景色修改,使用skin来解决
skin代码如下
第235行的label即是panel头部的信息,修改它可以改变头部的背景色,居中等设置,很方便
skin代码如下
<?xml version="1.0" encoding="utf-8"?> <!-- ADOBE SYSTEMS INCORPORATED Copyright 2008 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the license agreement accompanying it. --> <!--- The default skin class for a Spark Panel container. @see spark.components.Panel @langversion 3.0 @playerversion Flash 10 @playerversion AIR 1.5 @productversion Flex 4 --> <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false" minWidth="131" minHeight="127" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5"> <fx:Metadata> <![CDATA[ /** * @copy spark.skins.spark.ApplicationSkin#hostComponent */ [HostComponent("spark.components.Panel")] ]]> </fx:Metadata> <fx:Script fb:purpose="styling"> <![CDATA[ import mx.core.FlexVersion; /* Define the skin elements that should not be colorized. For panel, border and title background are skinned, but the content area, background, border, and title text are not. */ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border"]; /* exclusions before Flex 4.5 for backwards-compatibility purposes */ static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"]; /** * @private */ override public function get colorizeExclusions():Array { // Since border is styleable via borderColor, no need to allow chromeColor to affect // the border. This is wrapped in a compatibility flag since this change was added // in Flex 4.5 if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5) { return exclusions_4_0; } return exclusions; } /** * @private */ override protected function initializationComplete():void { useChromeColor = true; super.initializationComplete(); } /** * @private */ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { if (getStyle("borderVisible") == true) { border.visible = true; background.left = background.top = background.right = background.bottom = 1; contents.left = contents.top = contents.right = contents.bottom = 1; } else { border.visible = false; background.left = background.top = background.right = background.bottom = 0; contents.left = contents.top = contents.right = contents.bottom = 0; } dropShadow.visible = getStyle("dropShadowVisible"); var cr:Number = getStyle("cornerRadius"); var withControls:Boolean = (currentState == "disabledWithControlBar" || currentState == "normalWithControlBar"); if (cornerRadius != cr) { cornerRadius = cr; dropShadow.tlRadius = cornerRadius; dropShadow.trRadius = cornerRadius; dropShadow.blRadius = withControls ? cornerRadius : 0; dropShadow.brRadius = withControls ? cornerRadius : 0; setPartCornerRadii(topMaskRect, withControls); setPartCornerRadii(border, withControls); setPartCornerRadii(background, withControls); } if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); borderStroke.color = getStyle("borderColor"); borderStroke.alpha = getStyle("borderAlpha"); backgroundFill.color = getStyle("backgroundColor"); backgroundFill.alpha = getStyle("backgroundAlpha"); super.updateDisplayList(unscaledWidth, unscaledHeight); } /** * @private */ private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void { target.topLeftRadiusX = cornerRadius; target.topRightRadiusX = cornerRadius; target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0; target.bottomRightRadiusX = includeBottom ? cornerRadius : 0; } private var cornerRadius:Number; ]]> </fx:Script> <s:states> <s:State name="normal" /> <s:State name="disabled" /> <s:State name="normalWithControlBar" stateGroups="withControls" /> <s:State name="disabledWithControlBar" stateGroups="withControls" /> </s:states> <!-- drop shadow can't be hittable so it stays sibling of other graphics --> <!--- @private --> <s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" distance="11" angle="90" color="#000000" left="0" top="0" right="0" bottom="0"/> <!-- drop shadow can't be hittable so all other graphics go in this group --> <s:Group left="0" right="0" top="0" bottom="0"> <!-- top group mask --> <!--- @private --> <s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask" > <!--- @private --> <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0"> <s:fill> <s:SolidColor alpha="0"/> </s:fill> </s:Rect> </s:Group> <!-- bottom group mask --> <!--- @private --> <s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" includeIn="normalWithControlBar, disabledWithControlBar"> <!--- @private --> <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0"> <s:fill> <s:SolidColor alpha="0"/> </s:fill> </s:Rect> </s:Group> <!-- layer 1: border --> <!--- @private --> <s:Rect id="border" left="0" right="0" top="0" bottom="0" > <s:stroke> <!--- @private --> <s:SolidColorStroke id="borderStroke" weight="1" /> </s:stroke> </s:Rect> <!-- layer 2: background fill --> <!--- Defines the appearance of the PanelSkin class's background. --> <s:Rect id="background" left="1" top="1" right="1" bottom="1"> <s:fill> <!--- @private Defines the PanelSkin class's background fill. The default color is 0xFFFFFF. --> <s:SolidColor id="backgroundFill" color="#FFFFFF"/> </s:fill> </s:Rect> <!-- layer 3: contents --> <!--- Contains the vertical stack of titlebar content and controlbar. --> <s:Group left="1" right="1" top="1" bottom="1" id="contents"> <s:layout> <s:VerticalLayout gap="0" horizontalAlign="justify" /> </s:layout> <!--- @private --> <s:Group id="topGroup" mask="{topGroupMask}"> <!-- layer 0: title bar fill --> <!--- @private --> <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1"> <s:fill> <s:LinearGradient rotation="90"> <s:GradientEntry color="0xE2E2E2" /> <s:GradientEntry color="0xD9D9D9" /> </s:LinearGradient> </s:fill> </s:Rect> <!-- layer 1: title bar highlight --> <!--- @private --> <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0"> <s:stroke> <s:LinearGradientStroke rotation="90" weight="1"> <s:GradientEntry color="0xEAEAEA" /> <s:GradientEntry color="0xD9D9D9" /> </s:LinearGradientStroke> </s:stroke> </s:Rect> <!-- layer 2: title bar divider --> <!--- @private --> <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0"> <s:fill> <s:SolidColor color="0xFF0000" /> </s:fill> </s:Rect> <!-- layer 3: text --> <!--- @copy spark.components.Panel#titleDisplay --> <s:Label id="titleDisplay" maxDisplayedLines="1" width="100%" minHeight="30" backgroundColor="#0070C0" verticalAlign="middle" textAlign="center" fontWeight="bold"> </s:Label> </s:Group> <!-- Note: setting the minimum size to 0 here so that changes to the host component's size will not be thwarted by this skin part's minimum size. This is a compromise, more about it here: http://bugs.adobe.com/jira/browse/SDK-21143 --> <!--- @copy spark.components.SkinnableContainer#contentGroup --> <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0"> </s:Group> <!--- @private --> <s:Group id="bottomGroup" minWidth="0" minHeight="0" includeIn="normalWithControlBar, disabledWithControlBar" > <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}"> <!-- layer 0: control bar divider line --> <s:Rect left="0" right="0" top="0" height="1" alpha="0.22"> <s:fill> <s:SolidColor color="0x000000" /> </s:fill> </s:Rect> <!-- layer 1: control bar highlight --> <s:Rect left="0" right="0" top="1" bottom="0"> <s:stroke> <s:LinearGradientStroke rotation="90" weight="1"> <s:GradientEntry color="0xE5E5E5" /> <s:GradientEntry color="0xD8D8D8" /> </s:LinearGradientStroke> </s:stroke> </s:Rect> <!-- layer 2: control bar fill --> <s:Rect left="1" right="1" top="2" bottom="1"> <s:fill> <s:LinearGradient rotation="90"> <s:GradientEntry color="0xDADADA" /> <s:GradientEntry color="0xC5C5C5" /> </s:LinearGradient> </s:fill> </s:Rect> </s:Group> <!-- layer 3: control bar --> <!--- @copy spark.components.Panel#controlBarGroup --> <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0"> <s:layout> <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" /> </s:layout> </s:Group> </s:Group> </s:Group> </s:Group> </s:SparkSkin>
第235行的label即是panel头部的信息,修改它可以改变头部的背景色,居中等设置,很方便
发表评论
-
Flex中对浏览器窗口控制
2011-09-27 20:15 821打开一个新浏览器窗口 navigateToURL(new ... -
关于自定义Flex chart的legend信息
2011-09-15 10:09 4793不说废话,直接上代码~ <?xml version=& ... -
减小swf文件的方法
2011-09-13 15:29 9861、使用Release模式(这个通常会被忽视,呵呵) ... -
datagrid加载xml数据的as代码
2011-09-13 09:29 767// ActionScript file package co ... -
Label中字自动换行
2011-09-08 14:01 1111l.mx_internal::getTextField().w ... -
Flex中控件的initialize,creationComplete和applicationComplete事件总结(转)
2011-09-06 14:09 12511.Application标签中有三个事件 initiali ...
相关推荐
背景透明Panel,可以设置透明度;可以设置边框颜色、边框类型、边框大小
android沉浸状态栏和顶部状态栏背景色的设置,现在很多应用都引用了沉浸式状态栏这样的效果,这样的效果很酷炫。
winform panel控件背景透明 在网页中通过div+css实现半透明效果不难,今天我们看看一种在winfrom中实现的方法
如何给Ext.panel增加一个背景图片
不用标题栏就可实现Delphi窗口拖动..rar
工具栏 美化 加背景图片 数据库的表格控件,添加删除修改基本操作 panel上显示子窗口 树控件加复选框 加背景图片 更改节点颜色 右键点击选中节点 找相关的代码花了不少时间,浪费了不少积分,5分并不算多哦
winform自定义的透明背景的panel,可以覆盖在其他控件上,然后在该透明panel上做绘图、点击获取坐标等操作。
C# WinForm窗体控件Panel修改边框颜色以及边框宽度方法 可以直接到博客地址查看主要代码:http://www.cnblogs.com/JiYF/p/9047559.html
标题栏以Panel模拟,实现标题栏拖动、双击最大化、边框拖拉等效果
JPanel 渐进色背景,和图片背景(可叠加)的实现代码,以及使用样例。 jar文件中包含源代码,本身可执行以便于看效果。
两个方法鼠标拖动改变面板panel大小,可限定面板的最小值和最大值
winform panel 绘制边框阴影 ,可以设置具体显示哪个边框的阴影。 static Image shadowDownRight = new Bitmap(typeof(ShadowPanel), "Images.tshadowdownright.png");//下右 static Image shadowDown = new ...
panel颜色问题
Delphi 用的透明panel, 不遮挡下面 可以当控件容器, 控制控件的位置
Delphi 动态创建panel,在panel上再创建TRzBackground,显示背景,创建TBmpButton,有鼠标移动事件和单击事件
自己写的可以修改背景和边框颜色的Delphi Panel控件
实际上,Panel很类似于GroupBox,其区别是:只有GroupBox控件可以显示标题,而只有Panel控件可以有滚动条。 Panel控件在工具箱中的图标如图所示:。 一、Panel控件的常用属性 1、Anchor和Dock:这两个属性是所有...
类似extjs中viewport的panel viewport只能渲染到body,而这个panel可以渲染到任何html元素,并且这个panel会自动变大!自动填充到最大化
Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel Panel
winform无边框在panel上拖动窗口位置,改变窗口大小 如果不能使用随时联系我