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 750721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:35:01+00:00 2026-05-14T14:35:01+00:00

This is an extract of my code at the moment: VerticalPanel mainPanel = new

  • 0

This is an extract of my code at the moment:

VerticalPanel mainPanel = new VerticalPanel();
RootPanel.get("messages").add(mainPanel);

HorizontalPanel tempPanel = new HorizontalPanel();
tempPanel.setSize("100px", "200px");

Label content = new Label("AAAveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylongtextZZZ");
content.setWidth("50px");
content.setWordWrap(true);

tempPanel.add(content);
mainPanel.add(tempPanel);

The label displays but it does not wrap.
If I insert a space it seems that word wrap works, but I guess I want character wrap.
Any ideas?

I do not want a horizontal scrollbar.

  • 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-14T14:35:01+00:00Added an answer on May 14, 2026 at 2:35 pm

    This is really more of a CSS question, than a GWT question. setWordWrap() is typically used to un-set word wrap on a div — word wrapping (on whitespace) is the default.

    What you want to do is add some CSS to the Label that says { word-wrap: break-word; }

    More information here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a very hard to explain question and I hope my code extract
The purpose of this code is to pull upgrade.zip from a central server, extract
Following the directions at this question , I have some code running to extract
Can anyone explain what this code extract is doing? My first guess was that
This code extract is from database.sql file that comes with KohanaJobs app. CREATE TABLE
I got a code review remark today to extract this anonymous class into a
I have this code to extract title: soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) title = str(soup.html.head.title.string).lstrip(\r\n).rstrip(\r\n) Some
I have this extract of C# source code: object valueFromDatabase; decimal result; valueFromDatabase =
I am using this code to extract a password protected RAR file. I am
I need to extract this line of code from a script i am retrieving

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.