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

Custom-drawn combobox

I need to make a combo box that doesn't look like the
standard windows controls. I thought that extending the
combobox control would make the most sense, so I could draw
it myself.

However, when I do this, it doesn't seem to work. How can
one change the look of the combobox control?

I know you can set the userdraw stuff and impliment the
event handler, but that only lets you change the look of
each item. I need to change the box itself, arrow and all.

Any ideas? this is driving me nuts.

Richard
Nov 15 '05 #1
2 4550
Derive your control from Combo-box and handle the OnPaint method without
calling base.OnPaint

-vJ

"Richard Bateman" <rb******@solomontech.com> wrote in message
news:35****************************@phx.gbl...
I need to make a combo box that doesn't look like the
standard windows controls. I thought that extending the
combobox control would make the most sense, so I could draw
it myself.

However, when I do this, it doesn't seem to work. How can
one change the look of the combobox control?

I know you can set the userdraw stuff and impliment the
event handler, but that only lets you change the look of
each item. I need to change the box itself, arrow and all.

Any ideas? this is driving me nuts.

Richard

Nov 15 '05 #2
Create your own control with your own button and button pic? I have not
done this with a combobox before, but I think this work work. Add your
textbox control with button next to it to look like a combo box. Your
control rectangle size will normally be the height of the textbox allowing
for border (may need to play with that, not sure.) Add a listbox or other
control under the textbox. When the button is clicked, your control
rectangle will size to "around" the textbox and the listbox, so you see
both. You'd need to hook everything up to make the controls work together
as a unit and add properties and methods. This would be flexible and allow
you to use standard controls without any manual painting.

--
William Stacey, MVP

"Richard Bateman" <rb******@solomontech.com> wrote in message
news:35****************************@phx.gbl...
I need to make a combo box that doesn't look like the
standard windows controls. I thought that extending the
combobox control would make the most sense, so I could draw
it myself.

However, when I do this, it doesn't seem to work. How can
one change the look of the combobox control?

I know you can set the userdraw stuff and impliment the
event handler, but that only lets you change the look of
each item. I need to change the box itself, arrow and all.

Any ideas? this is driving me nuts.

Richard

Nov 15 '05 #3

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

Similar topics

5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
13
by: Matt F | last post by:
I have a deployment project that I'm setting up. I need to perform a different custom action based on whether this is a first time install or an update. Does anyone have any idea if it's possible...
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:
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.