473,385 Members | 1,798 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,385 software developers and data experts.

Combobox button color

Can anyone tell me how to get the current color of a combobox's button?
I have a custom control that I want to look similar to a combobox. It
contains a button control that I want to look like the button on a
combobox.

If possible, I would also like to get the arrow image that is used on
the combobox.

When different styles are used, the colors and image changes.

Thanks for the help in advance!

Dave Wurtz

Nov 21 '05 #1
3 5551
"Dave Wurtz" <da********@asdsoftware.com> schrieb:
Can anyone tell me how to get the current color of a combobox's button?
I have a custom control that I want to look similar to a combobox. It
contains a button control that I want to look like the button on a
combobox.

If possible, I would also like to get the arrow image that is used on
the combobox.


'SystemColors.Control' will give you the color,
'ControlPaint.DrawComboButton' can be used to draw the button.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
I don't quite understand how to use the ControlPaint.DrawComboButton
and there are very few examples. Do you have an example of how to use
this?

Thanks.
Dave

Herfried K. Wagner [MVP] wrote:
"Dave Wurtz" <da********@asdsoftware.com> schrieb:
Can anyone tell me how to get the current color of a combobox's button?
I have a custom control that I want to look similar to a combobox. It
contains a button control that I want to look like the button on a
combobox.

If possible, I would also like to get the arrow image that is used on
the combobox.


'SystemColors.Control' will give you the color,
'ControlPaint.DrawComboButton' can be used to draw the button.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Nov 21 '05 #3
"Dave Wurtz" <da********@asdsoftware.com> schrieb:
I don't quite understand how to use the ControlPaint.DrawComboButton
and there are very few examples. Do you have an example of how to use
this?


\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As PaintEventArgs _
) Handles MyBase.Paint
ControlPaint.DrawComboButton( _
e.Graphics, New Rectangle(10, 10, 20, 20), ButtonState.Normal _
)
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4

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

Similar topics

4
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is...
2
by: Tim Graichen | last post by:
I may have already asked this one, but, Is there anyway of hiding the dropdown control button on a combobox until the field has focus? Because the values in the combobox can be between 5...
0
by: Hiroyuki Tanaka | last post by:
Hi All, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to...
2
by: John Tyce | last post by:
When a button is clicked, a date is inserted or added into a combo box like this : ComboBox.Items.Add(string) or ComboBox.Items.Insert(0,string); Either way, the new string does not show up in the...
7
by: charliewest | last post by:
Using .Net CF, i have created a 2 dimension ArrayList, and "binded" this list to a ComboBox control using the "DataSource" property. I have set the DisplaySource and ValueMember properties as well....
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
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...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e lą per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non č possibile impostare la sua...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.