TAILIEUCHUNG - Graphical user interfaces for Python programs Phần 3

Trường hợp xác nhận yêu cầu tính toán phức tạp và truy cập vào máy chủ và cơ sở dữ liệu, vv,. việc xử lý tải có thể cao. Điều này có thể là một nguồn gốc của vấn đề hiệu suất trong môi trường nhất định. | 3 Where validation requires complex calculations and access to servers and databases etc . the processing load can be high. This could be a source of performance problems in certain environments. To circumvent these and other problems you may use alternative approaches. Of course your application may not use Pmw widgets so yet another approach may be required. Personally I prefer not to use the built-in validation in Pmw widgets. If the action of formatting the content of the widget requires a redraw you may Note observe annoying display glitches particularly if the system is heavily loaded these may distract the user. The following method avoids these problems. To avoid validating every keystroke which is how the Pmw EntryField manages data input we will arrange for validation to be done in the following cases 1 When the user moves the mouse pointer out of the current field. 2 When the focus is moved from the field using the Tab key. 3 When the ENTER key is pressed. Validating this way means that you don t get false errors as an input string is built up. In figure for example entering would only raise a validation error when the field was left or if Return was pressed thereby reducing operator confusion and CPU overhead. Figure Data verification error dialogs I Invalid Card-P. Format nnn-nnn 0 nnn 101 Invalid Logical Na. Format CP lex X import string from Tkinter import from validation import 114 CHAPTER 6 EVENTS BINDINGS AND .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.