Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6582969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:20:53+00:00 2026-05-25T16:20:53+00:00

Is there a way to add image or icon inside a GWT TextBox widget?

  • 0

Is there a way to add image or icon inside a GWT TextBox widget?

EDIT: The image is required to have a ClickHandler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:20:54+00:00Added an answer on May 25, 2026 at 4:20 pm

    If you are only interested in visually adding an icon , you can add it using css such as :

    background-image:url('icon.png');
    background-repeat:no-repeat;
    

    UPDATE :

    If you need to add events to image, you can bind an image and a textbox in a horizontal panel as in @Sandro Munda’s answer. Also another method is to use an absolute panel and css to make the image and the textbox overlap as such :

    public class TextBoxWithImage extends Composite {
        public TextBoxWithImage() {
            AbsolutePanel p = new AbsolutePanel();
            p.add(new TextBox());       
            Image image = new Image("images/down.png");
            image.getElement().getStyle().setMarginLeft(-20, Unit.PX);
            p.add(image);       
            image.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    Window.alert("Clicked!");
                }
            });
            initWidget(p);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there a way to add an image to a regular <input type =
Is there a way to uncache an image file? I don't want to add
I want to add an image icon in expandable list view .I have seen
Is there any way to add an image to the right of Android's ListView.
Is there any simple way to add a image border around an image? Reason
Is there an easy way to add an image to push notifications? I cant
Is there any way to add an image that is loaded from db to
is there a way to add an existing classic ASP webapp into a solution
Is there a way to add some custom font on a website without using
Is there a way to add assembly attributes to a Managed C++ assembly? In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.