Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to put bold for certain word in textfield?

I have for writing essay in the report. I just want to bold some text in my verse. I have put <b></b> tag in text, but it does not work.

An example of what I want is "My first name is Jason and my last name is Michael". Anybody know about this?

like image 582
Naim Nsco Avatar asked May 25 '12 02:05

Naim Nsco


People also ask

How do I make text bold in JTextField?

You can simply change you JTextField font by doing the following: f. setFont(new Font("Tahoma", Font. BOLD, 14));// Tahoma is an example, you could use any forn you want.

How do you bold a specific word in react native?

Use inline styles to bold specific text in React. js, e.g. <span style={{fontWeight: 'bold'}}>world</span> . The bold font will only be applied to the element to which it was added and its children.

How do I make text bold in HTML input?

The <b> tag specifies bold text without any extra importance.

How do you bold something in react?

To make bold text in react native we have to use fontWeight: 'bold' text style.


2 Answers

Try surrounding the words you want to highlight with HTML <b></b> (bold) tags, and change the field content type to HTML

like image 195
Ahamed Mustafa M Avatar answered Sep 18 '22 14:09

Ahamed Mustafa M


This work good:

"<style isBold='true' pdfFontName='Helvetica-Bold'>" + $F{data} + "</style>"

for input data from datasource, or

<style isBold="true" pdfFontName="Helvetica-Bold">Bolt text</style>

only for some static text.

For Text-field set properties Markup = styled.

like image 31
Androdos Avatar answered Sep 21 '22 14:09

Androdos