TAILIEUCHUNG - Creating Applications with Mozilla-Chapter 3. XUL Elements and Features- P2

Tham khảo tài liệu 'creating applications with mozilla-chapter 3. xul elements and features- p2', 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 3. XUL Elements and Features- P2 Figure 3-3. Visual comparison of menu widgets . Menus Menus are much more flexible than they first appear to be. They can appear anywhere in the UI for one thing and needn t be stuck at the top of the window. They can be in buttons trees or just out on their own. Example 3-6 shows the basic structure of a menu. Example 3-6. A sample menu menu label Quantity menupopup -- menuitems here -- menupopup menu There is a rigid ordering of nesting in a menu. A menu contains a menupopup which in turn contains one or more menu items. Optionally you can segregate groups of menu items by using a menuseparator in the pop up which draws a thin line between items. . Pop ups The pop up manifests as either a menupopup or a popup element. The latter can be used in a number of different ways but Example 3-7 focuses on its common use in context menus. Example 3-7. Context menu using pop up popup id FlyContext onpopupshowing return doThis onpopuphiding return doThat -- menuitems here -- popup A couple of extra steps are needed to prepare a context pop up for activation. First you must attach the popup element to a widget in the UI by using the id of the pop up that must correspond to the context of the widget toolbar id main-toolbar context FlyContext When the toolbar is clicked the pop up that corresponds to that value appears. You can have some script execute when you show and or hide the pop up by using the onpopupshowing and onpopuphiding methods as when you show and hide items in a dynamic menu. The second step includes the pop up in a set of pop ups enclosed in a popupset element. Though not strictly necessary as a container for pop ups the pop-up set helps organize the free-floating 1 pop-up windows in your application and makes it easy to overlay them or overlay into them as the situation requires. . Menu lists Another manifestation of the pop up is in the use of menu lists. A menu list is a choice of options .

TỪ KHÓA LIÊN QUAN
Đã 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.