alank2 5 Posted February 10, 2022 I've done enough searching to know that it is based on a bitmap; I even remember drilling down and opening a bitmap that looked like the source of how it figures out how to draw controls. I am creating a number the TSpeedButton's programmatically and I have been using the StyleLookup="buttonstyle" which looks mostly like what I want except it has a grayish background which I need to change to a white background. What is the easiest way to accomplish that? Share this post Link to post
Serge_G 87 Posted February 11, 2022 Well, it's FMX, so you can change the style (creating a custom one or modifying existent) Here I delete initial background, put a TRectangle (aligned contents), sending it background (control/background) and set property stylename to background too. Advantage you can "easily" change color of a Trectangle. Inconvenient : - if you want to use all other buttonstyles, you have to do the same thing ! - if you use dark colors, take care of the fontcolor Notice, same as always, if you use it for all platforms change default style not the "Windows" default one Share this post Link to post
alank2 5 Posted February 11, 2022 I right clicked it and created a custom style. Then I found the background and edited NormalLink to change where it was pointed to to pointing to the middle of a white box so it would become white. Are you saying you replaced the background TButtonStyleObject with a TRectangle? Can the bitmap graphics that NormalLink points to be edited? What if I wanted to add something to that bitmap? Share this post Link to post
Serge_G 87 Posted February 12, 2022 (edited) 16 hours ago, alank2 said: Are you saying you replaced the background TButtonStyleObject with a TRectangle? Yes, acting so even if you change stylebook at run time this custom style is independent 16 hours ago, alank2 said: Can the bitmap graphics that NormalLink points to be edited? Yes, even if it's not so easy, you have to change about three PNG images (dpi necessity) . I remember a video by Sarina Dupont about using Adobe and Stencils to change colors (see this tool) sorry, I don't found the link and many others interventions (videos, blogs) about bitmap designer tool Basically, using bitmap designer tool : save image , edit images with whatever tool you have, and then return to bitmap designer, load the new image (hoping this should not change regions defined, I never check this) Yes, you should say : "but bitmap designer is for VCL" (VSF file) but it's easy to save it as a FMX style 16 hours ago, alank2 said: What if I wanted to add something to that bitmap? I guess increasing the size of the image, putting the desired drawing outside the already defined areas will do the trick Edited February 12, 2022 by Serge_G Share this post Link to post