Topic: [Script] - Short guide : Buttons with personal images

Hello to all MVD fans,


In case you'd want to create buttons, but you find there are not enough icons available in MVD, here is how to add your own, using the classes Dmitry provides.


Keep in mind that this is just a solution to play with until Dmitry officially introduces TBitButton and TCustomImageLists (if he does one day).
Those lists are like "dictionnaries" in which you store icons, and call them by their index to put on a Button (not the standard one, the TBitButton).


Anyway, code is fully commented. Just don't forget to add the event handler for your button, or it will be useless smile


Have fun


Cheers


Mathias

Post's attachments

Attachment icon Buttons_own_images.zip 5.16 kb, 754 downloads since 2016-10-25 

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: [Script] - Short guide : Buttons with personal images

Thanks for the example.

Dmitry.

Re: [Script] - Short guide : Buttons with personal images

Nice one Mathias. Thanks a lot for sharing...........


What about using PNG Alpha instead of bitmaps?


Also top and bottom margins of the image would be useful. Does button resizes according to image size or restricted to only 16x16 px?

Adam
God... please help me become the person my dog thinks I am.