Anonymous1
Anonymous1

Reputation: 3907

Flex 4 - Add component to title bar of Spark Panel or Spark TitleWindow

I'm looking to add a couple of buttons to the title bar of a Spark Panel or Spark TitleWindow. Is this possible to do without making the panel from scratch?

Upvotes: 2

Views: 9754

Answers (1)

Wade Mueller
Wade Mueller

Reputation: 6059

I've done this in the past by creating a custom Panel or TitleWindow skin that adds the additional buttons. You would then extend the Panel/TitleWindow class and add your buttons as skin parts. That way you can attach listeners, set icons, etc via your custom Panel/TitleWindow.

Here's a similar question/answer that adds an icon to a title bar: Adding an image on the right side of the title bar of a panel in flex 4

And an example that uses ActionScript rather than skins: ActionScript example

Hope that helps.

Upvotes: 3

Related Questions