Results 1 to 3 of 3

Thread: creating menus and handling events

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    2

    creating menus and handling events

    Hi! Got a problem here.

    I want to create dynamic menu-items (dim m as new...). That's no problem but how do I react on clicking these menu-items? I had created an event-handler for the _click-event for that special menu-item - no problem again. But I wasn't able to pass an index to specify the menu (like the index-value of arrays) that was clicked so i was forced to have an event-handler for each menu-item i was creating. But what if i don't know the number of menu-items the programm creates? Is there a way to pass to an event-handler an index-value to specify the menu-item that was clicked?

    Hope you understand what my problem is Some sample-code would be nice

    THX

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Look up AddHandler and RemoveHandler in the help file.
    After loading your control, add an event handler with AddHandler, remove it with RemoveHandler.
    This question has been asked numerous times, so there must be samples available in this forum.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    2
    THX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width