Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General Discussion » View Thread |
Messages 1 to 3 of 3 total |
Best way to change glyphs? |
Sun, Apr 12 2009 7:37 PM | Permanent Link |
David | Ok, I need a way to change the "theme" of my app with different glyphs.
Say I could use DVD glyphs on the buttons or the next time there could be book glyphs. Next time there could be CD glyphs of video glyphs. I also have different size glyphs including 16, 24, 32, 40, and maybe 64. I already use imagelists but is there an easier way than to create an imagelist for each size and each group of icons? If there were 3 themes and 5 sizes that would be 15 imagelists. |
Mon, Apr 20 2009 12:36 AM | Permanent Link |
"David Cornelius" | > Ok, I need a way to change the "theme" of my app with different
> glyphs. Say I could use DVD glyphs on the buttons or the next time > there could be book glyphs. Next time there could be CD glyphs of > video glyphs. I also have different size glyphs including 16, 24, > 32, 40, and maybe 64. > > I already use imagelists but is there an easier way than to create > an imagelist for each size and each group of icons? If there were 3 > themes and 5 sizes that would be 15 imagelists. Store images in a resource, is my suggestion. You list the image file names in a .rc file, then compile the rc file to a .res file. It's been a while since I did this, but I believe it's as simple as the following: {$R 'MyImages.res' 'MyImages.rc'} During the project build/compile process, Delphi automatically compiles the .rc file, finds the images referenced therein, and puts them into the .res and the linker puts it all together. (Check the help and/or examples for syntax.) In the project, call LoadFromResourceName specifying the resource (your application or a DLL if that's where they are stored, and the reference name of your image (named in your .rc file and not the actual filename). By keeping different theme sets in different DLLs, you could simply switch to a different DLL and reload all the images by the same name. Then you or your customer could add new themes later. Hope that helps, -- David Cornelius CorneliusConcepts.com |
Mon, Apr 27 2009 11:59 AM | Permanent Link |
"James Relyea" | >> I already use imagelists but is there an easier way than to create
>> an imagelist for each size and each group of icons? If there were 3 >> themes and 5 sizes that would be 15 imagelists. If you are using VS, you can add an ImageList object to your app. You = can add multiple images ot it and call them by their index # @ runtime = and the UI will reflect it. I've only used them in Windows Forms = project. I don't even know if that object is available in any other app = type. jr |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |