f_add_menuitem_xls_dft.srf 823 B

123456789101112131415161718192021
  1. $PBExportHeader$f_add_menuitem_xls_dft.srf
  2. $PBExportComments$the main function...~r~n hehe, only few scripts. :)
  3. global type f_add_menuitem_xls_dft from function_object
  4. end type
  5. forward prototypes
  6. global subroutine f_add_menuitem_xls_dft (menu vmmenu, integer arg_sit, readonly string ositemtext, readonly string ositemtag)
  7. end prototypes
  8. global subroutine f_add_menuitem_xls_dft (menu vmmenu, integer arg_sit, readonly string ositemtext, readonly string ositemtag);Integer iiPos //arg_sit //
  9. iiPos = UpperBound(vmMenu.Item)+1 // can only append now
  10. menu lm,lm_sample
  11. lm = CREATE m_dft_xls_item
  12. lm_sample = CREATE m_dft_xls_item_sample
  13. vmMenu.Item[iiPos] = lm_sample.Item[1] //must be item[1], or you'll find a funny result
  14. vmMenu.Item[iiPos].Text = osItemText
  15. vmMenu.Item[iiPos].Tag = osItemTag
  16. end subroutine