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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:49:02+00:00 2026-06-06T14:49:02+00:00

From this link the author suggested: table.setWidth(100%, true); table.setColumnWidth(nameColumn, 35.0, Unit.PCT); table.setColumnWidth(addressColumn, 65.0, Unit.PCT);

  • 0

From this link the author suggested:

table.setWidth("100%", true);
table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
table.setColumnWidth(addressColumn, 65.0, Unit.PCT);

for CellTable column width to work, however in my project the nameColumn contain an extra long text, then this column will occupy almost all browser view, apparently the column width does not work, Could anybody shed some light on this?

The nameColumn defined as below:

        TextColumn<Person> nameColumn = new TextColumn<Person>()
        {

            @Override
            public String getValue( Person object )
            {
                return object.getUserName();
            }
        };
  • 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-06-06T14:49:03+00:00Added an answer on June 6, 2026 at 2:49 pm

    You can use following method to set custom style on the column cell:

    nameColumn.setCellStyleNames("name-cell");
    

    The following structure is generated(in DOM) for the cell:

    <td class="xxxxxxxx xxxxxx name-cell">
       <div style="outline:none;">Very long name ...</div>
    </td>
    

    So you have to define following css classes to set the wanted style and limit the cell and text size:

    .name-cell {
    ...
    }
    
    .name-cell div {
    ...
    }
    

    Update

    I tested the method table.setColumnWidth( and works well for me.
    Here is how I do it:

    • Table constructed by UI binder

    • Create columns

    • Set table width

    • add columns to the table

    • set column width (with table.setColumnWidth )

    When you calculate the cell width don’t forget to take padding into account.

    Used GWT 2.4

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

Sidebar

Related Questions

I have borrowed code from this link PHP regex templating - find all occurrences
I recently downloaded an event calendar from this link: http://www.asp.net/downloads/starter-kits/club/EventCalendar.zip I want to use
When I have download sample code from this link and than try to build
Currently I'm working on to display Epub content in UIWebview . From this link
following this link i was able to load and read pixels from a .gif.
I'm having this link statement: List<UserGroup> domains = UserRepository.Instance.UserIsAdminOf(currentUser.User_ID); query = (from doc in
How do other people debug HTTPS sites from Visual Studio 2008? This link seems
I was reading thourg this example (link) ... From the description, this seems paradox
How to create UIImageView with image from a link like this http://img.abc.com/noPhoto4530.gif ?
I need to lift the YouTube link from some text which looks like this:

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.