开发者

vb.net combobox different style to C# combobox

When creating a combobox on the 开发者_JS百科design surface of a VB.NET app in VS 2008 it is white and when creating it in C# it is gray.

How do I create a combobox in C# that looks just like the VB.NET one? (Style wise)

alt text http://www.tonysoenen.com/images/combos.jpg


The different styles are because of the drop-down style of these controls. To get the same style as for VB.NET, you can simply change the drop-down style property to "dropDown" for the ComboBox in C#.


Have you been using any custom controls? If you mouse over the Toolbox entry before you drag the control to the form, does the tooltip in both cases say "Version 2.0.0.0 from Microsoft Corporation .NET component"?


You should check the all the properties of both forms and both comboboxes to make sure they are the same. For example, it appears that your C# form has a different background color than the VB form.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜