[ Team LiB ] |
Recipe 8.3 Creating an Outline Around a Text Field8.3.1 ProblemYou want to make a border around a text field. 8.3.2 SolutionSet the text field's border property to true. Additionally, you can change the color of the border by setting the object's borderColor property. 8.3.3 DiscussionBy default, a text field lacks a visible border, which may be desirable. For example, you may not want a border around an item label. However, user input fields have borders by convention. The border shows the user where to click to input a value. Simply setting a text field's border property to true turns on the border around the object. myTextField.border = true; To turn off the border, simply set the border property to false. The default border color is black but can be changed by setting the borderColor property, which accepts a hex RGB value corresponding to the desired color: myTextField.borderColor = 0xFF00FF; // Make the border violet. 8.3.4 See AlsoRecipe 3.2 and Recipe 8.4 |
[ Team LiB ] |