pasting text from clipboard

Dwayne Rothe drothe at optusnet.com.au
Thu Feb 24 03:00:35 EST 2005


Thanx Frank,
Your suggestion worked perfectly, I used a slight variation so I could also retain the original textFont...

lock screen
if the clipboard is text then paste
set textFont of char 1 to (the number of chars in fld "Field") of fld "Field" to Tahoma
set textSize of char 1 to (the number of chars in fld "Field") of fld "Field" to 11
unlock screen

This was something that annoyed me more than anything, I mean it wouldn't stop 
the app from function properly but it screwed with the aesthetics, and we can't have that now, can ;?)

Anyway thanx again for pointing me in the right direction it was the finishing touch on my app, now I can have my head up ass down instead of head down ass up.

 Cheers Dwayne Rothe.........

---------------------------------- Original Message --------------------------------
You could also trap the paste request somehow and execute something 
like this (untested code):

paste
set the textSize of char 1 to (the number of chars in field "Field") of 
field "Field" to empty


On Feb 23, 2005, at 4:52 AM, xbury.cs at clearstream.com wrote:

> i wrote a bugzilla about this... There's more than one clipboard 
> problem
> in Rev...
>
> In there cases, just try to put the clipboarddata into your field 
> instead
> of the usual paste.
> But you will loose all the styles...
>
> ---------------------=---------------------
>Hello,
>I have come across a strange occurance when pasting text from the 
>clipboard of Win XP to a field in Rev.
>The text is pasted with a much larger font size than the properties of the 
>field, also it doesn't change when 
>you try setting the text size of the field after pasting the text. The 
>field is set to font type: Tahoma with font size:11,
>when pasting the text looks more like size 16+, this obviously screws up 
>the line height aswell.
>
>This really messes with the look of things, does anyone know of a 
>solution?
>
>Cheers Dwayne....



More information about the use-livecode mailing list