|
I never got the Menu component to work, can't help
you on 1 and too burnt to try again till the morning.
:: wavers ::
To heck with status, make your own, or overwrrite
the mug:
private var _status:String;
public function get status():String
{
return _status;
}
public function set
status(val:String):Void
{
if(val == null)
val =
"";
_status = val;
status_lbl.text =
_status;
}
Then, put a Label in your ControlBar instead of up
top. Or, you could use a setStatus method instead:
function setStatus(str:String):Void
{
status_lbl.text =
str;
}
As for capturing the exact label that the Panel has
up top, sorry, don't know his instance name, and if you couldnt' find it with a
for loop (assuming that's what the object inspector does) doubt I'll find him
either.
:: goes to look in code ::
Crud... can't find the Panel.as file. Oh
well, mabye try a true for in prop on the panel:
for(var p in this)
{
trace(p + ": "+
this[p]);
}
----- Original Message -----
From: Seth Voltz
Sent: Thursday, February 03, 2005 10:22 PM
Subject: [flexcoders] Menu events and panel status [was: Attempting
to add a button to Panel titlebar] Okay, two more questions now that I have a couple buttons inthe panel: 1) One of the buttons spawns a menu like so: function handleMenuButton ( event ) { if ( _menuData ) { winMenu = Menu.createMenu ( event.target, menuData ); winMenu.addEventListener ( "change", Delegate.create ( this, menuHandler )); var pos = getGlobalPosition ( event.target ); winMenu.show ( pos.x + event.target.width, pos.y ); } } /smaller>/fontfamily> and debug code tells me it's executing addEventListener()/smaller>/fontfamily> without warnings, however menuHandler()/smaller>/fontfamily> is never getting called. Any ideas? 2) I just found the status text feature in the panel and have a bunch of uses flowing through my mind for it... the problem is the buttons sit right on top of it. I'd like to be able to have my new panel extending class to intercept whatever creates that text object and move it to the left out of the way of each button. I tried using the Coenraet's object inspecting class to view everything attached to the panel hoping to find it and only came across the variables themselves ( _status : String/smaller>/fontfamily> and _statusChanged : Boolean/smaller>/fontfamily> ). No movieclips. Again, I'm lost here. Any ideas? Thanks a bunch :) Seth On Feb 03, 2005, at 10:52, JesterXL wrote: If you don't want to use a mix-in, a class that basically adds stuff at runtime to an existing class (which from an OOP standpoint & Flex' future career, you shouldn't do, but from a Functional standpoint + Decorator is perfectly legal), then use Manish's example; he uses inheritance, much like the TitleWindow extends Panel and has a close button;/smaller>/fontfamily> |

