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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:47:52+00:00 2026-05-23T04:47:52+00:00

I use a TableViewer with two columns. The first should contain text and the

  • 0

I use a TableViewer with two columns. The first should contain text and the second an image depending on the state of the object. The label provider is a custom provider which extends LabelProvider and implements ITableLayoutProvider.

When no image is displayed, the layout is correct and the text in the first column is aligned to the left.
correct

But when at least one image is displayed the text in the first column is aligned somewhere between right and center – looks kind of ugly.

incorrect

The layout is quite simple:

availableDevicesList = new TableViewer(this, SWT.SINGLE | SWT.BORDER
| SWT.FULL_SELECTION);
availableDevicesList.setContentProvider(new ArrayContentProvider());

Table table = availableDevicesList.getTable();
TableLayout tableLayout = new TableLayout();
table.setLayout(tableLayout);

table.setLinesVisible(true);

tableLayout.addColumnData(new ColumnWeightData(3));
new TableColumn(table, SWT.LEFT);
tableLayout.addColumnData(new ColumnWeightData(1));
new TableColumn(table, SWT.RIGHT);

What causes this problem?

  • 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-23T04:47:53+00:00Added an answer on May 23, 2026 at 4:47 am

    It’s a bug in Windows API see SWT bug report. It affects only first column in table, so official workaround is to “skip” first column and set it to zero size (see last comment on bug report), but on Mac OS X table column cannot have zero size, so there will be visible first column with size 1 or something like this..

    Yeah, hate this bug in Win API too..

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

Sidebar

Related Questions

I have built a simple Eclipse plugin where a user may use a TableViewer
Use case: 3rd party application wants to programatically monitor a text file being generated
use this website a lot but first time posting. My program creates a number
Use case: I've just entered insert mode, and typed some text. Now I want
I want to use two tableviews under the segmentedcontrol. one is plain styled and
It's the first time I'm trying to use TableView in iOS and have an
Hey everybody, I'm very confused about how to use two different Cell Types in
I have two UITableview. The first one shows 3 sections with 3 row each
how to use UISegmentedControl to change datasource in tableview? with sql tables or read
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move

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.