The core algorithm description of PB dynamic Creation menu

Source: Internet
Author: User

Author: Xingda Computer technology company (www.study01job.com) Guo Baoli

The general idea is to first design a menubar, which is the menu landscape project, and then each Pull-down menu can be implemented using a program. The idea of program implementation is to append to the menu according to the specified content (text and tag). Program main algorithm is as follows:
/*-----------------------------------------------------------------
* Function Name: none Gf_add_menuitem (menu am_menu,string as_itemtext,string as_itemtag)
* Function: In the menu Am_menu append a menu item, the newly appended menu item text is As_itemtext, tag is
* As_itemtag.
* Return value: None.
* Date of preparation: 2004.7.28
* Author: da Tong Xing Computer technology Guo Baoli
*----------------------------------------------------------------*/
Integer Li_pos
Menu Lm_temp
  
Li_pos=upperbound (Am_menu.item) +1
Lm_temp=create m_template
AM_MENU.ITEM[LI_POS]=LM_TEMP.ITEM[1]
Am_menu.item[li_pos].text=as_itemtext
Am_menu.item[li_pos].tag=as_itemtag

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.