![]() |
![]() |
|
![]() |
How To Put An Icon On A Paradox Button Object © 2002 Ken Loomis Abstract When placing an icon on a Paradox button object, you should make the white space in the graphic transparent and prevent the colors of the form or button from affecting the colors of the icon. This can become even more of a problem if the user changes the Windows theme. The solution is to use a mask with its raster operation set properly and with its size identical to the icon. This article shows how to make the icon and the mask, and how to align them perfectly. Making The Icon And Mask First, we will make a palette for designing and keeping all your icons - an icon library. Assuming you are using Paint, open the Paint program choosing an Image Attribute size of 6" x 5". This should be large enough to hold as many icons as you are likely to need. Draw your icons to the size you desire and color them appropriately. It will be easiest for you to resize the view to large or even 600%. The best reference I have found on creating icons is The Icon Book. If you are artistically challenged this book will help. The chapter on iconic language alone is worth every penny of the price or certainly of the library late fee you might incur. Save your file. Second, we will make the mask. Open Paint if it is not already up, and open a new file sized the same as before. Click the Image menu item and make sure Draw Opaque is checked. Under Attributes in the Colors section check Black & White. Now, select the black color from the color palate, click on the paint bucket, click in the image, and click again, painting the entire image black. Save the file and include the word "mask" in the title. Now re-open your icon image in Paint. Select an icon using the selection tool. I have found the best way to do this is zoom to large size view and align the cross hairs of the selection tool with the highest and left-most pixel of the icon - on top of them, not above or to the left. Drag the selection tool so that the lower right corner aligns with the lowest and right-most pixel of the image. When you release the selection tool, the clipping should just encompass the icon, no more. Select Copy. Now, open the mask file, and paste the image onto the mask file. If this is not your first image on the mask image you will need to drag it to a free spot. Before you release the selection, right click the pasted object, and select Invert Colors. Now you should have a white outline of your icon. Using the white color and the paint bucket, fill in the outline with all white. You may need to close any gaps in the outline with the pencil tool so that you don't color the entire palate white. Now you have your icon mask. Putting It All Together In Paradox Third, we'll put the icons on your Paradox form. Open your Paradox form. Select the Graphics tool and put a graphic object on the form. It doesn't need to be on the button yet - any place on the form is ok, but you should choose a non-white place. Paste your icon into the graphic object. If you do not still have it on the clipboard, go and get it from the icon file in Paint, making sure to select it precisely as before. Now set the properties of the graphic object. Set Magnification to 100%. Set Raster Operation to Source And. Set the Frame Style to No Frame. In Design, check Size to Fit, uncheck Contain Objects, and make sure Selectable is checked. In Run Time make it Visible and Enabled. Next, go back to Paint, open the mask file and select the image of the icon, using the exact precise selection method previously described, and select Copy. Go back to your Paradox form. Put a new graphic object on the form to the right of the icon graphic. Paste the icon mask into the graphic object, and set all the properties for the graphic exactly the same as for the regular icon, except set the Raster Operation to Source Paint. Last, we'll put your icons on the button and align them. Create your button if you have not already made one and delete the label of the button. Select the two graphic images you created. Click Format ->Alignment -> Align Left. Click Format -> Alignment -> Align Top. Now click Format ->Group. If the icon mask is showing, instead of the icon, select the graphic object containing the icon graphic (Object Explorer may help here) and then Format -> Order -> Bring to Front. Drag the new icon group to your button, and center it. Conclusion Voila! You are done. Discussion of this article |
![]() Feedback | Paradox Day | Who Uses Paradox | I Use Paradox | Downloads ![]() |
|
![]() The information provided on this Web site is not in any way sponsored or endorsed by Corel Corporation. Paradox is a registered trademark of Corel Corporation. ![]() |
|
![]() Modified: 15 May 2003 Terms of Use / Legal Disclaimer ![]() |
![]() Copyright © 2001- 2003 Paradox Community. All rights reserved. Company and product names are trademarks or registered trademarks of their respective companies. Authors hold the copyrights to their own works. Please contact the author of any article for details. ![]() |
![]() |
|