Home > Back-end >  Coloured alphabet in button text of windows forms button
Coloured alphabet in button text of windows forms button

Time:10-23

I am working on a project where I have assigned assigned shortcut keys to button . My requirement is to highlight only that alphabet of text written on button control so that the user knows that by pressing that letter key on keyboard , the shortcut key for that button can be triggered . I have search the whole internet but don't find any ideas.

CodePudding user response:

If you don't want to use paid controls (Telerik, Infragistics) then you would need to create your own control and code the drawing yourself.

If you create a custom control that derives from the Button class, the simplest way to go is to override the OnPaint method.

You might want to see example like enter image description here

  • Related