Taskmenu 3.0 (imitating the sidebar of Windows XP)

Source: Internet
Author: User
New features:
(1) The re-designed data structure uses a more reasonable two-way linked list instead of the old parent-child inclusion structure, making it easier to expand later.
(2) the control function interface is re-designed to make it easier for users.
(3) By Rewriting the CSS style file, you can change the menu skin table without refreshing and customize the style.
(4) compatible with the latest Firefox browser.

Features:

The menu has some special features. different from the previous two versions, after creating the taskmenu class, you must call the init method to make
Menu display. The Add entry before the init method is called will be immediately displayed, and all the entries added or used after the init method will be dynamically added.
Add to menu.
Menu actions include open, close, extend, and shorten );
The four operations can be attached to the same menu at the same time, and the same operation can be attached to multiple menus. It can also be considered an asynchronous operation.
However, the response to one of the open and close operations only stops the previous operations. After all, the menu is either open or closed.
Extend and shorten are the same as above.
Add the same menu entry to a different menu, and then add the Cologne version of the entry. If you want to return the menu variable, we recommend that you call the clonenode function at a right angle.
VaR item = new taskmenuitem ("entry ");
VaR menu1 = new taskmenu ("menu ");
VaR menu2 = new taskmenu ("menu ");

Menu1.add (item );
Menu2.add (item); the same item is added twice. Here, the actual implicit call is menu2.add (item. clonenode ());
In this way, if you want to call menu2.remove (item);, it will not succeed. Because the added cologne entry is not an item variable, the references are inconsistent.
The solution is to call menu2.remove (menu2.items (0); The menu2.item (0) method returns the version to be cologne,
Because it is the first object. Or call the Cologne method directly.
VaR Item1 = new taskmenuitem ("entry ");
VaR item2 = item. clonenode ();

Source code download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.