textbox - How do I make sure only one font and font size is used in a text field? -
the default settings of text field allow content of different font , font size pasted field. how make sure pasted content converted use specific font , font size, i.e. 1 choose default field?
you need trap paste happening, replicate yourself. example in field (untested):
on pastekey put clipboarddata["text"] char (word 2 of selectedchunk of me) (word 4 of selectedchunk of me) of me end pastekey you need care drag & drop:
on dragdrop put dragdata["text"] char (word 2 of dropchunk) (word 4 of dropchunk) of me end dragdrop if use "paste" command, not trigger pastekey message, if have such code in app, need make sure handle special cases there.
note: testing in ide can tricky, because interrupts messages, including pastekey (use "suspend development tools" "development" menu).
Comments
Post a Comment