Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - static color
Search - static color - List
DL : 0
美化ComboBox,为窗体中的下拉列表框各个下拉项着色,这样在数据量较多的时候,更容易区分和取值。   private static Brush[] listBoxBrushes //该数组用来存储绘制listBox1背景的Brush对象   private static int place = -1 //颜色位置的取值   private static bool naught = true //判断是否重绘   Category("控件的重绘设置"), Description("判断是否进行渐变色的设置")] //在“属性”窗口中显示DataStyle属性-Beautify the ComboBox form the drop-down list box drop-down items coloring, so that the amount of data is more easier to distinguish and value. private static Brush [] listBoxBrushes //The array is used to store drawing listBox1 background Brush object private static int place =-1 //color position value private static bool naught = true //determine whether to redraw Category ( redraw Settings " ), Description (" to determine whether the gradient settings " )]// In the Properties window display DataStyle property
Date : 2025-12-23 Size : 16kb User : zpudn84

A New Skin for Ye Olde GroupBox Creating a custom GroupBox in WinForms that supports skinning-Introduction When applying a dark skin theme to my Windows Forms application which used a GroupBox But as soon as I wanted to set the GroupBox.Enabled property to false, things did not look that good anymore. As can be seen in the screendump, the standard GroupBox on the right automatically chooses a black color for the disabled state: Background SkinSettings Class The skin themes are in a separate class SkinSettings, to keep the example small, it only has a few settings. It also has a ColorDisabled() method for calculating the custom disabled Color. Hide Shrink Copy Code using System using System.Drawing namespace CustomControls1 { /// <summary> /// A simple SkinSettings class. /// This could be extended to support more control colors. /// </summary> public static class SkinSettings { public static Color FormBackColor { get set } public static Color FormForeColor { get set } public s
Date : 2025-12-23 Size : 17kb User : MahdiAttar
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.