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

Vật dụng thanh cuộn có thể được thêm vào bất kỳ tiện ích hỗ trợ di chuyển, chẳng hạn như các vật dụng văn bản, Canvas và Listbox. Liên kết một widget Scrollbar với widget khác cũng đơn giản. | xy start 270 extent 5 fill gray70 xy start 275 extent 35 fill gray80 xy start 310 extent 49 fill gray90 205 105 285 125 166 177 210 199 205 105 fill white 350 150 text text fill yellow font verdana 36 img PhotoImage file 145 280 image img anchor CENTER frm Frame canvas relief GROOVE borderwidth 2 Label frm text Embedded Frame Label .pack 285 280 window frm anchor CENTER Documentation for the Canvas widget starts on page 456. Documentation for the Bitmap class starts on page 452. Documentation for the PhotoImage class starts on page 512. Scrollbar Scrollbar widgets can be added to any widget that supports scrolling such as Text Canvas and Listbox widgets. Associating a Scrollbar widget with another widget is as simple as adding callbacks to each widget and arranging for them to be displayed together. Of course there is no requirement for them to be colocated but you may end up with some unusual GUIs if you don t Figure shows a typical application. Figure Scrollbar widget list Listbox root height 6 width 15 scroll Scrollbar root command yscrollcommand side LEFT side RIGHT fill Y for item in range 30 END item Documentation for the Scrollbar widget starts on page 525. Listbox Listbox widgets display a list of values that may be chosen by the user. The default behavior of the widget is to allow the user to select a single item in the list. A simple example is shown in figure . You may add additional bindings and use the selectmode option of the widget to allow multiple-item and other properties. See Scrollbar above for information on adding scrolling capability to the listbox. TKINTER WIDGET TOUR .

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.