Dynamic Menu In PowerBuilder


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
//==================================================================== // Function: n_dynamicmenu.of_additem() //-------------------------------------------------------------------- // Description: Add Menu Item //-------------------------------------------------------------------- // Arguments: // menu am_parent // string as_text // string as_tag // string as_microhelp // string as_image //-------------------------------------------------------------------- // Returns: integer //==================================================================== Integer li_Item // create a new item li_Item = UpperBound(am_parent.Item)+1 // can only append now // create a new item m_template lm lm = Create m_template // create the menu item am_parent.Item[li_Item] = lm.Item[1] //must be item[1], or you'll find a funny result // save references in the newly created item lm.iw_parent = iw_parent lm.text = as_text lm.tag = as_tag lm.microhelp = as_microhelp // force redraw am_parent.Hide() am_parent.Show() Return li_Item |
Find Projects On Github click here
Good Luck!
Subscribe
Login
0 Comments
Oldest