Livecode Wiki
Edit Page

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Sent to a [[field]] when the [[focus]] is being removed from that field and the field's content '''has changed'''.
+
Sent to a [[field(keyword)]] when the [[focus]] is being removed from that [[field(keyword)]] and the [[field(object)|field's]] content has changed.Syntax:
 
Syntax:
 
 
closeField
 
closeField
   
Line 13: Line 11:
 
end closeField
 
end closeField
   
Handle the [[closeField]] message if you want to make sure a
+
Handle the [[closeField]] [[message]] if you want to make sure a
field's content is correct after it has been changed.
+
[[field(object)|field's]] content is correct after it has been changed.
   
 
The selection is removed from a field (and the field loses focus) when
 
The selection is removed from a field (and the field loses focus) when
 
another window is brought to the front, when the user clicks in another
 
another window is brought to the front, when the user clicks in another
 
field, or when the user tabs out of the field. The field also loses
 
field, or when the user tabs out of the field. The field also loses
focus when the [[select]] command is used to select text in another
+
focus when the select [[command]] is used to [[select]] text in another
[[field]]. However, the [[closeField]] message is not sent when the user
+
[[field]]. However, the [[closeField]] [[message]] is not sent when the user
 
clicks in the same [[field]].
 
clicks in the same [[field]].
   
The [[closeField]] message is not sent when a [[handler]] changes the
+
The [[closeField]] [[message]] is not sent when a [[handler]] changes the
field's contents using the [[put]] command.
+
field's contents using the [[put]] [[command]].
   
If the [[lookAndFeel]] property is set to "Macintosh", the [[closeField]]
+
If the lookAndFeel [[property]] is set to "Macintosh", the [[closeField]]
message is generally not sent when another control (such as a
+
[[message]] is generally not sent when another control (such as a
[[button]]) is clicked. This is because clicked buttons do not
+
[[button(keyword)]]) is clicked. This is because clicked buttons do not
receive the [[focus]] on Mac OS systems, and therefore the
+
receive the [[focus]] on [[Mac OS|Mac OS systems]], and therefore the
 
[[selection]] remains active.
 
[[selection]] remains active.
   
The [[closeField]] message is also sent to buttons
+
The [[closeField]] [[message]] is also sent to [[button(object)|buttons]]
whose [[menuMode]] is "comboBox", since the type-in box in a combo box
+
whose [[menuMode]] is "comboBox", since the type-in box in a [[combo box]]
 
behaves like a [[field]].
 
behaves like a [[field]].
   
 
If a field is closing and its contents have not changed, the [[exitField]]
 
If a field is closing and its contents have not changed, the [[exitField]]
message is sent instead of [[closeField]].
+
[[message]] is sent instead of [[closeField]].
   
See also: [[openField]] (message), [[exitField]] (message), [[focusOut]] (message), [[field]] (object), [[button]] (object), [[menuMode]] (property)
+
See also: [[openField]] (message),[[exitField]] (message),[[focusOut]] (message),[[field]] (object),[[button]] (object),[[menuMode]] (property),
 
[[Category: ui]]
 
[[Category: ui]]
 
[[Category:Text processing]]
 
[[Category:Text processing]]

Please note that all contributions to the Livecode Wiki are considered to be released under the CC-BY-SA

Cancel Editing help (opens in new window)