Rehoboth Posted February 17, 2007 Posted February 17, 2007 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
Genx Posted February 17, 2007 Posted February 17, 2007 (edited) 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 February 17, 2007 by Guest
Rehoboth Posted February 17, 2007 Author Posted February 17, 2007 Hi Thanks for this. Can't get it to work though. I have selected the "get field" command from the left and then typed the rest in in the specify calculation option. Is that right? Thanks Trevor
Rehoboth Posted February 17, 2007 Author Posted February 17, 2007 Sorry, I meant "set filed" not "get field".
Genx Posted February 17, 2007 Posted February 17, 2007 ... Did you specify yourField in the Set Field command?
Genx Posted February 17, 2007 Posted February 17, 2007 Sigh...See attached just to save us some time formatExample.zip
Rehoboth Posted February 17, 2007 Author Posted February 17, 2007 Hi Thanks for your help, problem solved. Driving was successful but a tad impatient!
Genx Posted February 17, 2007 Posted February 17, 2007 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.
Recommended Posts
This topic is 6490 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 accountSign in
Already have an account? Sign in here.
Sign In Now