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

Pretty UI in C#

I'm interested in creating a rich user interface in my Windows forms
applications that can be completely customized via GDI+. I've been able to
subclass controls such as the panel control, button, radio button, and
checkbox, but other form controls are frustrating to work with because some
of the behavior and presentation can't really be controlled entirely when
subclassing them. Specifically, does anyone know of a good place where
controls such as the treeview, listview, richtextbox, combobox, and
tabcontrol have been supplied with paint overriding effectively?

For example, I know of an excellent article on CodeProject that explains how
to generate missing paint events for treeview here:

http://www.codeproject.com/cs/miscct...EEVIEW%7CPAINT

I'm just looking for more sources. Two things I am having problems with is
generating paint events for richtext and drawing my own scrollbars. When you
customize the appearance of a control completely, the default scrollbar
seems really out of place.

Thanks so much in advance.
Nov 16 '05 #1
2 1635
To customize TreeView/Tabview/Listview paiting you have to override the
NM_CUSTOMDRAW notification. This is pretty advanced, since you need lots of
Win32 API structures - I'd probably use MC++ to implement these handlers.
For classic comboboxes overriding the MeasureItem/DrawItem methods should be
sufficient.

Maybe googling for these keywords helps.

Niki

"Eric" <ej********@yahoo.com> wrote in
news:uG**************@TK2MSFTNGP09.phx.gbl...
I'm interested in creating a rich user interface in my Windows forms
applications that can be completely customized via GDI+. I've been able to
subclass controls such as the panel control, button, radio button, and
checkbox, but other form controls are frustrating to work with because some of the behavior and presentation can't really be controlled entirely when
subclassing them. Specifically, does anyone know of a good place where
controls such as the treeview, listview, richtextbox, combobox, and
tabcontrol have been supplied with paint overriding effectively?

For example, I know of an excellent article on CodeProject that explains how to generate missing paint events for treeview here:

http://www.codeproject.com/cs/miscct...EEVIEW%7CPAINT
I'm just looking for more sources. Two things I am having problems with is
generating paint events for richtext and drawing my own scrollbars. When you customize the appearance of a control completely, the default scrollbar
seems really out of place.

Thanks so much in advance.

Nov 16 '05 #2
In the March edition of Well Formed I explain how to fully customize drawing
of ListView using .NET. I provide two articles, the first on the simple
system of drawing only the detail view using built-in custom drawing. The
second article explains how to get the NM_CUSTOMDRAW notifications and shows
all the interop associated with it.

http://www.bobpowell.net/march2004.htm
--
Bob Powell [MVP]
Visual C#, System.Drawing

All you ever wanted to know about ListView custom drawing is in Well Formed.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*R SS*

The GDI+ FAQ: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder...aspx?FeedId=41

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*R SS*

"Eric" <ej********@yahoo.com> wrote in message
news:uG**************@TK2MSFTNGP09.phx.gbl...
I'm interested in creating a rich user interface in my Windows forms
applications that can be completely customized via GDI+. I've been able to
subclass controls such as the panel control, button, radio button, and
checkbox, but other form controls are frustrating to work with because some of the behavior and presentation can't really be controlled entirely when
subclassing them. Specifically, does anyone know of a good place where
controls such as the treeview, listview, richtextbox, combobox, and
tabcontrol have been supplied with paint overriding effectively?

For example, I know of an excellent article on CodeProject that explains how to generate missing paint events for treeview here:

http://www.codeproject.com/cs/miscct...EEVIEW%7CPAINT
I'm just looking for more sources. Two things I am having problems with is
generating paint events for richtext and drawing my own scrollbars. When you customize the appearance of a control completely, the default scrollbar
seems really out of place.

Thanks so much in advance.

Nov 16 '05 #3

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

Similar topics

0
by: Andy Fish | last post by:
Hi, I am trying to use MXXMLWriter with the indent flag to pretty print an XML document from vb6. Although the output is mostly indented in a reasonable way, the end tags are always bunched...
5
by: Kevin Burton | last post by:
I am sure this has been asked enough to warrant an FAQ but I could not find it. Does anyone have some code and maybe an XSLT stylesheet that would allow me to transform an XML string to a...
3
by: Jon Pope | last post by:
I've got an XML stream <node1><node2></node2></node1> which I would like to "pretty" up so it looks like the following: <node1> <node2> </node2> </node1> I've investigated the...
1
by: Johnny Jörgensen | last post by:
I've got a serious problem. I've got Visual Studio 2005 installed, and of course I'm using the Pretty Listing formatting function. When I start up VS, everything is fine, but after a while (which...
3
by: Johnny Jörgensen | last post by:
I've got a serious problem. I've got Visual Studio 2005 installed, and of course I'm using the Pretty Listing formatting function. When I start up VS, everything is fine, but after a while (which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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
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.