|
-
Mar 7th, 2008, 12:33 PM
#22
Addicted Member
Re: Mouseover highlights label text - how?
 Originally Posted by Vero44
That seems to work, it shows the icon in the toolbox now.
How do I achieve the following?:
1. Resize the images - is it by resizing the actual file or can it be done in the control?
2. Align the label's text with the middle of the icon. Using your configurator.gif as an example, if I drop the y position of the icon and attempt to reduce the label's height by dragging the handles, the label text drops too low.
3. Make the label transparent as in your bottom demo label
Hi,
I've made the changes you've requested, hopefully in a way you like.
I've added a few properties because of this - and some others - and one of them I call FloatingImage.
If True, the control looks like it was initially, if False, the image is vertically centered on the control, just like its Caption and there is no transparent part on the top of the control. This means you can only change the image's xOffSet if you don't want a "Floating" image. It was either this or manually vCenter images and I doubt you would want it vertically "misplaced" anyway.
You can now specify the width and Height of your image, the control will either stretch or crop to the new values. The result of this isn't spectacular as you probably can imagine. First of all MenuLabel isn't exactly a PhotoShop clone . Secondly because of the size of the images, there isn't much to work with.
I've made a properties demo page on the demo project - see screenshot - that lets you play with the most importent settings, without the need to change anything in code and then look at the result.
I also added a boolean property that enables you to show or not show the push down state.
Because you can configure MenuLabel to be transparent and with only the border visible and if that button is also the selected button, there is no visible mouseover effect. I added a boolean property that will change the border color to the same color as the mouseover text color. This only works if Fillbox = False.
Because I mixed up an X and Y variable, the previous version didn't remember the Y image position (I think it was), that's fixed as well now.
I hope all the coding didn't introduce new bugs, but it looks like we're getting there.
Let me know what you think.
Last edited by Jottum; Mar 12th, 2008 at 03:20 PM.
Jottum™
XpVistaControls , (transparent) usercontrols for XP, Vista and 7 with W2K legacy support.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|