Hi all.
I'm using BMP images stored in a ListView associated to a tree view for displaying icons on tree nodes. Now I am coding Cut/Copy/Paste operations and I'd like to grey out the icon of a Node that was "cut".
Any suggestions?
Thanks!
Hi all.
I'm using BMP images stored in a ListView associated to a tree view for displaying icons on tree nodes. Now I am coding Cut/Copy/Paste operations and I'd like to grey out the icon of a Node that was "cut".
Any suggestions?
Thanks!
Don't ask why, just reboot!
I did something similar to this a while back but I didn't really put much thought into it. What I did was just have a seperate icon for when its greyed out and greyed it out in my paint program before hand at design time. There may be a runtime solution but I think the simplest way is the better in this situation.
That is unless I've missunderstood the question.
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to, Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
Thanks for answering, but I need such abitlity at runtime, since icons will change from one installation (client) to another.
Thanks anyway!
Alain
Don't ask why, just reboot!
in that case how about writing a routine that creates the greyed out version when the new icons are added? This would n't be too hard I guess, depends exactly how you mean greyed out. First method I can think of is alphablending a plain grey color over it but depending on how you want it to look you would need to play with both the alpha value & the shade of grey (black, white or inbetween somewhere).
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to, Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
That's pretty much what I am looking for. I've tried different colors with different ways of overlapping images together, but it doesn't look good.
Don't ask why, just reboot!
What kind of methods have you used? Have you tried a proper Alpha blending formula yet? I'll do a search cos I know its been posted a couple of times....
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to, Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
Here is the alpha blending fuction that uses values between 0-255 for all its parts.
FinalPixel is what it sounds like, AlphaValue is the blending ratio 0 means the result will be Destination & 255 would make the result Source. Source would be the color of the grey to be added. Destination would be the color of the pixel to be altered.
Code:FinalPixel = (AlphaValue * (Source + 256 - Destination)) / 256 + Destination - AlphaValue
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to, Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
All right!
Thanks, I'll try that. Now I have to put this part of the jop aside.
Thanks a lot for the help!
Hopefully I'll be able to do the same for you eventually...
Ciao!
Alain
Don't ask why, just reboot!