Masking tooltip of a Text field - swt

I need to hide tooltip for a password Text field. Please suggest.
I have something like below and getToolTipText() needs to return blank or hidden text, because original password getting rendered in UI.
org.eclipse.swt.widgets.Text text = new org.eclipse.swt.widgets.Text(parent, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);

It should not show you tooltip when you use "SWT.PASSWORD". It doesn't show tooltip for me.
Can you post more of your code with the text control.
Anyway if you want you can always set empty toolbox with
textControl.setToolTipText("");
but this is not necessary and it should be done without this.

Related

How to add another Text Field in VISIO?

As soon as we drag and drop any component we can see the component's name in a text field.. Similarly I want another Text Field with some numeric value like 1.0 , 2.0 to be generated and show it with the Component.
the issue is I am getting only 1 TEXT FIELD option.. Can you help me to understand this.enter image description here
You can have as many text fields as you want, you need to be in the shape text editor (hit F2 first so that text edit is opened, and then insert fields). Here is a video. Please note that this is not a programming question, probably should be closed here as offtopic.

Title of crystal report- can concatinate?

I wanted to find out if there is a possibility to concatenate parameters for the title?
for example:
i have parameter of sysdate and my title of the report is Chani Test i want to see in the title
Chani Test 6.11.2018
is it possible?
I waiting for your answer
regards,
If I understand correctly, you can add a textbox and place it where you want the title to show (Remove current title). Then in the textbox type 'Chani Test', add a space and finally drag you sysdate parameter inside the textbox along with the title you just typed
In the image below, you can see the edges of the textbox and my text inside it. Please ignore my Year parameter.
.

Jface Text with predefined input and suggestion for user

Problem Statement:
I as a user needs text box that selects from one of the existing options that is pulled from database and also give suggestions as the user is typing in the text box.
Possible Solution:
I know one possible solution is combo box but I do not user to have a large dropdown every time he wants to input in a text box and at same time I need user not to add new value. Also I want user to have suggestions for user from possible input values.
You can use AutoCompleteField to add automatic completion suggestions to various types of control such as Text.
For example:
String [] proposals = .... array of completion proposals
Text text = new Text(parent, SWT.BORDER);
new AutoCompleteField(text, new TextContentAdapter(), proposals);
As the user types in the text field matching proposals will be shown in a drop down. They can select the one they want or just continue to type.
Use ComboContentAdapter instead of TextContentAdapter to make this work with a Combo control.
You can also use ContentProposalAdapter if you need more control of the proposal behaviour, AutoCompleteField just provides a simpler interface to this.

Adding fielddata to fixed text in report designer

Using the report-designer of Reportbuilder i want to add a long fixed text to my report with one or more included fields inside the text. Of course these fields should be filled with actual data, adjusting the text.
I remember I have done such a thing in the past, but cannot remember how. I thought you could accomplish this with a Text-field and something like 'This is the text and here {fieldname} fielddata is inserted', but that doesnt seem to work
Can anybody help?
Using reportbuilder 15.04
Response from Digital Metaphores:
Use the RichtText component! By setting MailMerge to true, you can add
datafields to text in the richtext editor
This adds the reference to the fielddata as a xml tag. Adding the fields Name from pipeline plData can be done like this:
<dbtext datapipeline='plData'>Name</dbtext>
Fill in the fixed text, then (making sure the focus is set to the text box, I.E. you have the flashing pipe cursor) right click in the place you want the data field to go, and click Create Placeholder.
In the Placeholder properties window give it a Label so you know what it is, then use the "Value" field to define what data from your datasets you want to be brought through.
You should end up with the Label you set in square brackets, like [Example] within the set text.

How can I create a read-only SWT text that is impossible to select? (by keybord and mouse)

How can I create a read-only SWT text that is impossible to select? (by keyboard and mouse)
for example:
Text text = new Text(shell, SWT.BORDER | SWT.READ_ONLY);
text.append("text text text text text text text text text text text text text ");
text.setSelection(10, 60); // If only I could write here something that could turn the text impossible to select, just like if it were a label.
Use a Label instead. Or use Text's setEnabled and setEditable methods.
In case Enablad property using you can`t copy text from it.
I advise to make tihs. You can create yor own widjet that contain two text box. We may name it OurTextBox. The First created as usaly, second as readonly (with SWT.READONLY flag). You may use StackLayout for layout. Then you should define some properties and methods.
Main of this:
SetText(); getText();
SetReadonly();
When SetReadonly is invoked you can show one of two internal TextBox.
Unfortunately, this is the only solution to dynamically ReadOnly