 |
| Subclassing CommandButton control to create BackColor property |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |

Each time the caption of a button is set -- use Caption1 property and SetCaption method to do this -- the object generates a temporary bitmap file printing the text on it and pass this file to the Picture property. |
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 8879 bytes Created: 2003-03-06 12:03:18 Modified: 2011-12-10 09:20:22 Visits in 7 days: 139 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
Bitmap file creation takes no time, and the file is deleted on Destroy event for the object.
The Caption property is not used and should be empty every time. All font properties are available. Padding and Margin properties provide positioning the text inside the button.
Unfortunately hot keys are not supported (there should be a trade anyway). The WordWrap property is ignored (practically it is on all the time). As for the rest the object behaves like an ordinary CommandButton.
|
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|