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

The Archive Base Latest Questions

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

Note: This problem occurs only on Mac, on Windows works fine. I have a

  • 0

Note: This problem occurs only on Mac, on Windows works fine.

I have a SWT Text widget that I want quite large text inserted into.

//simplified large string from StringBuilder
String something="";
for(int i=0;i<10;i++){
    something += smp1+"\t"+smp2+"\t"+smp3+"\n";
}

final Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
text.setBounds(10, 50, 880, 280);
text.setText(something);

The issue is that although there is way too much space (880px), the text breaks somewhere on 400px if there are more than two “\t” (tab) characters in the line. When writing in the textbox with ” ” (space), the line continues as it should, and doesn’t wrap.

Outputing the string to console shows it fine, so I don’t think that the issue is in the string, but rather in the Text control.

I tried everything I could think of, and no luck in solving it.

Any help is appreciated.

  • 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-31T16:20:18+00:00Added an answer on May 31, 2026 at 4:20 pm

    Widgets in SWT are drawn natively by the OS – that is sort of the point of this library.
    That’s why OS-specific quirks are “preserved”.

    But while Text is drawn natively, StyledText is not, it’s drawn “by hand” by SWT in order to provide advanced features for all supported platforms.

    So you might want to try StyledText instead – yes, that’s only a workaround, and has the theoretical drawbacks of a non-native widget, like poorer performance, different behaviour, and so on, but most probably you won’t notice any difference. But if you’re lucky, it fixes your issue.

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

Sidebar

Related Questions

NOTE: I have solved the majority of this problem but have run into a
Has anyone seen this type of IE display problem? Example http://xs133.xs.to/xs133/08465/ie_problem910.jpg.xs.jpg Note that it
UPDATE: I've realized that the below problem only occurs if the user has already
I'm trying to track down a problem in a (C++) Windows application that occurs
Note: this is a different problem to https - it's related to privacy security
NOTE: This is a solution for Project Euler Problem 14 . If you still
[Note: There is another thread about this problem but it did not answer the
(Note: This is for MySQL's SQL, not SQL Server.) I have a database column
Note: This is the opposite direction to most similar questions! I have an iPhone
A calculator program I have created works almost perfectly with the exception that Math.Sin()

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.