Results 1 to 2 of 2

Thread: Adding an Image

  1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    7
    Vote Rating
    0
      0  

    Default Adding an Image

    Hi,
    I want to add an image(say delete) at the beginning of each row. How can we do this using GXT.

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    413
    Answers
    20
    Vote Rating
    21
      0  

    Default

    Do you mean in a GXT grid?

    You can use a GWT ImageCell or ImageResourceCell. Take a look at the Cell Grid example here: http://www.sencha.com/examples/#ExamplePlace:cellgrid for how to add widgets to grids.

    Then just add it as the first column.

    That said, it sounds like you want to respond to click events (since you say "delete"). If this is the case, you will probably want to use a ButtonCell instead with no text and just your ImageResource. I've not tried to use a ButtonCell with just an image so I don't know off the top of my head if this works.
    Last edited by icfantv; 23 Aug 2013 at 7:22 AM. Reason: for clarity

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •