Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. LinkLabel and Context Menu

LinkLabel and Context Menu

Scheduled Pinned Locked Moved C#
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hubert
    wrote on last edited by
    #1

    Hi! Is there any simple method to detect which Link on linkLabel has been clicked before context menu opening? I've got linkLabel with context menu set to some contextMenu. When I click LMB, the linkLabel1_LinkClicked event fires ok. But RMB does not fire this - just contextMenu appears, without any info about current link. Any ideas? h.

    J 1 Reply Last reply
    0
    • H Hubert

      Hi! Is there any simple method to detect which Link on linkLabel has been clicked before context menu opening? I've got linkLabel with context menu set to some contextMenu. When I click LMB, the linkLabel1_LinkClicked event fires ok. But RMB does not fire this - just contextMenu appears, without any info about current link. Any ideas? h.

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      if you set the ContextMenu property back to null you should be able to handle the RMB event as you want, then use the ContextMenu's Show method to show the correct context menu. James "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972

      H 1 Reply Last reply
      0
      • J James T Johnson

        if you set the ContextMenu property back to null you should be able to handle the RMB event as you want, then use the ContextMenu's Show method to show the correct context menu. James "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972

        H Offline
        H Offline
        Hubert
        wrote on last edited by
        #3

        It works! I was sure it'll be easy. Thanks h.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups