How could i put image in button bar

import events.ToolbarEvent;
import mx.events.FlexEvent;
import mx.events.ItemClickEvent;
import mx.events.SliderEvent;
import mx.core.*;
import spark.skins.spark.ImageSkin;
import ui.presenters.MainPresentationModel;
            [Bindable]
            public var fileButtons:Array = [{label:"Open"},{label:"Save"}];
            [Bindable]
            public var navButtons:Array =
                {label:"Adjust",state:MainPresentationModel.ADJUST_STATE},
                {label:"Touchup",state:MainPresentationModel.TOUCHUP_STATE},
                {label:"Effects",state:MainPresentationModel.EFFECT_STATE}
            [Bindable]
            public var historyButtons:Array = [{label:"Undo"},{label:"Redo"}];
            private function handleFileClick(e:ItemClickEvent):void
                if (e.label == "Open")
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.OPEN));
                else if (e.label == "Save")
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.SAVE));
            private function handleNavClick(e:ItemClickEvent):void
                callLater(handleNavigation,[e.item.state]);
            private function handleNavigation(state:String):void
                if (navBar.selectedIndex == -1)
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.SHOW));
                else
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.SHOW,true,false,state));
            private function handleHistoryClick(e:ItemClickEvent):void
                if (e.label == "Undo")
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.UNDO));
                else if (e.label == "Redo")
                    dispatchEvent(new ToolbarEvent(ToolbarEvent.REDO));
            private function handleZoomChange(e:SliderEvent):void
                dispatchEvent(new ToolbarEvent(ToolbarEvent.ZOOM, true, false, null, e.value));
        ]]>
    </mx:Script>
    <mx:ButtonBar dataProvider="{fileButtons}" itemClick="handleFileClick(event)"   />
    <mx:ToggleButtonBar id="navBar" dataProvider="{navButtons}" toggleOnClick="true"
        creationComplete="event.target.selectedIndex=-1" itemClick="handleNavClick(event)"/>
    <mx:Button label="Show Source" click="dispatchEvent(new ToolbarEvent(ToolbarEvent.SRC))"  />
    <mx:Spacer width="100%" />
    <mx:ButtonBar dataProvider="{historyButtons}" itemClick="handleHistoryClick(event)"  />
    <mx:HSlider value="1.0" minimum="0.1" maximum="3.0" snapInterval="0.1" liveDragging="true" change="handleZoomChange(event)" />
</mx:HBox>
using this code what shoud i do to add image on button bar

I would extend the button bar and in create children I will add the image.

Similar Messages

  • PUT IMAGE ON BUTTON BAR

    How could i put image on Buttonbar for all different buttons on it can u please help me thNK YOU

    answered in your other post...

  • How could I load image via a Form when it is in runtime by not using default block

    1. How could I load image from my local computer to the database via a Form when it is in runtime?
    2. And how to display the image stored in the database on a Form ?
    Thanks buddy ~
    A nice member answered this question already, but I want to know how could I do it by using manual create block instead of using database item directly~
    Could anyone help me pls~

    This is the only way I know right now:
    1) Create this table
    SQL> desc av_data
    Name Null? Type
    BLOB_ID NOT NULL NUMBER(10)
    BLOB_TYPE NOT NULL VARCHAR2(10)
    DESCRIPTION NOT NULL VARCHAR2(25)
    BLOB_DATA LONG RAW
    2) On form create a button with this 'when-btn-prssed' tgr:
    DECLARE
         v_dirname          VARCHAR2(255);
         v_filename          VARCHAR2(255);
    BEGIN
         v_dirname := 'C:\';
         v_filename := get_file_name(v_dirname, NULL,
         'Bitmap file (*.bmp)|*.bmp|'                    ||
         'JPEG file (*.jpg)|*.jpg|'          );
         IF v_filename IS NOT NULL THEN
    read_image_file(v_filename, 'ANY',
    'av_data_image.blob_data');
         END IF;
    END;     
    3) Add this pre-insert trigger too :
    :av_data_image.blob_type := 'IMAGE';
    Sorry if this is not exactly the answer you're looking for.
    Bob

  • How do I put a home button on my screen?

    How do you put a home button on iPad screen?

    Settings - General - Accessibility - Assistive Touch = On

  • How can i put a submit button in a survey and it send to my email

    how can i put a submit button in a survey and it send to my email?

    Hi williamm89908146,
    You need to open the form in which you want to put the submit button,
    then you have to choose 'Add new field' under Tasks pane on the right Hand side of the window.
    Choose 'Ok' Button
    Place the button at desired Location
    Change the field name to 'Submit'
    Click on 'All Properties' (Button Properties window Will open up)
    Click on Actions Tab and then on 'Select Action:'
    Choose 'Open a web Link' from the Drop Down Menu and then Click 'Add'
    another window will appear in which you have to type this:    mailto:[your email address], eg: mailto:[email protected] later click close
    Click Close Form editing on the right hand side of the window
    Clicking on the Button would open up your default email client and your address would appear in 'To' field.
    Please feel free if you face any challenges in following through these steps.
    Regards,
    Rahul

  • How do you put a facebook button on site?

    how do you put a facebook button on my iWeb site?

    Go to Facebook :
         http://developers.facebook.com/docs/plugins/
    Grab the code and paste it in a HTML Snippet.

  • How can I put the close button in the mainframe of the dialog?

    Hi all,
    I am creating a new dialog and I would like to konw...
    How can I put the close button in the mainframe of the dialog?
    Thanks in advance.
    Best regards,
    Juanma.

    Juanma,
    Usually, a dialog would have an OK and a Cancel button, both can be served as the close button, but if user clicks the ok button (DefaultButtonWidget) to close the dialog, your dialog controller's (if it is based on CDialogController) ApplyDialogFields will get called so you can react to the OK action, otherwise, if user clicks the cancel button (CancelButtonWidget), nothing will happen. The dialog simply is dismissed.
    See BasicDialog SDK sample to see how to add DefaultButtonWidget and CancelButtonWidget to a dialog.
    Thanks!
    lee

  • How to put images on buttons?

    I am currently working a project and need to mount an image onto a button, so when the image is clicked on it makes the button event work?

    set icons? , do i have to have the image in the same
    folder as where the code is saved? I have not been
    able to find any code showing how to apply images
    onto buttons on a GUI.Did you atleast read reply 2 and 4?Have you ever read the JButton API?There's no necessity that the image has to be in the same folder.You use have to specify the absolute path of the image when you create an instance representing it.

  • How could i put the text background of each node transparent?

    I am working on JTree. I Assign distinct icons to each node and a background image to the Jtree. I use transparent images to each node but the background text of each node have color. How could i do to put the text background of each node transparent.

    Your tree cell renderer should include the line "setOpaque(false);".

  • How do you put image where you want?-Please help!

    Hi guys, I'm a newcomer and trying to implement a domino game for four players(of which computer simulates 3). I've put 5 panels in a frame, the middle one is for the story board.
    The problem is : how can I put tile images where a player plays a tile?Since the shape of the tiles is rectangular and I have to put them end by end either horizontally or vertically, it could be difficult to set each panel for a tile
    thank you

    thank you both for help. I am using swing instead of applet.
    but the problem is that the tiles have to be played next to each other and there are so many of them that have to be played for 1 game.
    also you dont know whether you wanna put it vertically(when the 2 numbers on two ends of a tile are the same) or horizontally(otherwise) until it's actually your turn to play. so you can't decide the shape of the grid or position of the image before it's your turn.
    Is there a simple way to put a tile next to the previous one(vertically or horizontally) during the run time?
    Here explains how it looks after putting the tiles(omg i can't attach a pic here?)
    1.horizontally:
              |--|
    |--|--| .|--|
         |--|
    2.veritically
    |--|--| . |--|--|
    Thanks a lot :D

  • How to change the image in title bar for JFrames

    plz give me a small code to change the image of the JFrame in the Title bar.
    i know how to change the name of the title bar .
    import javax.swing.*;
    class Rathna1 extends JFrame
    Rathna1()
    super("rathna project ");
    public class Rathna
    public static void main(String ax[])throws Exception
    Rathna1 r=new Rathna1();
    r.setVisible(true);
    r.setSize(400,400);
    Like this how to change the image of the title bar
    Message was edited by:
    therathna

    hi,
    JFrame frame;
    frame.setVisible(true);
    frame.setIconImage(new ImageIcon("icons/img007.gif").getImage());
    frame.setSize(800,600);
    i think the thing u r searching is :
    frame.setIconImage(new ImageIcon("icons/img007.gif").getImage());
    ~~~radha

  • I need to know 'How do I put back The Menu Bar where it was on Top where it belongs with browser bar is now??.

    I repeat my question: "How do I put 'The Menu Bar' back where it was before. What I mean by The Menu Bar is: File,Edit, Format, View, Help it is on top where the Browser arrow is!!. I don't know how to put this Menu Bar where is belongs...

    Right click up where the menu bar should be, it will have a list of options. You will see menu bar as the top option. Just click it and it will check it off and reappear.

  • How to add an image or button to an AdvancedDataGrid cell with wrapped text alongside

    I have an advanced data grid with which i need to add either
    images or buttons to individual cells alongside the text.
    This i can do, but what i can't figure out is how to make the
    text wrap.
    Currently, I can make cell text wrap by using an itemRenderer
    which extends Text. Or, I can add an image or button to a cell by
    using an itemRenderer which extends HBox and contains an image or
    button child. To this HBox i can add a Text or Label object also,
    but i can't make the text wrap.
    Does anyone have any ideas/suggestions/solutions????
    Thanks
    Mark

    "ms10" <[email protected]> wrote in message
    news:g8jlb5$l6p$[email protected]..
    >I have an advanced data grid with which i need to add
    either images or
    >buttons
    > to individual cells alongside the text.
    >
    > This i can do, but what i can't figure out is how to
    make the text wrap.
    >
    > Currently, I can make cell text wrap by using an
    itemRenderer which
    > extends
    > Text. Or, I can add an image or button to a cell by
    using an itemRenderer
    > which
    > extends HBox and contains an image or button child. To
    this HBox i can add
    > a
    > Text or Label object also, but i can't make the text
    wrap.
    >
    > Does anyone have any ideas/suggestions/solutions????
    I'd look at the code for AdvancedDataGridGroupItemRenderer
    and try to see
    what keeps it from displaying an icon in the columns that are
    not grouping
    columns. I'd then extend it to change that and use an icon
    function.
    HTH;
    Amy

  • How do I put a hyperlink button on the Canvas in Applet

    I am tried to put a hyperlink button on the Canvas in Applet.
    But Canvas is a componet that can't contain any component.
    I hope best way that is like hyperlink of HTML , I just clicked this hyperlink in Canvas,it's automation link to directed homepage.
    Can I have any way to do that?

    You can setup Restrictions...
    Tap Settings > General > Restrictions
    AFAIK, it's not possible to attach a password for access to the Settings.

  • How could I put many song in only one album view?

    I saved a lot of folders with many songs from my PC to my laptop. When I put all of these songs into my Music Library, It happens that many songs of the same album appears as if they were separated albmus, so my cover flow view has many "albums" that are only one song.
    How can I Put these songs together again?
    Thanks a lot

    Thomas Sjöholm wrote:
    Select all songs > Get Info > Options > Part Of Compilation (Yes)
    But a couple of guest artists do not a compilation make....
    See my post HowTo: Grouping Tracks Into Albums for some detailed advice on the different issues involved in making the library play nice in both iTunes and iPod, in particular *One album, too many covers*.
    tt2

Maybe you are looking for