Jump to content

Bold & Red Please!!


This topic is 5703 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi

I am trying to add a bold button and a red button above a text box. Just want to highlight text and then bold it or change colour to red. But only the highlighted sections.

I have followed links, and tried stuff. But just can't do it! This is becomming detrimental to my health!

If anyone has done this already could you possibly post the actual scripts?

Would be very much appreciated.

Trevor

Link to comment
Share on other sites

Set Field[ yourField ;

Let( x = yourField ;

Left( x ; Get(ActiveSelectionStart) - 1 ) &

TextStyleAdd( Middle( x ; Get(ActiveSelectionStart) ; Get(ActiveSelectionSize) ) ; Bold ) &

Right( x ; Length(x) - (Get ( ActiveSelectionStart) + Get(ActiveSelectionSize) -1 ) )

)

]

Change the bolded bits to:

TextColor( ; RGB( 200 ; 0 ; 0 ) )

Edited by Guest
Link to comment
Share on other sites

Lol. I'm sitting here thinking, what is this guy on about. Then i remembered, hehe. Well no, it just usually goes in circles and you go, "it doesn't work" and then i go "it does" and then you go "i tried it, it doesn't work" then i go "yes it does, here's a sample" : So I just took a short cut hehehe.

Sigh, funny to me anyway.

Link to comment
Share on other sites

This topic is 5703 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.