Skinning / Extending Panel

Hi,
I'm looking to skin or extend the panel so that I can have
things such as a close button in the title bar, and so that the
panel's resizeable. What's the best way to do this? If I extend the
panel, how do I go about this? since my components are in
<mx:panel/> 's
Thanks :)

Hello:
You need to override the createChildren method to do this.
This is just an example but is similar to the method I use. If you
are adding many components then you would want to break out each
components configurations into their own methods or your
createChildren() method will get quite long. Or even better create
a custombutton class in advance that extends the Button Class and
use it.
Example:
private var panelTB:UIComponent;
private var myCloseButton:Button = new Button();
override protected function createChildren():void {
super.createChildren();
//make yourself a reference to the titlebar
this.panelTB = super.titleBar;
//Your components go here, Example:
this.myCloseButton.width = 25;
this.myCloseButton.height = 25;
this.myCloseButton.styleName = "myCloseButtonStyle";
//Add your objects (a button in this case to the referenced
titlebar
this.panelTB.addChild(this.myCloseButton);
this.positionTBChildren();
The positionTBChildren method would then set the X,Y of the
button based on your desired location and needs.
Hope that helps.
-Joe

Similar Messages

  • Implementation of DragManager in extended Panel class

    Hi,
    I'm facing a problem during implementation of DragManager in
    extended Panel class. I've a component which is extending the Panel
    class where I've attached four Images with their corresponding
    dragging features.
    Say, the four images' x positions as these: x1 = 10, x2 = 20,
    x3 = 30, x4 = 40. After adding the DragManger class and
    implementation of dragging feature to those Images, the dragging is
    works fine. But, the problem is, when I'm dragging x1 image, the
    imageProxy associated to x1 starts showing from exactly the x1
    position, but also all the three images' (x2, x3, x4) imageProxy
    starts dragging from x1 position only! When the expected result is,
    the x2 imageProxy shud starts drag from x2 x position itself, and
    for other x3 imageProxy from x3 position and x4 is their also.
    Except the x1 image, all the other three's imageProxy are not
    starts from their respective image x position.
    Anyone can give any idea.. how to overcome this?
    tnks.
    ASB

    What are the:
    DragManager.doDrag(initiator, ds, event, imageProxy, x, y,
    1.0);
    x and y parameters in your drag manager's doDrag method? They
    should be calculated from the point of mouse click that would
    event.localX and event.localY.
    ATTA

  • Where i can read about make extended panel for Photoshop cc 2014?

    where i can read about make extended panel for Photoshop cc 2014?

    It was experimental in CC first release its now supported in CC 2014 not experimental.
    Support for Windows touch devices
    New in this release of Photoshop CC
    Photoshop CC now supports Windows 8.1 touch devices like the Microsoft Surface Pro, so you can use pinch, zoom, pan, and rotate. 
    In Photoshop, two-finger touch gestures are used to control the location, rotation, and scaling of the Image > Canvas view. Users may alternate between touch view control and other interactions using the mouse or stylus, but touch may not be used simultaneously with other input. Touch control is convenient when painting on large touchscreen monitors, which are difficult to rotate physically, and on tablets to avoid constantly shifting the device.
    For more information, see Touch gestures.

  • Open "Extended" panel in Adobe Reader XI as default setting

    Is there a way to open Adobe Reader XI to show the "Extended" panel with Add-on Tools as a default setting?
    Thanks
    Linda

    AFAIK, no.

  • Padding does not work on extended Panel

    I can create a Panel (mxml or AS) and define paddingXXXX
    (i.e. Left, Right, Top, Bottom) and the Panel displays with the
    defined padding values. However, if I extend Panel, the paddingXXXX
    attributes are ignored.
    I can work around the problem by wrapping the panel's content
    in another container (VBox, HBox, etc), but that's obviously not
    desired behavior.
    I've searched the bug database, and can't find anything that
    appears to address this specifically. Is this a known issue?
    Flex 3 - SDK v3.0.2.214193

    "tptackab" <[email protected]> wrote in
    message
    news:glg09b$gmf$[email protected]..
    >I can create a Panel (mxml or AS) and define paddingXXXX
    (i.e. Left, Right,
    > Top, Bottom) and the Panel displays with the defined
    padding values.
    > However,
    > if I extend Panel, the paddingXXXX attributes are
    ignored.
    code?

  • Problem creating an extendable panel with a header

    Hi -
    I'm trying to create a base panel class. What it needs is a header at the
    top of it with a title box(another panel) of a different color. The title of
    course is in the title box. My primitive solution was to create a parent
    panel and place the title box on the header panel, then the header on
    the parent panel. My problem is that I can't extend from that and add
    components to it with the header there.
    Does anybody have a more elegant solution?
    Thanks.

    Hello Steven,
    You can use createdby field to determine the docentry of the base document instead of quering docentry by docnum
    select createdby, transtype, baseref from jdt1
    Note: Always set the correct document type for payments: (createdby is ok in integer format)
    Example:
    Opening Balance:  JE # 8 amount 1000, created by Opening balance (not JE)
       vPay.Invoices.DocEntry = 8
       vPay.Invoices.InvoiceType = BoRcptInvTypes.it_OpeningBalance
       vPay.Invoices.SumApplied = 1000
       Call vPay.Invoices.Add
    Opening Balance:  JE # 8 amount 1000, created by Journal Entry
       vPay.Invoices.DocEntry = 8
       vPay.Invoices.InvoiceType = BoRcptInvTypes.it_JournalEntry
       vPay.Invoices.SumApplied = 1000
       Call vPay.Invoices.Add
    Sales Invoice:  DocEntry: 11  amount 1000
       vPay.Invoices.DocEntry = 11
       vPay.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
       vPay.Invoices.SumApplied = 1000
       Call vPay.Invoices.Add
    Regards,
    J.

  • Unable to extend FusionFX skin

    Dear All,
    I am having trouble implementing my own skin functionality.
    I wanted to extend the fusionFx skin family so I decided to create a skin file like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <skins xmlns="http://myfaces.apache.org/trinidad/skin">
      <skin>
        <id>customSkin.desktop</id>
        <family>CustomSkin</family>
        <extends>fusionFx</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/custom-skin.css</style-sheet-name>
      </skin>
    </skins>But when I run the above code, I am seeing error in my WLS and the components doesnt render right.
    <SkinUtils> <_sortSkinNodesWithExtensions> The following skins extend each other in a circular fashion or the skin they extend does not exist.
    Skin with id: customSkin.desktop extends skin with id: fusionFx
    <SkinUtils> <_addSkinToFactory> Unable to locate base skin "fusionFx" for use in defining skin of id "customSkin.desktop", family "CustomSkin", renderkit ID "org.apache.myfaces.trinidad.desktop". Using the default base skin "simple.desktop".I tried changing the extends family with the blafplus, but this one works. But I dont want to extend this skin rather the FusionFX only
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <skins xmlns="http://myfaces.apache.org/trinidad/skin">
      <skin>
        <id>customSkin.desktop</id>
        <family>CustomSkin</family>
        <extends>blafplus-rich.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/custom-skin.css</style-sheet-name>
      </skin>
    </skins>Any hints please?

    Hi,
    This should work,
    <extends>fusionFx-v1.desktop</extends>Regards,
    Santosh
    Edited by: Santosh Vaza on Jun 10, 2011 12:43 PM

  • Panel Header Not Skinned when Alert Window show

    Hi,
    I've skinned a panel with header color specified with e.g. Blue.
    But, when there is an Alert shown on it.
    The Blue header become not skinned, and return to default grey color.
    When the Alert box closed, the header become skinned again.
    I've checked and set the modalTransparencyColor for global Alert css.
    But, still no luck.
    This situation happens only when the Panel is brought up by using the PopUpManager.
    If the Panel has already been on stage, the header will still in skinned mode.
    Please suggest me what to do, many thank.

    I thought Alert had its own set of styles that override Panel's

  • Extend spark dropdownlist button to the longest item in dataprovider ?

    Hi,
    simple as stated in the thread's title : I cannot figure out a way to have my spark DropDownLists (no particular skin) extend their width to their longest item width ??
    For instance the following :
    <s:DropDownList id="aglist" width="100%" requireSelection="false"
                                    dataProvider="{model.userAssignedAgents}" labelFunction="agentLabel"
                                    change="aglist_changeHandler(event)" open="{aglist.selectedIndex = -1}"/>
    when layed on a simple spark panel gets the standard DDList button width, about 50px whatever its content, though its items are much longer than that. So when the button is clicked, the dropdown menu shows some ugly scrollbars.
    Do you have any clue ? I've been stuck for hours trying to do what sounds like the very-standard-way-of-setting-dropdownlist-width to me !
    Thanks
    Matt

    Good point.
    The main problem I had with the ComboBox is that I don't want to allow "creation" of new elements, so if the typed text doesn't match any element, instead of selectedIndex of -3 it should just keep the old selection. Plus a few other things.
    Thinking about it, this is probably my best choice, and if I were to extend a class it should probably be this one.

  • Spark Panel close button best practice ?

    Hello,
    I would like to know what is the best practice to add a close button to a Panel and be able to skin it through CSS file ?
    If I add a [SkinPart(required="true")] meta data in the extended Panel for the button created in the Skin file, titleField becomes "null" (it is never created in partAdded() ).
    Many thanks,

    If you're using the beta 1 build, it could be you're running into http://bugs.adobe.com/jira/browse/SDK-21484?  If so, try swapping in the mxmlc.jar attached to that bug.
    Steve

  • Use created skin state

    tl;dr How do I change a components state to a new state defined in a custom skin.
    Hello Everyone ,
      I have created a new component that extends Panel ( NewPanel.as ).  I have created a skin for NewPanel.as , in which the new skin has an additional state (newState).  What must I do to make an instance of my NewPanel class change its visual state to "newState".  Most of the examples on the internet , show a button and changing its default states , but not adding a brand new one.
    Sincerely ,
      Ubu

    Create a site for publication.
    Duplicate a page in your template site.
    Drag it to the publish site
    Rename the page.
    Edit the page.
    Publish the page.
    It's easier than it sounds.

  • Problem with Paining in a Panel in a JFrame.

    So I can paint directly on a JFrame, and I can paint on a class that extends Panel, and put the Panel on a JFrame. But if I try to Repaint the Panel it won't show on the JFrame. Do I have to do anything to the JFrame to show the changes to the objects inside as well?

    I'm not sure if you've done this, but don't change the paint method when using Swing components, use paintComponent instead. By default, the JFrame will paint its children. Just remember whenever overriding any of the paintComponent methods to call super.paintComponent(g) first.

  • How to add multiple images to panel

    Hi, i am trying to add more than 1 image to a panel, but i cant work out how. have the following code, but it means i have to create a new panel each time. i only want to use 1 panel, and add images to this one panel. the images are transparent and i layer them over each other. I mouse listener to get the coordinates when the user clicks over the image, and for this i need to use a panel, unless anyone can show me another way????
    cheers for any advice,
    ness
    public class test extends Applet
    DrawPanel dp;
    public void init()
    Image im1 = getImage(getDocumentBase(),"images/panel1.gif");
    Image im2 = getImage(getDocumentBase(),"images/front.gif");
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(im1,0);
    mt.addImage(im2,0);
    try{mt.waitForAll();}
    catch(InterruptedException ie){}
    dp = new DrawPanel(im1);
    //here i want to add im2 image to dp panel but how???????
    setLayout(new BorderLayout());
    add(BorderLayout.CENTER,dp);
    class DrawPanel extends Panel
    Image im;
    Image im1;
    Image im2;
    public DrawPanel(Image im)
    im = im;
    public void paint(Graphics g)
    if (im != null)
    g.drawImage(im1,0,0,this);
    g.drawImage(im2, 20, 20, this);

    I've modified the code so that you can send DrawPanel an array of images where index 0 in the array will be draw on the bottom and 1 on top of that, 2 on top of that, and so on. You'll need to add the 20,20 offset somewhere if you want to include that too. Good Luck!
    public class test extends Applet
        DrawPanel dp;
        public void init()
            Image im1 =
            getImage(getDocumentBase(),"images/panel1.gif");
            Image im2 = getImage(getDocumentBase(),"images/front.gif");
            MediaTracker mt = new MediaTracker(this);
            mt.addImage(im1,0);
            mt.addImage(im2,0);
            try{mt.waitForAll();}
            catch(InterruptedException ie){}
            /** Declare array and place two images in it **/
            Image[] images = new Image[2];
            images[0] = im1;
            images[1] = im2;
            dp = new DrawPanel(images);
            setLayout(new BorderLayout());
            add(BorderLayout.CENTER,dp);
    class DrawPanel extends Panel
        Image[] ims;
        public DrawPanel(Image[] im)
            ims = im;
        public void paint(Graphics g)
            super.paint(g);
            for(int i=0; i<ims.length; i++)
                if (ims[i] != null) g.drawImage(ims,0,0,this);

  • How to add a border for Panel (jdk 1.1) ?

    how to add a border for Panel (jdk 1.1) ?

    Border's are a Swing feature, you will have to draw one by yourself (extend Panel and override paint()).

  • Flex Module issue with Panel

    Hello everyone. I have the following problem.
    In my application I have several modules and each of them have components CollapsableTitleWindow (extends Panel). After opening the window it is added to the container which is in the main application (CollapsableTitleWindowContainer). In these windows you can open another window (and so on).
    Now, what is the problem. When I change (reload) any module and I want to open a new window (sub window) with the already loaded window I get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.containers::Panel/layoutChrome()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\Panel.as:1405]
    at com::CollapsableTitleWindow/layoutChrome()[D:\Flex 3 Workspace\WesobCrm\src\com\CollapsableTitleWindow.as:216]
    at mx.core::Container/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2867] (...)
    Indicates that the main applications have object Panel
    Please help.
    P.S. I found a similar problem on http://www.nabble.com/Flex-Module-issue-with-Panel-td20168053.html
    ADDED: I extendes the Panel class and do something like that:
    override protected function layoutChrome(unscaledWidth:Number, unscaledHeight:Number):void
                    use namespace mx_internal;
                    if(!(mx_internal::titleBarBackground is TitleBackground)) {
                            mx_internal::titleBarBackground = new TitleBackground();
                    super.layoutChrome(unscaledWidth, unscaledHeight);                     
    But now i had something like that: Before After
    You can see that it loos style declaration.H

    Thanks for the anserw.
    I don't exacly understand all but i found a solution for my problem and it works.
    Could you tell me if this is ok ?
    I Add in my main app
    public function getProductWindow():ProductWindow {
        return new ProductWindow();
    And in the module i change
    From var productWindow:ProductWindow = new ProductWindow();
    To var productWindow:ProductWindow = Application.application.getProductWindow();

Maybe you are looking for

  • How can I get my G4 to run fast again?

    I remember the halcyon days, when this bad boy ran as fast as I could think. These days, he's like toothless old guy on the bus with his walker in the middle of the aisle. Switching between programs is slow. I look at the beachball way too often. Eve

  • F.05 - Foreign currency valuation of customers and vendors

    Hello all, My client wants to post the valuation differences realized gain/loss from exchange rates for customer and vendor open items to the customer/vendor account itself. Meaning, at the moment the F.05 creates the accounting documents for revalua

  • Record Sizing Calculation

    First of all, apologies for using he wrong forum. Why isn't there a "Database" forum? I am currently trying to size a number of tables for a client. From dim and distant genetic memory I think that the following worse-case calculations apply: Length

  • Install of OEM 10g Grid controll on windows break my listener

    Hi! I install OEM 10g Grid controll to Windows 2000 server, successfully (a new database to the repository also was created by the installer). When I restart our server the service of the Listener did not started (it was set to automatic) and I did n

  • CS4 FW - Preview, 2up and 4up not working

    The original art file is showing but the optimised art file in Preview, 2up and 4up are not showing - see attached. (I'm using a Quad Core Intel MAC OSX10.5.8) It's annoying me no-end, please help. Cheers. Karl