![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 64
Rep Power: 3
![]() |
Changing just button apperance
I've been looking at how to change the appearance of a Button.
I've managed to changed it to have rounded edges but over-riding OnPaint, however I lose the default capabilities like "enabled" and setting text up easily from the Properties menu. If I overide OnPaint for rounded-edge appearance, I need to perform all other things as well (drawString, etc). If i call base.OnPaint( ) first, my drawings will cover it anyway. So the question is, any simple way to just change the apperance, but retain all other functionality? Thanks in advance. |
|
|
|
|
|
#2 | |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 895
Rep Power: 4
![]() |
Re: Changing just button apperance
Quote:
However, you really only need to draw the button itself (taking into account whether it's normal or 'greyed out' for disabled; you can accomplish the latter by simply adjusting the colors in your OnPaint() method), and then the text on it. Drawing the text is easy, but figuring out placement of the text and its bounds, etc, is harder (though not that hard).
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista Elements Button | Alias | Existing Project Development | 2 | Nov 9th, 2007 5:25 PM |
| Applet / Button problem. | TCStyle | Java | 1 | Apr 29th, 2007 11:10 AM |
| Disabling "Ok" button | jayme | C++ | 2 | Jan 9th, 2006 4:50 AM |
| IE and dynamic button creation | MegaArcon | JavaScript and Client-Side Browser Scripting | 5 | Dec 6th, 2005 8:31 AM |
| Browse button??? | ktsirig | HTML / XHTML / CSS | 7 | Oct 8th, 2005 6:21 PM |