|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
override menu drawing?hi, im making my own menustrip control since i want to add a few things to
it. but now im stuck on how when you click on for instance a main node of "File", it always is highlighted in one color....i cant figure out how to change this, be it on the normal one or how to override this by making my own....any help would be great -- -iwdu15 On Tue, 11 Jul 2006 19:19:01 -0700, iwdu15 <jmmgoalsteratyahoodotcom>
wrote: >hi, im making my own menustrip control since i want to add a few things to When I want to customize a MenuStrip, ToolStrip,or StatusStrip, I use>it. but now im stuck on how when you click on for instance a main node of >"File", it always is highlighted in one color....i cant figure out how to >change this, be it on the normal one or how to override this by making my >own....any help would be great the ToolStripProfessionalRenderer class which has a number of properties that can be assigned custom colors for all of the above. This example produces a SlateGray gradient when the cursor is over a MenuItem: Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() ToolStripManager.Renderer = New _ ToolStripProfessionalRenderer _ (New CustomProfessionalColors()) End Sub Public Class CustomProfessionalColors Inherits ProfessionalColorTable Public Overrides ReadOnly Property MenuItemSelectedGradientBegin() _ As System.Drawing.Color Get Return Color.White End Get End Property Public Overrides ReadOnly Property MenuItemSelectedGradientEnd() _ As System.Drawing.Color Get Return Color.SlateGray End Get End Property Public Overrides ReadOnly Property MenuItemBorder() _ As System.Drawing.Color Get Return Color.MidnightBlue End Get End Property End Class The above is only valid on target systems with VisualStyles enabled. Gene
refresh performance in datagrid - big problem
Barcode Reader Form_Keydown being overridden Sending a command to a COM port... Collection? Application KeepAlive? Cumbersome Solution How to get checkedlistbox to display horizontal Help! have no idea what this is about! No symbols are loaded for any call stack frame ... MouseHover doesn't work? |
|||||||||||||||||||||||