LWUIT 1.1 for Java ME Developers- P4

Tham khảo tài liệu 'lwuit for java me developers- p4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 6 We could have also used a constructor that does not specify rows and columns. TextArea demoText new TextArea In that case the text area would appear as shown in the following screenshot The Select key needs to be clicked on to enter text into the text area. This will open a for editing. By default a text area is editable. Editability can be disabled by calling the setEditable method as follows false Text can be entered using the keyboard of the actual physical device on which the application is running. Clicking on the Cancel command will abort editing while the Menu command provides an option for saving the entered text so that it can be displayed in the text area. TextArea Demo iThis fe a TexiArea. Exit 137 TextArea and TextField Although we can specify the size of a text box in terms of rows and columns while creating it a text box can be subsequently resized. The following statements when uncommented will alter the number of rows and columns. 2 5 The resulting text box will look like this When the content grows beyond a single line the text is rendered with a default gap of two pixels between successive lines. This gap between the two lines can be changed by using the following statement 20 This increases the interline gap to 20 pixels as we can see in the following screenshot 138 Chapter 6 A text area has the flexibility to grow beyond the rows and columns originally set by the constructor. This is a default property and we can see the increase in size as we enter input beyond the original capacity. However this elasticity is subject to the limit set by the maximum size defined for the instance. TextArea Demo This TextArea was originally configured for 5 lines. However as the content grows the size of the TextArea increases automatically. Exit This automatic increase in size can be disabled by using the statement below .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.