Icon position of the af:commandToolbarButton

Is is possible to change the position of the icon on a toolbar button?
I would like to have the icon above the text.
With the skin editor I've been able to change the appearance of my toolbar buttons a lot but couldn't find any selectors for the icon placement.
Thank you,
Rasto

Rasto,
You can use commandLink in your toolbar and use something like this:
<af:commandLink>
<af:panelGrouplayout layout="vertical">
<af:image/>
<af:outputText value="my link text"/>
</af:panelGroupLayout>
</af:commandLink>
After this style the commandLink to look like a commandToolbarButton :)
Thanks,
Ansuman

Similar Messages

  • Detect topleft icon position of the JInternalFrame window

    Hi,
    How to get the topleft icon position of an internal window ? because I want to active the system menu of the internal frame by click mouse . Thanks.
    Liwei

    Can you use getLocation(...) of the JInternalFrame and then 'guess' that the icon will be (+20, +20) from the location of the internal frame? Here is a thread that does this for a JFrame:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=238132

  • Snow Leopard Finder Icons Position

    Hi!
    Sometimes, when i restart the OS the system arrange the icons positions on the left side of the screen...
    I have a lot of icons (using two monitors) and this thing is very, very unpleasant!
    Anyone solved this problem?
    The genius tech's don't have a clue...
    Regards

    Hi!
    The problem isn't in the menu/option, it seems that when you connect external discs (USB or Firewire) and restart the machine, the icons on the desktop are rearranged by the system itself losing the initial position used by the owner of the account.
    If tried some tips found in the web but didn't solve the problem.
    Regards

  • I have rearranged all icons on the second and third pages to have a just a photo on my home, but if i switch off the iphone when i restarted it all the icons come back in the old position on the home and second page. I have ios5.

    I have rearranged all icons on the second and third pages to have a just a photo on my home, but if i switch off the iphone when i restarted it all the icons come back in the old position on the home and second page. I have ios5.

    you can suggest it here - http://www.apple.com/feedback/iphone.html
    And it is only a problem if you want a blank first screen.  Personally, it would drive me nuts always having to swipe over one page to get to my apps - the only time I unlock my iPhone is to use it or run an app, so no, I have no need nor desire to have a first screen with no icons at all.
    But, if they'd put it in as an option so people like yourself can also have what they want, that's fine too    So send them your feedback (they actually do listen - iOS 5 includes a number of things people have been asking for on these forums, like being able to delete individual entries from the call history, inproved alerts/notifications, being able to opt out of all the location based data they collect,...).

  • Why do the dock items do not enlarge when I position over the icon?

    Why do the dock items do not enlarge when I position over the icon?

    Go to system preferences, click on Dock and then make sure magnification is ticked and the slider bar next to it isnt on minimun.

  • Mail Icon won't stay in the position in the dock where I put it

    I have a very strange happening on my iMac (OSX 10.5.5). The mail icon in my dock won't stay in the position where I put it. After a few seconds, it moves to the last position in the dock (before the dashed line). If my dock is at the bottom of screen, the mail icon moves to right just before the dashed line. If my dock is on the right side of screen, the mail icon moves to the bottom just before the dashed line. Each time I move the mail icon to another position in the dock, it moves back to the last position. Can anyone help me figure this out - so that I can put the mail icon where I want it to appear? Thank you. Dale

    first a question for you. are you using Mobileme? I've seen a number of posts with the same problem by people using Mobileme (which i don't have). haven't seen a resolution to this but you might want to check in the mobileme forum. If you are not using mobileme try resetting Dock preferences. delete the file homedirectory/library/preferences/com.apple.dock.plist and restart Dock by running the following terminal command
    killall Dock
    This will reset your Dock to the default and hopefully fix the issue.

  • The icons on my Google toolbar keep changing position and the stock indicators (7 of them) all lose their original references and point to Nasdaq. How do I keep my settings from changing like this?

    I recently added the Google toolbar to Firefox and set it up the way I had it using IE with my favorite web sites followed by 7 stock indicators each pointing to a different company. I have this on two separate computers and in both cases the order of the icons changed and the stock indicators all changed to point to Nasdaq. I corrected this on my system at home but do not know at this time whether it has happened again.
    == This happened ==
    Not sure how often
    == Over this past weekend.

    Firefox 8 comes out Nov 8, look for it on the 9th unless you like to try all day to see if Help>About shows an update. Actually if your anxious try mozilla.com on the 8th.

  • Problem in the game bomberman with  the position of the icon bomb

    hi
    in this code the player move with arrows in any where and when u press the space button bomb appear
    but the bomb not appear in the position where the player stay and the player go to anthor place
    please test my code to understande my problem
    import javax.swing.JFrame;
    public class Mainprogram extends JFrame {
        private MainBord mainbord;
        public Mainprogram() {
            mainbord = new MainBord();
            addKeyListener(mainbord);
            getContentPane().add(mainbord);
        public static void main(String[] args) {
            JFrame frame = new Mainprogram();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(800, 900);
            //frame.setResizable(false);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.BufferedImage;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class MainBord extends JPanel implements KeyListener {
        private BufferedImage bord;
        private JLabel bomabr_label;
        private JPanel bombar_panel;
        private ImageIcon divider_icon,bombar_icon,bomb_icon;
        private Graphics g;
        private int x;
        private int y;
        private int dividerSize = 40;
        public MainBord() {
            drawimage();
            drawComponents();
        private void drawComponents() {
            divider_icon = new ImageIcon(getClass().getResource("wall.gif"));
            bombar_icon = new ImageIcon(getClass().getResource("bombar.gif"));
            bomb_icon=new ImageIcon(getClass().getResource("bomb.gif"));
            x = (bord.getWidth() - (divider_icon.getIconWidth() + dividerSize) * 8) / 2;
            y = (bord.getHeight() - (divider_icon.getIconHeight() + dividerSize) * 8) / 2;
            for (int i = 0; i < 8; ++i) {
                for (int j = 0; j < 8; ++j) {
                    divider_icon.paintIcon(this, g, (divider_icon.getIconWidth() + dividerSize) * i + x, (divider_icon.getIconHeight() + dividerSize) * j + y);
            bombar_panel = new JPanel();
            bomabr_label = new JLabel(bombar_icon);
            bombar_panel.add(bomabr_label);
        private void drawimage() {
            bord = new BufferedImage(800, 900, BufferedImage.TYPE_INT_RGB);
            g = bord.getGraphics();
            g.setColor(Color.ORANGE);
            g.fillRect(0, 0, 1000, 1000);
        @Override
        public void paint(Graphics g) {
            super.paint(g);
            g.drawImage(bord, 0, 0, this);
            bombar_icon.paintIcon(this, g, x - bombar_icon.getIconWidth(), y - bombar_icon.getIconHeight());
        public void keyTyped(KeyEvent e) {
        @Override
        public void keyPressed(KeyEvent e) {
            switch (e.getKeyCode()) {
                case KeyEvent.VK_RIGHT:
                    x += 5;
                    break;
                case KeyEvent.VK_LEFT:
                    x -= 5;
                    break;
                case KeyEvent.VK_UP:
                    y -= 5;
                    break;
                case KeyEvent.VK_DOWN:
                    y += 5;
                    break;
                case KeyEvent.VK_SPACE:
                    x=bombar_icon.getIconWidth();
                    y=bombar_icon.getIconHeight();
                    bomb_icon.paintIcon(this, g, x+dividerSize, y+dividerSize);
                    break;
            repaint();
        public void keyReleased(KeyEvent e) {
    }the problem in the last case in the switch
    please refactor it to ucerstande how you do this .
    the picture use in my code here:
    http://www.4shared.com/file/75272822/8ecd434d/pictures.html
    thanks
    beshoy

    you're doing it all wrong
    1) don't use getGraphics()
    2) don't override paint() for swing components - override paintComponent()
    3) do all your graphics in paintComponent - not in the listener
    your problem is that the bomb should appear over the 'player' when spacebar pressed?
    if so, I've stripped your code down to just that problem.
    if this works the way you want it to, then simply modify your main program accordingly
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class MainBord extends JPanel {
        private ImageIcon bombar_icon,bomb_icon;
        private int x = 100;
        private int y = 100;
        boolean paintBomb = false;
        public MainBord() {
            setFocusable(true);
            bombar_icon = new ImageIcon(getClass().getResource("player.gif"));
            bomb_icon=new ImageIcon(getClass().getResource("bomb.gif"));
            addKeyListener(new KeyAdapter(){
              public void keyPressed(KeyEvent e) {
                switch (e.getKeyCode()) {
                    case KeyEvent.VK_RIGHT:
                        x += 5;
                        break;
                    case KeyEvent.VK_LEFT:
                        x -= 5;
                        break;
                    case KeyEvent.VK_UP:
                        y -= 5;
                        break;
                    case KeyEvent.VK_DOWN:
                        y += 5;
                        break;
                    case KeyEvent.VK_SPACE:
                        paintBomb = true;
                        break;
                repaint();
        @Override
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.setColor(Color.ORANGE);
            g.fillRect(0, 0, getWidth(), getHeight());
            bombar_icon.paintIcon(this, g, x, y);
            if(paintBomb) bomb_icon.paintIcon(this, g, x, y);
            paintBomb = false;
    class Mainprogram{
        public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable(){
            public void run(){
              JFrame frame = new JFrame();
              frame.getContentPane().add(new MainBord());
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(800, 600);
              //frame.setResizable(false);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    }

  • How can I change a user icon position?

    How can I change the position that Yosemite determines for where a user icon is positioned on the login screen? I'm the admin and I added a standard user and the icon placement for that user is first, I'm second, and Guest User is third...it does not appear to be alphabetical. I'd like to switch the first two so my user icon is the first one on the left.

    Locate a folder icon you wish to use. Select it and press COMMAND-C to copy. Select the folder you want changed. Press COMMAND-I to open the Get Info window. At the top left you will see that folder's icon. Click on it then press COMMAND-V to paste.
    If you want to create your own icons then you will need an application to do that. For example, Folder Icon Changer 3.0.7.
    Google searches will locste tons of pre-made folder icons you csn use. Some are free and some are not.

  • Hi, how can I move the "Home" icon back to the LHS where it used to be on 3?

    The home icon was on the LHS of the screen next to the forward and back buttons - can I move it back there rather than leaving it in its current position way over to the right? Thanks.

    Right click a blank part of the tab bar and then click '''Customize'''. A panel will open and while it remains on screen, you can change the layout to suit your own liking.
    You can also add buttons and toolbars from within that panel and drag stuff you don't want in there.

  • How to find icon position of currently executed VI on caller's block diagram

    Dear forum,
    I currently try to use a LabVIEV VI as a simple sequencer: Several (very slow) actions have to execute one after another. Each action is represented by a Sub-VI, some actions are executed several times. My task is to visualize the currently executed Sub-VI somehow.
    My first intention (simply manipulate the icon of the currently running VI with "VI Icon.Get as Image Data" / "VI Icon.Set from Image Data" invoke nodes) failed, because this changes the icon of ALL instances of this VI; if you use the same VI several times, the icons of all these VI are changed (see here: http://forums.ni.com/t5/LabVIEW/How-to-change-animate-icon-of-currently-running-VI/m-p/3120754/highl...
    My current approach is to use an image of the block diagram (with "VI: Block Diagram: Get Image Scaled" invoke method) within a picture control of the front panel and to work within this control. But for this I need to know the position of the icon of the currently executed VI. I know that I can evaluate Bounds and Position via the GObj properties, but how do I find the currently running VI (note that a VI may reside several times on the block diagram, so the name of the VI is not unique)? IMHO the simpliest way would be if a VI could find its icon on the caller's block diagram itself when executed...
    It's clear that this position is not the position on the picture yet, but this conversion is a small piece of work...
    Regards,
    cpschnuffel
    Solved!
    Go to Solution.

    Yamaeda wrote:
    Run it in highlight mode, done.
    Sure if you don't mind having functional checks taking hours instead of minutes...okay maybe that is exagerating for a simple VI like this, but it would increase cycle time.  Honestly I think the best solution would be to use the helper VI that was mentiond before, which keeps track of what VI is running.  You can of course use scripting to get the block diagram image, but there isn't a good way to know what exact VI is running using VI server.  Here are a few discussions.
    https://lavag.org/topic/16660-how-to-get-actual-vi-execution-state/
    https://decibel.ni.com/content/thread/18687
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Sticky notes icon position

    Is there any way to position sticky notes icon more accurately on the page?
    Default anchor point of the note is the center of an icon, not the tip of the arrow below or some corner. Consequently, the icon covers some of the text or small graphics and at low zoom level you can't see exactly which text the note is concerning.
    We lose a lot of time zooming in and out on pages with large amount of relatively small text, icons or pictograms and with many comments on it, sent from our customer. Because they have smaller monitors, they see the position of the note a bit different than us and it takes time for us to figure out what they're actually commenting.
    This has been a pain in the back for us as far as I can remember.
    If there is nothing we can do, let this post be a sort of a feature request. ;)
    Thanks,
    Tomaz

    Thanks. Of course I know the note can be moved.
    The problem is, if the icon is on top of a block of small text, the icon can cover 3 or 5 lines of text and you have too zoom in to see which line it belongs to. I can't move it before I see where it belongs.
    It becomes annoying if you have 20+ notes on a page and 60 pages of text.
    I hope I've explained my problem understandably.

  • Desktop icons position not kept

    Hi. I'm using 10.6.2 and sometimes (not all) when I start my machine, the desktop icons (which I have arranged by snap to grid) are not where they used to be the last time I was with the cmputer on but they all show up aligned on the right of the screen, next to the hard drive icons in columns. I did not yet find a patteen like "this only happens if I have the computer turned of more than X x or y hours". Sometimes I leave for a couple of days and the icons are good when I come back. Sometimes just a few hours with the computer turned off and the icons position is not kept. Other time is the other way around.
    Any ideas? Someone with the same issue?
    Thanks.

    I had this problem, too, and brought it up with a "Genius" this morning. His solution -- which seems to have worked -- was first to show hidden files (using a utility or Terminal, as described elsewhere) and then delete the .DS_Store file which now appears on the desktop. The file rebuilt itself, and the icons now stay where I put them after a restart or relaunch of the Finder. You should rehide the hidden files once you've done this.
    I had previously tried resetting the PRAM and deleting a couple of plist files from the Preferences Library, which other people had recommended, but those solutions didn't work. This did. Thanks, Geniuses in Emeryville.
    Rick

  • Icon position syntax

    Hello,
    I try to implement an experiment in which a same picture has
    to be repeated randomly at different (predefined) positions on the
    same display, and that during the whole experiment... Has somebody
    an idea to help my dealing with this problem?

    "Alain Chav" <[email protected]> wrote in
    message
    news:g11bdf$7k1$[email protected]..
    > Hello,
    >
    > I try to implement an experiment in which a same picture
    has to be
    > repeated
    > randomly at different (predefined) positions on the same
    display, and that
    > during the whole experiment... Has somebody an idea to
    help my dealing
    > with
    > this problem?
    >
    One way you can do it is to use dibapi. Look at the Screencp
    showme for more
    details on that. Another way you can do it is simply have as
    many icons as
    predefined positions, or one icon with images that are
    dynamically linked
    with variables to the image. Turn the copies of the image on
    and off by
    changing the variables.
    If you only need to move ONE copy of the image to the
    predefined position,
    you can either use a motion icon or use variables in its
    position x and
    position y fields and erase it, reset the variables, and
    redisplay it.
    HTH;
    Amy

  • Icon view, icon position not kept

    Most of my files are displayed in icon view. I have group them in positions easy to remember.
    Since upgrading to SL every now and then a folder (or two) will have the icons ordered by name and positioned in a grid even if I haven't give that command.
    Since this is annoying is there a solution to avoid that finder behavior?

    ok, that may be the reason for not keeping the icon positions but who except the finder will be responsible for a corrupt .DS_store file?
    There are other Finder problems not only on my MacBook Pro but also on the MacBooks running in our household since we upgraded to SL. These problems usually result in a spinning ball of death and one has to press the ON switch to restart the Mac.
    I haven't seen such issues in all previous upgrades from Mac OS X onwards. This is really disappointing since the SL upgrade was announced as a minor one but now it turns out as a nightmare to me.

Maybe you are looking for

  • Crystal Report ADO Connection Error

    I have a Crystal Reports created against an MS SQL Server DB using an ADO Connection (crdb_ado.dll). I am using a hardcoded user ID and password for logging into SQL Server, everything works fine when I log from Crystal Reports client, I am able to c

  • Time Machine:  When it's backing up, can't open new apps/shutdown/restart

    Running Snow Leopard. I just did a MS Office 2008 Service pack 3 upgrade. And noticed that while Time Machine is backing up, I can no longer open any new apps or shutdown/restart the macbook. Nothing responds anymore. Related issued: If it's been sle

  • After making color adjustments, the reference monitors lag behind by about 10 to 15 seconds.

    I've tried a new sequence, clearing cache, reinstalling, new project, nothing seems to help. Any advice? This only seems to be happening in one project - the one project I NEED to work on. This is making applying color correction/grading impossible a

  • Bridge question

    I just upgraded to Creative Cloud.  I have been using PS6 and Bridge.  I used to be able to click on the image, in Bridge, and it would open in Photoshop.  This is not happening in Bridge CC.  What can I do to make this work in CC?

  • QoQ unsupported numeric type??

    Hi, Has anyone successfully used CF_Select from Masrizal? I bought the code only to find that it's not working with dynamic options. Would appreciate suggestions on how to get this to work. TIA THis error is coming from this code in the Tag. <cfquery