473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ComboBox in flat style?

Like a Button and RadioButton has a FlatStyle and a TextBox has a
BorderStyle, is it possible to set a ComboBox to appear in the same way?
No 3D borders.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #1
1 4284
Hi Morten,

The answer is simple, but I suppose not want you to hear (read). So the
answer is "not easy".
Combobox control does not support flat style. Furthermore it is one pixel
higher than the edit control. As long as the edit control height can be
changed after setting AutoSize property to *false*, Combobox doesn't have
AutoSize property. Its height is bound to the font size. To change the
height of the combobox you have to either change the size of the font or
make the combobox owmner draw and change the ItemHeight property (but I
believe you know what means to make Combobox ownerdraw).

Back to your question; the only way to make it flat is to draw it by
yourself.

So, it is hard to say that the Windows Forms' combobox is a perfect control.
--
B\rgds
100 [C# MVP]

"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:op**************@msnews.microsoft.com...
Like a Button and RadioButton has a FlatStyle and a TextBox has a
BorderStyle, is it possible to set a ComboBox to appear in the same way?
No 3D borders.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hi, Why does all the other controls have FlatStyle of Flat and the ComboBox does not? If I configure a form to have all Flat, the ComboBox stands out like a pink cow in a dairy. Why the...
1
by: krish | last post by:
I am developing a portal using ASP.NET and C# Almost all controls i can get flat style(Using borde style proprty)except dropdownlist,listbox,checkbox how can i make these controls to the flat...
5
by: Greg Dunn | last post by:
I have two tables in a parent-child relationship. Details on the tables are as shown below: Table1 ------- Item_ID (primary key) Item_Owner (foreign key to Table2) Table2 -------
1
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
by: Tim | last post by:
Dear All, I have spend a number of hours attempting to find some answers about how to remove the 3D BorderStyle within a combobox and have come to the conclusion that the simplest method is to...
2
by: WStoreyII | last post by:
Hello All, How do you make a combo box appear flat most controls like the treeview and the datagrid you can select border style none but there is no such option for the combo box? is there a...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
2
by: Simon Verona | last post by:
If I have a combobox set enabled=false then by default it will have dark grey text on a grey background. I want it to show as blue on white. I'm trying code such as : combobox.enabled=false...
5
by: AbdulGafoor GK | last post by:
hi i am using visual studio 2005. i could make combobox flat, but without border. is there any way to draw a border for it ?!!! thanks
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.