开发者

FLEX: is "Tooltip" an option if I want a caption with buttons?

开发者 https://www.devze.com 2022-12-29 18:51 出处:网络
is \"Tooltip\" an option if I want a caption with buttons ? I actually need to add a fading-in caption on top of my object without changing its width. (I guess not adding directly the faded-in captio

is "Tooltip" an option if I want a caption with buttons ?

I actually need to add a fading-in caption on top of my object without changing its width. (I guess not adding directly the faded-in caption to the MXML component.

I was wondering if Tooltip can be used for this. Is possible开发者_高级运维 to click on it ? And add custom components to it ?

thanks


It's not possible to click on a tooltip. If you need to pop up some other kind of container that the user can interact with, you should use the PopupManager.


No tooltip is not an option. Its used to display some caption.

//dataTipFunction

public function dtFunc(hd:HitData):String {
        return hd.item;
}

Now you can show the custom caption on what you want to display, if you want a clickable thing on your caption. You need to create a component and over ride updateDisplayList Method

 override protected function
        updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
}

This method will make sure how your component is like, then you need to play with the invalidateDisplayList(); and other methods on when re drawing your components what your components behavior should be.

0

精彩评论

暂无评论...
验证码 换一张
取 消