Questions tagged [styledtext]

The StyledText widget is a customizable widget that can be used to display and edit text with different colors and font styles.

A StyledText is an editable user interface object that displays lines of text. The following style attributes can be defined for the text.

  • foreground color
  • background color
  • font style (bold, italic, bold-italic, regular)
  • underline
  • strikeout

Related Links:

71 questions
0
votes
1 answer

Styled Text setText have bad perfomance

I have little problem with StyledText. When I use setText() Method and text is long, I must wait few seconds for render that text. Is there any method what can I use to speed up showing this text?
John Smith
  • 105
  • 1
  • 2
  • 10
0
votes
1 answer

Java SWT StyledText, changing the starting line number

I am currently using a StyledText widget to display some "excerpt" of the actual code, such as a method definition within a Java file. My problem is that the line number shown in my StyledText always start with 1, which is different from the actual…
yyoon
  • 3,555
  • 3
  • 21
  • 17
0
votes
1 answer

Text wrap in TableItem

This is about wrapping text in a table item, I know table item doesn't support WRAP. But I am looking at possibility of embedding a StyledText inside the tableitem. Is it possible?
SomeDude
  • 13,876
  • 5
  • 21
  • 44
0
votes
0 answers

Changing Font in JTextArea for new text only

I am using a JTextArea for a text editor program. Text in the text area is provisionally set in the constructor using: teaxtArea.setFont("Serif", Font.PLAIN, 14); I have added event handlers that allow user to select various font styles and…
dancingbush
  • 2,131
  • 5
  • 30
  • 66
0
votes
1 answer

SWT StyledText - auto highlight (or autoselect)

I am using SWT StyledText to populate the responses to my queries in my plugin. I learnt how to autoscroll to the bottom, but couldn't figure out the correct way to auto select the last entry. I have managed to do this in an un-optimized way, i.e…
user2033666
  • 109
  • 1
  • 11
0
votes
1 answer

SWT StyledText getCaretOffset giving wrong line number

I'm trying to make the bullet of active line have a highlighted background. I'm using int activeLine = styledText.getLineAtOffset(styledText.getCaretOffset()); To get the like that is currently active. This seems to work except when I hit enter…
Alchitry
  • 1,369
  • 1
  • 16
  • 29
0
votes
1 answer

Is it possible to dynamically update a SWT StyledText widget based on model changes?

I'm working on the SWT StyledText widget. I tried the setStyleRanges() approach and the LineStyleListener approach by providing text. Now I'm wondering if there could be a possibility to use StyledText not with a String as input but with custom…
G4ry
  • 77
  • 1
  • 8
0
votes
0 answers

Use custom bitmap instead of character glyph in font

I have a StyledText and I'm trying to use a custom bitmap for a tab character instead of the character glyph used in the font. Is there any way to replace one of the glyphs? If not, then is there a listener that is called when each character is…
Ava
  • 2,038
  • 3
  • 23
  • 45
-1
votes
1 answer

Calculate StyledText height using text content

Given a StyledText, initializied with SWT.MULTI and SWT.WRAP, I need to calculate the appropriate height hint based on the appropriate lines count for the content. In this image you can see how the editor is resized when the content changes The…
LppEdd
  • 20,274
  • 11
  • 84
  • 139
-1
votes
1 answer

Java SWT StyleRange

I am trying to highlight Java syntax using StyleRanges in SWT StyledText boxes. Here is the relevant code. String code = text.getText(); int fromIndex = 0; String keyword = "public"; if(code.toLowerCase().contains(keyword.toLowerCase())){ …
Irtza
  • 33
  • 1
  • 6
-1
votes
1 answer

Implement Java code formatter in a StyledText area

I want to try and implement a key binding much like Ctrl + i in eclipse for a StyledText area so that the Java code in the area will be formatted correctly. I've been looking around for a while and can't seem to find much information on how to…
SteWoo
  • 458
  • 1
  • 8
  • 21
1 2 3 4
5