Flex3有什么办法在Panel的右上角添加关闭按钮
1个回答
2016-08-15 · 知道合伙人数码行家
huanglenzhi
知道合伙人数码行家
向TA提问 私信TA
知道合伙人数码行家
采纳数:117538
获赞数:517190
长期从事计算机组装,维护,网络组建及管理。对计算机硬件、操作系统安装、典型网络设备具有详细认知。
向TA提问 私信TA
关注
展开全部
你看一下titlewindow的部分代码,
public class TitleWindow extends Panel
{
include "../core/Version.as";
//--------------------------------------------------------------------------
//
// Class mixins
//
//--------------------------------------------------------------------------
/**
* @private
* Placeholder for mixin by TitleWindowAccImpl.
*/
mx_internal static var createAccessibilityImplementation:Function;
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*/
public function TitleWindow()
{
super();
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// showCloseButton
//----------------------------------
[Inspectable(category="General")]
/**
* Whether to display a Close button in the TitleWindow container.
* The default value is <code>false</code>.
* Set it to <code>true</code> to display the Close button.
* Selecting the Close button generates a <code>close</code> event,
* but does not close the TitleWindow container.
* You must write a handler for the <code>close</code> event
* and close the TitleWindow from within it.
*
* @default false
*
* @tiptext If true, the close button is displayed
* @helpid 3986
*/
public function get showCloseButton():Boolean
{
return mx_internal::_showCloseButton;
}
/**
* @private
*/
public function set showCloseButton(value:Boolean):void
{
mx_internal::_showCloseButton = value;
}
titlewindow就是由panel继承来的,上面让closebutton显示
所以直接用titlewindow 就行了,或者自己参照titlewindow的source自己再写一个。
public class TitleWindow extends Panel
{
include "../core/Version.as";
//--------------------------------------------------------------------------
//
// Class mixins
//
//--------------------------------------------------------------------------
/**
* @private
* Placeholder for mixin by TitleWindowAccImpl.
*/
mx_internal static var createAccessibilityImplementation:Function;
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*/
public function TitleWindow()
{
super();
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// showCloseButton
//----------------------------------
[Inspectable(category="General")]
/**
* Whether to display a Close button in the TitleWindow container.
* The default value is <code>false</code>.
* Set it to <code>true</code> to display the Close button.
* Selecting the Close button generates a <code>close</code> event,
* but does not close the TitleWindow container.
* You must write a handler for the <code>close</code> event
* and close the TitleWindow from within it.
*
* @default false
*
* @tiptext If true, the close button is displayed
* @helpid 3986
*/
public function get showCloseButton():Boolean
{
return mx_internal::_showCloseButton;
}
/**
* @private
*/
public function set showCloseButton(value:Boolean):void
{
mx_internal::_showCloseButton = value;
}
titlewindow就是由panel继承来的,上面让closebutton显示
所以直接用titlewindow 就行了,或者自己参照titlewindow的source自己再写一个。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询