Creating a multiline title bar for the Panel component

Posted on 2008-06-11
Medium Priority
Last Modified: 2008-06-12

Can anyone point me in the right direction for creating a multi-line title bar for the Panel component in Flex 3?  I know I'll have to subclass it, etc.  But I could use some pointers as to where to start.  Any help would be appreciated.
Question by:asaivan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Accepted Solution

Gary Benade earned 2000 total points
ID: 21768441
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
      <local:MultiLineHdrPanel title="This is a long title that should wrap to 2 lines" width="682" height="368"/>

save code below as MultiLineHdrPanel.as
	import mx.containers.Panel;
	import mx.controls.Text;
	public class MultiLineHdrPanel extends Panel
		private var multiLineHdr:Text;
		public function MultiLineHdrPanel()
		override protected function createChildren():void
            multiLineHdr = new Text();
            multiLineHdr.width = 150;
            multiLineHdr.height = 30;            
            this.titleBar.addChild( multiLineHdr);
   			this.setStyle("headerHeight", 38);            
        override protected function layoutChrome(unscaledWidth:Number, unscaledHeight:Number):void
        	super.layoutChrome(unscaledWidth, unscaledHeight);
        	this.titleTextField.visible = false;            
        	multiLineHdr.text = this.title;
            multiLineHdr.move( 4, 4);

Open in new window


Author Comment

ID: 21772195
yep, that's it. sweet.

Expert Comment

ID: 22257535

Featured Post

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question