Button with Icon in TableControl

Hello,
in my ModulePool I have a TableControl which contents in each line FileNames with FileExtensions.
I have created a Icon-Field in each line which displays the correct Icon (if it exists) for the FileExtension (e.g. ICON_PDF, ICON_BMP ...).
Then I created a button in each line to open the file.
What I want now is that the button changes its icon.
How can I achieve this?
In my PBO for this Dynpro I have the following code but this doesn't work:
LOOP AT gt_zdrud INTO gr_zdrud.
* FuBa zur Ermittlung der Dateierweiterung
  CALL FUNCTION 'CRM_IC_WZ_SPLIT_FILE_EXTENSION'
    EXPORTING
      iv_filename_with_ext = gr_zdrud-zzdoc
    IMPORTING
      ev_filename          = lf_filename
      ev_extension         = lf_extension.
  TRANSLATE lf_extension TO UPPER CASE.
  CASE lf_extension.
    WHEN 'PDF'. MOVE icon_pdf TO gr_zdrud-icon.
    WHEN OTHERS.
      MOVE icon_display TO gr_zdrud-icon.
  ENDCASE.
  MODIFY gt_zdrud FROM gr_zdrud.
ENDLOOP.
The table GT_ZDRUD is the table which fills the TableControl.
The field GR_ZDRUD-ICON is the field which holds the name of the icon and is defined in the dynpro as PUSH(button).

No solution.
Closing this.

Similar Messages

  • Buttons with Icons

    Is it possible to use an icon for a button and then not have
    the button
    outline visible?
    In other words, I want to use an image as the icon on a
    button but stop
    the main button outline displaying so the image is the only
    thing
    visible as part of the button.
    Mark

    Mark Tomlinson wrote:
    > Is it possible to use an icon for a button and then not
    have the button
    > outline visible?
    >
    > In other words, I want to use an image as the icon on a
    button but stop
    > the main button outline displaying so the image is the
    only thing
    > visible as part of the button.
    >
    > Mark
    Or would I just use an image set to buttonMode="true" ??
    Mark

  • Back to Buttons and Icons.

    With someone's help on the this forum I figured out how to create Buttons with icons in AcrobatX.  In Acrobat 9 I could place a PNG image into a PDF then click the button icon  and size it to fit the icon.  And when placed on a webpage would show up in the PDF on the webpage.
    Try as I might  with the new system I create using the new system placing an icon with the button. But when pdf is uploaded to website all that shows is the transparent button , but no icon is to be shown If I knew Acrobat 9 would would on OSX.7 when it came out I would remove Acrobat X and go back to 9. Acroat x is the most frustration program I have every dealt with since I have been using Mac (SE/30). Why do they have to fix a feature that worked fine and was easy to use and make it a PIA to figure out.
    I am to the point I am ready thow my Brand new Intel Mac out and stomp on it.  and go back to my PowerPC Machine.

    George_Johnson wrote:
    Phil,
    Can you provide a link to a PDF that behaves this way?
    sure: go to my website :  http://www.phillipmjones.net.
    click on the link Ancestry_Fulcher_Harris
    click on any of the links.  I can send you if you provide me an email address the original PDF.
    And the button icon file is included in the directory on my website. I've try  with the appearance set bot are Trans parent  or with white fill. I've tried  icon only lanel on Label on to Lapbel on bottom every combination the button works.
    I not one to let an application get the best of me. But this is a Pain.
    Message was edited by: Phillip Jones
    wrong link name stated.

  • Customed JButton size with Icon

    Hi,
    I want to place a few buttons in a JPanel in a fashion that it looks like a toolbar, my problem is that these buttons (with icons) take the size they want.
    But I would like to size them like I want (they would have all the same size though).
    Is there any layoutmanager that would let me do that or any other suggestions!?
    Thanks.

    I'm not sure this is what you want but...
    You can use the setPreferredSize method on the buttons and make sure they have enough room.
    Also, the GridLayout places components in areas of equal size.
    Andrew

  • Make a button with an icon

    Hi all.
    I have a new problem. I want to make a button as an icon e.g. when I push a button to open a file I want to display the button with the icon.
    I'm on devsuite 10g.
    Can someone tell me which are the steps to follow to do this???
    Thank,
    Fabrizio

    I have restarted the form builder and the http
    listener but I don't see the icon on my button.
    Here is the value of my
    UI_ICON_EXTENSION
    .gif;.jpg;.ico;.GIF;.JPG;.ICO
    And this is the value of my
    UI_ICON
    c:\oracle\devsuite10g\reports\plugins\resource;
    C:\ORACLE\devsuite10g\cgenf61\ADMIN\ICONS\PC;
    c:\oracle\devsuite10g\forms\java\icone.jar
    Fabrizioyou cause a Vertigo for your Forms Builder :-)
    Try to specify only one extension, .ico in Forms Builder are more accurate in size. Try it.
    Tony

  • I just installed Lightroom 5. It will not open. I have clicked on the desktop icon as well as the start menu button with no results. What am I missing?

    I just installed Lightroom 5. It will not open. I have clicked on the desktop icon as well as the start menu button with no results. What am I missing?

    I had the same problem, and I believe it is caused by having the Creative Cloud application doing the updating of LR.  I "fixed" the problem by:
    1. Uninstall Lightroom
    2. Download the stand-alone LR 5.6 installer from Product updates
    3. Install LR 5.6 using the stand-alone installer, instead of using the Creative Cloud application.

  • ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.

    Hi all,
    In our SAP system (6.0 ECC) we've noticed the following behaviour:
    In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
    We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
    It's possible to have tha same functionality in this new version like in 4.7?
    Regards.
    Edited by: Ole ES on Nov 17, 2010 6:05 PM

    Hi,
    Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
    I think the integrated Excel mode shows '@08@'.
    Best regards,
    Guillaume

  • Buttons with images in web!!! Please help-me!!!!

    I want to publish mine forms 6i in web. They have buttons with figures. I already converted the figures of .ICO for .GIF. I already read diverse papers on the subject but I did not understand them. What I must make now?
    I need step-by-step that to make now, therefore I have stated period to carry through this task and is if depleting. Who to know, please says which archives to me must edit, where to place the figures, etc.
    Thanks!!!!!

    Joao,
    There is Registry.dat file in which there are two items:
    default.icons.iconpath=
    default.icons.iconextension=
    My Registry.dat contains this:
    default.icons.iconpath=/nis-img/
    default.icons.iconextension=gif
    The url /nis-img/ is defined in httpd.conf (I use Apache).
    kind regards,
    Ivan
    I want to publish mine forms 6i in web. They have buttons with figures. I already converted the figures of .ICO for .GIF. I already read diverse papers on the subject but I did not understand them. What I must make now?
    I need step-by-step that to make now, therefore I have stated period to carry through this task and is if depleting. Who to know, please says which archives to me must edit, where to place the figures, etc.
    Thanks!!!!!

  • Problem with Icons

    Hi!
    I'm trying to make a chess game, and I'm having the following problem.
    I have a JLayeredPane that contains a JPanel with other 64 JPanels inside. The pieces are JLabels with Icons.
    The problem is that when I begin a new game, the chessboard appears empty, with no pieces whatsoever, even though those labels are in place.
    If I try to resize just for a bit the main frame, the pieces appear on their positions just like they should in the first place.
    I've tried everything, but they just refuse to appear until I resize the frame (I should add that the chessboard is big enough for the icons to fit, so it is not this .... ).
    Can anyone help?

    So here goes:
    I have an intro frame that has a new game button. When the Button is pressed, I create the main frame, I put in the JlayeredPane and all the other panels and pop up a JDialog message, in which I request certain info. This dialog has an OK button, which should add the labels (with the icons) to the panels on the chessboard.
    I don't think the layout creates this problem, because I've seen it working with exactly the same stucture. The only difference I could see was the dialog box. So I'm guessing this dialog is creating the problem.
    PS: I don't have the code here, I'll get back with that later on.....

  • CS6 - Custom Cursor & Button's icon

    I am trying to display a custom cursor when mouse is moving on a button which has icon.
    But the button's icon is always in front of my cursor image.
    How to make my cursor image on top?
    Belows is my code. Please tell me what's wrong.
    Thank you!
    <mx:Application... creationComplete = "init()>
    private var MyCursor:Shape = new Shape();
    private function init():void{
        // draw custom cursor
        MyCursor.graphics.clear();
        MyCursor.graphics.lineStyle(2, 0xFF0000, 1,true);
        MyCursor.graphics.drawCircle(0,0,6);
        MyCursor.graphics.moveTo(-3,-3);
        MyCursor.graphics.lineTo(4,4);
        MyCursor.visible = false;
        // add to the layer
        CursorLayer.addChild(MyCursor);
    private function ShowCustomCursor(e: MouseEvent):void
        Mouse.hide();
        MyCursor.x = e.stageX;
        MyCursor.y = e.stageY;
        MyCursor.visible = true;
    private funtion HideCustomCursor(e:MouseEvent):void
        Mouse.show();
        MyCursor.visible = false;
    <mx:UIComponent id = "CursorLayer" x ="0' y="0" width ="1000" height = "1000" blendMode="layer">
    <mx:Button id="btnTest" x="50" y="5" width="28" height="20" buttonMode="true"
    icon="@Embed(source='assets/btnTest.png')"
    mouseFocusEnabled="true"
    mouseMove="ShowCustomCursor(event)"
    mouseOut="HideCustomCursor(event)"
    tabEnabled="false"
    useHandCursor="true"/>

    that's because your cursor is sporadically moving over your interactive objects interfering with their mouseevents.
    to remedy, disable the mouseEnabled property of your cursor.

  • Replace Buttons with Images.

    Folks,
    I have buttons in my application which perform a certain functions
    by clicking on them.
    I want to replace the buttons by gif/jpg images,so that when the
    user clicks on them,it does the same set of functionality as discussed
    above.
    HOW CAN I REPLACE THE BUTTONS with Gif and implement the actionListener??

    Hello,
    there are several methods to set the icon for the button like setIcon and setRolloverIcon etc. You better setContentAreaFilled(false) if you want an icon-only button. Have a look at [url http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/AbstractButton.html]AbstractButton for further information.
    Regards,
    Tim

  • Jquery + json generate html buttons with condition

    Hi all,
    My need is to generate buttons with conditions described in json. Help me please, I’m newbie.
    Here is my json code (it is valid, but does not work with html code below) :
        "Caption": "Module caption",
        "IconsDirectory": "C://Images/",
        "Buttons": [
                "Conditions": [
                        "ConditionText": "1 == 1",
                        "ButtonText": "Text1",
                        "Visible": true,
                        "Colors": {
                            "FontColor": "#FFFFFF",
                            "BGColor": "#00FF00"
                        "Size": {
                            "Width": 200,
                            "Height": 50
                        "Icon": {
                            "FileName": "Smile.png",
                            "Width": 16,
                            "Height": 16
                        "Url": {
                            "UrlAddress": "http://www.google.com",
                            "OpenNewWindow": true
                        "JavaScriptAction": {
                            "Text": "alert('ok');"
                        "ConditionText": "2 == 2",
                        "ButtonText": "Text2",
                        "Visible": true,
                        "Colors": {
                            "FontColor": "#FFFFFF",
                            "BGColor": "#00FF00"
                        "Size": {
                            "Width": 200,
                            "Height": 50
                        "Icon": {
                            "FileName": "Smile.png",
                            "Width": 16,
                            "Height": 16
                        "Url": {
                            "UrlAddress": "http://www.google.com",
                            "OpenNewWindow": true
                        "JavaScriptAction": {
                            "Text": "alert('ok');"
    html code:
    <html>
    <head>
    <title>SMButtons</title>
    [removed][removed]
    [removed]        
    //When document loaded.
    $(document).ready(function(){  
    // Get data from file as JSON
                $.getJSON('weekendtask.json', function(data) {
            var buttons = data.Buttons;
               $.each(buttons, function(key, val)
                        $('<li><input type="button" value="'+ val.ButtonText +'"/></li>').appendTo('#ulObj');
       [removed]
    </head>
    <body>
    <br>
    <br>
    <div>
    <ul id='ulObj'>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    </ul>
    </div>
    </body>
    </html>
    Also I would like to show here my working code (generating html buttons from json without condition).
    json code (it works) :
        "Caption": "Module caption",
        "IconsDirectory": "C://Images/",
        "Buttons": [
                "TText": "google",
                "JavaScriptAction": "alert('google')"
                "TText": "microsoft",
                "JavaScriptAction": "alert('microsoft')"
                "TText": "yahoo",
                "JavaScriptAction": "alert('yahoo')"
    html code (it works) :
    <html>
    <head>
    <title>SMButtons</title>
    <script src="jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">                 
    //When document loaded.
    $(document).ready(function(){  
    // Get data from file as JSON
                $.getJSON('Module.json', function(data) {
                // Set json data from file to variable 'persons'
        var buttons = data.Buttons;
        var icondir = data.IconsDirectory;
        // For each item of variable person append to ul list
               $.each(buttons, function(key, val)
                        //$("<li><input type='button' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' style='"+ val.Style +"' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' value='"+ val.TText +"'/></li>").appendTo('#bbb');
                        //style="height: 25px; width: 100px"
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
                        $('<li><input type="button" onClick="'+ val.JavaScriptAction +'" value="'+ val.TText +'"/></li>').appendTo('#ulObj');
        //var knop = data.Knop;
        // For each item of variable person append to ul list
               //$.each(buttons, function(key, val)
                        //$("<li><input type='button' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' style='"+ val.Style +"' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#bbb');
                        //style="height: 25px; width: 100px"
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
       </script>
    </head>
    <body>
    <br>
    <br>
    <div>
    <ul id='ulObj'>
    <li>1</li>
    </ul>
    </div>
    <br>
    <div>
    <ul id='aaa'>
    <!--<li>1</li>-->
    </ul>
    </div>
    <!--<button type="submit" style="height: 95px; width: 550px"> </button>-->
    <!--background: url('img/submit_button.jpg'); background-position: center; background-repeat: no-repeat;  background-color:Transparent;-->
    <div>
    <ul id='bbb'>
    <!--<li><img src="img/submit_button.jpg"/></li>-->
    <!--<li>Button caption</li>-->
    </ul>
    </div>
    </body>
    </html>

    What you are saying makes great sense. It's just the mechanics behind what you've said that I'm unclear about.
    <p>
    Are you saying to create another button within the same region with the same attributes/position, so they overlay each other? Then set the conditions on both buttons?
    <p>
    If I understand the above correctly, then how do I set the conditions? I guess I'm asking where do I place the SQL statement and how does the results relate to the button conditions?
    <p>
    Thanks for the help,
    David

  • Mail stopped working. Now get blank screen with icons (delete, file, forward, etc) at top. Then goes blank. iPad 2 purchase 12/11

    Mail stopped working. Now get blank screen with icons (delete, file, forward, etc) at top. Then goes blank. iPad 2 purchase 12/11

    Try to reset your ipad and/or force quit the mail app
    Reset
    Hold down the sleep and home keys for about 20 seconds. When you see the silver apple, let go and let it reboot. No data will be lost.
    Force close an app
    Double tap the home button. When you see the app previews on the screen scroll sideways if needed to get the preview in question on the screen. Flick that preview up and off the screen to close the app. Single tap the home button or home screen preview to exit the mode.

  • JButton with Icon question

    In the Toolbar I have a JButtons. I created the JButtons with Icons.
    When I click on a button it is putting a dotted line right around the Icon. How can I get rid of that? Thanks.

    You're talking about the focus rectangle. If memory serves in the SwingSet demo there's an entire panel devoted to buttons and such. You can find something there to help you. The toggle in the example is labeled "Paint Focus", and it does what you want.

  • Paint of Focus don't work on  Buttons  with Borders/or opaque Buttons! Why?

    Hi, if I use the Metal Look&Feel Buttons with Borders (RaisedBevelBorder) never paints the focus, under the Windows L&F only raised TextButtons don't paint.
    The default of true for the value FocusPainted is unchanged
    and they are all in the FocusTraversePolicy (without Borders it works fine).
    If you set Buttons or the surrounding panel with images or text opaque (without Borders) you face similar problems.
    This may caused by the reason that the layer, which is needed for the paint of the focus is never painted.
    But that's not the behavior I expected.
    Has anyone a clue to solve this problem or is it a bug?
    Greetings Michael

    Hi, I have modified your program a little bit to demonstrate the problem. Please replace the gif with any small image.
    setOpaque doesn't make any problems -- sorry (The focus seemed to be consumed by my Background).
    But the problem seems to be, if you shrink the buttons to their preferred sizes (That may the cause why the focus isn't so good visible, if you use pack).
    In my example it makes no difference.
    Thanks for your help.
    I'm looking forward to your reply.
    Greetings Michael
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class ButtonTest extends JFrame
        public ButtonTest()
            JButton button1 = new JButton("Raised Bevel Border");
            button1.setBorder( new BevelBorder(BevelBorder.RAISED) );
            //button1.setOpaque(false);
         setContentPane(new JPanel());     
         // The panel shrinks the Button and that seems to be the clue
         JPanel p1 = new JPanel();
         p1.add(button1);
            //getContentPane().add(button1, BorderLayout.NORTH);
         getContentPane().add(p1);
         //JButton button2 = new JButton( "Default Border" );
         ImageIcon icon = new ImageIcon("add.gif");
         JButton button2 = new JButton( icon );
         // That's important, the shrink prevents also the paint of the focus.
               button2.setPreferredSize( new Dimension(icon.getIconWidth(), icon.getIconHeight()) );
            getContentPane().add(button2);
        public static void main(String[] args)
            ButtonTest frame = new ButtonTest();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            //frame.setSize(200, 100);
            frame.pack();
            frame.setVisible(true);
    }

Maybe you are looking for

  • ISE - EAP-TLS and then webAuth?

    Hello everyone! I have a little bit of a complex dilemma in an ISE deployment and I am trying to lean more on how it works technically. Long story short: I am trying to do both machine and user authentication / authorization (per requirements from ou

  • How to use jack connection kit?

    Im trying to get my external soundcard working. first of i start ffado-mixer. it recognize my soundcard and everything. I then type sudo jackd -d firewire in the terminal and get this output : JACK compiled with System V SHM support. loading driver .

  • Synchronizing N95-1 to GroupWise using PC Suite?

    Hi, We recently purchased some N95 mobile phones at work and people would like to be able to synchronize their calendar entries with those on their PC. They only need to do this when in the office, and connecting using the USB lead. The Nokia PC Suit

  • Ipod touch screen not working even after resetting to factory specs

    ipod touch screen not working even after resetting to factory spec.  lock symbol appears at top

  • Jre 6 update 20 on 64-bit Windows 7 - Could not load the Java Virtual Machi

    Hi, I download and installed jre 6 update 20 (64-bit) on Windows 7 (64-bit). I ran a 3rd party Java application and I got the error saying 'Could not load the Java Virtual Machine.'. I found that the jvm.dll is installed under c:\Program Files\Java\j