how to set the x and y position of开发者_Go百科 title , of panels title
details:- a panel has a title i.e in panel header we can see that title right . my question is how to set x and y of that title . or move the title position to top or bottom of panel header
You could create a custom panel i.e. a new Mxml component based on Panel. Override createChildren() and add a Canvas to the titlebar:
titleBar.addChild( myCanvas);
Create a Label, and place it anywhere on the myCanvas using an x,y position. Bingo.
Very similar example here that uses a HBox in the Panel title instead of a canvas.
Are you using a spark panel, or an mx panel? If the former, you can copy the default PanelSkin and move the "titleDisplay" element wherever you want. Then just assign your custom skin to the Panel class in CSS, or set the skinClass on your Panel instance.
精彩评论