cancel
Showing results for 
Search instead for 
Did you mean: 

How to set font size...

Former Member
0 Kudos

Hi, I'm trying to make the font size of a link 16px, how can I do this? I am trying:

Currently, I have:

<b><hbj:link

id="link1"

text="Link to google"

reference="http://www.google.com"

target="_TOP"

tooltip="this takes you to: http://www.google.com";

onClick="LinkClick">

<% link1.setFontSize(LinkFontSize.STANDARD);%>

</hbj:link></b>

But I would like the size of the font link to be 16px.

I see that there is a constructor available in the JavaDocs but it is protected, how would I be able to use it?

I'm a beginner in JSP and Java, so any examples, code, or suggestions are greatly appreciated!

Thanks so much!

Baggett.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can't use the LinkFontSize to change the font size but you have an alternative. you could do the following. You can pass your text for your link in html text and set the encoding to false.

<b><hbj:link

id="link1"

text="<h1>Link to google</h1>"

reference="http://www.google.com"

target="_TOP"

tooltip="this takes you to: http://www.google.com";

onClick="LinkClick">

<% link1.getInnerText().setEncode(false);%>

</hbj:link></b>

PS: Please Post your question in one forum.

Former Member
0 Kudos

Hi Baggett,

To add to Prakash's solution, I think to use html tags

in attribute "text", we have to specify attribue

" encode = 'TRUE' " also in <hbj:link>.

Regards,

Narinder Hartala

Former Member
0 Kudos

Hi Narinder, thanks for your response. I don't see an attribute called 'ENCODE' for the Link tag, how can I use it?

Thanks again,

Baggett

Former Member
0 Kudos

Here are your answers.

1. setting the encode false allows to pass html tags with for your htmlb control description.

2. Button works differently. You should install PDK on your portal. You should look at the attributes of all your htmlbcontrols. This is how you setup encode = false for your button.

<hbj:button id="button1"

text="<span class='testClass'>Button 1</span>"

onClick="onInitialButtonClicked">

<% button1.setEncode(false);%>

</hbj:button>

Answers (1)

Answers (1)

Former Member
0 Kudos

How cud i Use EPCF's doNavigate to get the link's font and design??

something like this:

<hbj:link

id="link1"

text="Link to google"

<b>reference="return doNavigate("ROLES://......")"</b>

target="_TOP"

tooltip="Transactional Iview"

onClick="LinkClick">

<% link1.setFontSize(LinkFontSize.STANDARD);%>

</hbj:link>