HScrollBar to combo box

A

adomokos

Is it possible to add HScrollBar to a combo box in .NET Compact
Framework? The problem is, that I have really long text in the combo
box control and I'd like to have an HScrollBar added to the combo box
when the user clicks on the down arrow on the control and the options
pop up.
I know this is possible overriding the OnPaint() method of the combo
box control. Can somebody post a code sample or direct me to a page
where I learn more about this?
Any help is appreciated.

Attila D.
 
K

Katie Schaeffer [MSFT]

Hi Attila,

You'll need to write your own custom control since .NetCF doesn't support
custom drawing for the combo box control. This isn't a very simple task,
but you can start with a custom control sample of an owner-drawn listbox
here:
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/ownerdrawnlistb
ox.aspx

For the popup portion of the combo box, I'd recommend using a popup form
(BorderStyle = None).

Hope this helps,
-Katie

This posting is provided "AS IS" with no warranties, and confers no rights.

***.Net Compact Framework Info***
Faq:
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.a
spx
QuickStarts: http://samples.gotdotnet.com/quickstart/CompactFramework/
Samples:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
tml/CompactfxTechArt.asp

--------------------
| From: (e-mail address removed) (adomokos)
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: HScrollBar to combo box
| Date: 28 Nov 2003 08:32:04 -0800
| Organization: http://groups.google.com
| Lines: 11
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 63.254.40.10
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1070037125 26023 127.0.0.1 (28 Nov 2003
16:32:05 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Fri, 28 Nov 2003 16:32:05 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix
..com!newsfeed.cwix.com!news.maxwell.syr.edu!postnews1.google.com!not-for-mai
l
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:39801
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Is it possible to add HScrollBar to a combo box in .NET Compact
| Framework? The problem is, that I have really long text in the combo
| box control and I'd like to have an HScrollBar added to the combo box
| when the user clicks on the down arrow on the control and the options
| pop up.
| I know this is possible overriding the OnPaint() method of the combo
| box control. Can somebody post a code sample or direct me to a page
| where I learn more about this?
| Any help is appreciated.
|
| Attila D.
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top