I need to show tool tip text in multiple lines, but setTitle() method in gwt is simply ignoring the \n character?
Is this possible to achieve?
If you are using the title property then it is not possible to have multi line tooltip. This is not a GWT problem, but a browser tooltip implementation/handling issue. If you really need to have a multi line tooltip then use Popup panel or DecoratedPopupPanel.
This will involve a little extra coding than just making a call to setTitle, but as a benefit you get complete control over how the tooltip is presented.
setTitle worked for me if I included a \n as a line separator.
Related
First of all thanks for all the previous advice.
I have come across a rather tricky little problem.
I have a string which I want to display into a Label, normally no problem, but the string is longer than the label will allow. However the similar problem with the text box was resolved with the use of the swt awt hybrid. What I would like to do is replicate this with the label.
Is there way around this? or would the workaround be to have the text area to settext to desired text and then to set the text enable to false so it is grey text.
Could anybody advise?
Your workaround to use Text is perfectly fine. You can mimic label behavior by setting appropriate background color and font and disable it. Also such "labels" are able to provide copy functionality, which is not possible for usual Labels.
Another workaround would be to calculate bounds of your String by using FontMetrics and then cut the string in the end with "..." and providing a tooltip with a full Sting length.
It is also possible to use SWT.WRAP constant for labels, thou it will be still restricted by the width of the Label.
Messing about with interface builder for the first time, exploring my options. Text seems to be in one long batch--found another thread where someone was importing an SQL db, but I just want to type something with a CR. Or should I just make a new TextView item for that?
I've also found threads complaining about autodetected links, but I'm not getting those—links are simply treated as plain text. Not that surprising, but is there a way to turn autodetect on somehow?
In Interface Builder, there is an "Detection" panel where you can check a checkbox to detect links. But it isn't detecting HTML, just text that is in the form of a URL. As for carriage returns, though, a UITextView should be able to handle those just fine.
If you want to deal with HTML, though, you should look at a UIWebView.
I'm tasked with creating a mouseover with an ellipsis that extends the missing characters from a field. I started looking at the api's and I narrowed it down to a popup panel or a dialog box. Which is better for this or is there another widget that would work better?
Thanks,
James
If it is just a mouseover (no clicking) then a popup would probably be a more better choice. Check out UIObject#setTitle()
I migrate application from Swing to SWT and cannot find out how to make table headers in SWT multiline and also TabItems to have multiline text. In Swing it was not problem but in SWT no way. For table header I found that on linux it is working but I need it for windows. I tried \n and <br> but nothing.
You might find this useful:
http://www.java2s.com/Tutorial/Java/0280__SWT/MultilineTablecell.htm
You need to override some events generated when the table is painted and modify the cell size according to the number of text lines in the cell. I'm not sure if the events are same for header cells though. Suggest you try it out and post a comment back here :-)
What functionality in iReport allows for tool tip text?
I have a field name description that contains very large text. Instead of displaying large text I want to show two or three lines and rest of text as a tool tip. How is this possible?
You can use hyperlinkTooltipExpression expression for textField element, for example.
You can find sample here.
In iReport you can call dialog for setting tooltip with help of context menu Hyperlink.