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. Visual Basic
  4. How to change the color of the currently selection in ContextMenuStrip ?

How to change the color of the currently selection in ContextMenuStrip ?

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
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.
  • N Offline
    N Offline
    ninkk
    wrote on last edited by
    #1

    Hi, i have a contextMenuStrip control with 5 items. I can change its forecolor and backcolor easy like contextMenuStrip1.Forecolor=color.Yellow. How can i change the color of the selected item when i am on it? I mean when i select for example forth item, there is a different color that shows/indicates on which item i am on. How do i change this color? Thanks in advance

    M 1 Reply Last reply
    0
    • N ninkk

      Hi, i have a contextMenuStrip control with 5 items. I can change its forecolor and backcolor easy like contextMenuStrip1.Forecolor=color.Yellow. How can i change the color of the selected item when i am on it? I mean when i select for example forth item, there is a different color that shows/indicates on which item i am on. How do i change this color? Thanks in advance

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      By inspecting the menuitem object you will see that there is no fore/back color property so you are not going the set these in the standard object.

      Never underestimate the power of human stupidity RAH

      N 1 Reply Last reply
      0
      • M Mycroft Holmes

        By inspecting the menuitem object you will see that there is no fore/back color property so you are not going the set these in the standard object.

        Never underestimate the power of human stupidity RAH

        N Offline
        N Offline
        ninkk
        wrote on last edited by
        #3

        No, you make mistake. Both in System.Windows.Forms.ContextMenusStrip and in System.Windows.Forms.ToolStripMenuItem there is a forecolor and backcolor property, and for sure i can set those 2 colors because i already do. How do you know on which MenuItem you are on, while you have not yet click on any and you are just browsing? You know it, because on this MenuItem you are on, it appears something like a 'selection' that has a different color. This color i want to change!

        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