Adding multiple textstyle
Posted: Thu Sep 25, 2014 10:34 pm
Hi Guys,
Im working on my data entry screen. I want to have four buttons to style my text, plain, bold, italics and underline. Each of the buttons has the following stype of code on the mouseup handler.
set the textStyle of the selectedChunk to "bold"
So when I highlight my text, and apply the bold button, the text as expected goes bold. Similarly when I select Italics, the highlighted text turns into italics.
What I want to also to do is if the selected text already has a style attached to it, I want to add another style to it. I've checked dictionary it looks like you can add a styleslist. The only thing is I don't know what delimiter I need to use for the styles list. I've got the following code below on my mouse up handler for the bold button. Can someone point me in the right direction please.
put the textStyle of the selectedChunk into tStyle
set the textStyle of the selectedChunk to "bold " & tStyle
Im working on my data entry screen. I want to have four buttons to style my text, plain, bold, italics and underline. Each of the buttons has the following stype of code on the mouseup handler.
set the textStyle of the selectedChunk to "bold"
So when I highlight my text, and apply the bold button, the text as expected goes bold. Similarly when I select Italics, the highlighted text turns into italics.
What I want to also to do is if the selected text already has a style attached to it, I want to add another style to it. I've checked dictionary it looks like you can add a styleslist. The only thing is I don't know what delimiter I need to use for the styles list. I've got the following code below on my mouse up handler for the bold button. Can someone point me in the right direction please.
put the textStyle of the selectedChunk into tStyle
set the textStyle of the selectedChunk to "bold " & tStyle