Hi Folks,
I can't work out what I'm doing wrong here.
set the textFont of the selectedChunk of fld "myField" to "Arial"
I have a font menu and when the user selects some text in field "myField" I want them to be able to change the font.
What am I doing wrong?
Thanks
Jim
selectedText textFont not working?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Try this:
The 'selectedChunk' property can be a little annoying to work with, as the engine may attempt to 'interpret' it before using it - and then it thinks it has ended up with the following instruction:
Hope this helped,
Jan Schenkel.
Code: Select all
on menuPick pFontName
if the focusedObject is the long ID of field "MyField" then
set the textFont of the selection to pFontName
end if
end menuPick
Code: Select all
set the textFont of "whatever the selected text is" to "Arial"
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com