How to create a single line entry field?

Jim Schaubeck schaubeck at mac.com
Fri Feb 16 23:11:35 EST 2007


Tiemo,
I dealt with this issue this as well.  I did what others have suggested:

on enterInField
-- do something (click or send mouseup or other command), or nothing just to stop the enter key
end enterInField

on returnInField
-- do something (click or send mouseup or other command), or nothing just to stop the enter key
end returnInField

To deal with the multiple lines I did this:

put line 1 of cd fld x into cd fld x -- gets rid of multipple lines in field x

This gets rid of extra lines that were entered possibly by a paste command since a return key would not work based on the above code.  But the above code does not stop a return being pasted into the text by the user.


Jim...




On Friday, February 16, 2007, at 10:08AM, "Tiemo Hollmann TB" <toolbook at kestner.de> wrote:
>Hello,
>
>Probably a simple newbee question:
>
>1. how can I realize a single line field, where the user can enter text and
>commits with enter key?
>
>In my standard scenario the enter key makes a CR into the field, so that the
>text breaks and disappears in the unvisible line 1 of 2 of my textfield
>(because it has only 1 line visible)
>
> 
>
>I have a handler:
>
>on rawkeyUp keyCode
>
>in the field, where I handle the key entries. But even if I try to capture
>the keyCode 65293 ( EnterKey) and break the rawkeyUp, revolution puts the CR
>into the field.
>
> 
>
>Is there a field property "single line field" or something like that?
>
> 
>
>2. is there a chance to set the location of the ask and answer dialog,
>instead of default centred?
>
> 
>
>Thank you
>
>Tiemo
>
> 
>
> 
>
> 
>
> 
>
> 
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list