Jump to content

Tom F

Members
  • Content Count

    226
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Tom F

  1. Tom F

    Change the background color of a TEdit

    If you found this thread like I did while you were looking how to change the background color on a single control in a VCL style, see this video:
  2. I'm going to have a light style and dark style in our D11, VCL, app. Question 1: What's the recommended way to handle TToolButton 32x32 images being different in an app where the user can switch between a light and dark style? What would be a good way to change a TToolButton's image from an image that is designed for a light style and an image that is designed for a dark style? Perhaps if I have two TImageLists, can I just do this Toolbar1.Images := ImageList1 or Toolbar1.Images := ImageList2; ??? Or perhaps I can change the ToolButton image as in ToolButton1.ImageIndex := 8 or ToolButton1.ImageIndex := 2; ??? Is some sort of refresh necessary to force an assignment like the above to be applied? (I can have the user shut down the program if it's necessary for the assignment to occur before the toolbar is created, doing it in in TForm.Create before the TForm's TFrame is created?) Question 2: Transparency! Should I use it? I'm wondering whether I ought to just have our graphics designer create two sets of buttons not using transparency, hardwiring the button image's background to either a light or dark color rather than relying on transparency. And I wonder that because I'm having trouble understanding how alpha colors work. https://docwiki.embarcadero.com/RADStudio/Sydney/en/Image_List_Editor says: So I created a TBitMap with a green circle and reddish background that I want to be transparent. This is it (and attached as circle2.bmp.) But when I add the image in the ImageList editor, the circle has a red tinge remains around it in the editor and button. Have you faced either of the two issues above? circle2.bmp
  3. Tom F

    Changing TToolButton image and using transparency

    Congratulations, Davide, on what sounds like a great approach. What tools are you using to show the SVG files? (I see some here: https://www.ideasawakened.com/post/simple-svg-images-in-delphi-applications) Are you using them in toolbar buttons?
  4. Enabling styles in our D11 app results in a flash when we open sub-forms. The only discussion I've found on this is here, but the solutions discussed there dont' work for me. Any suggestions on how to eliminate the flash. Example of flash: flicker.mp4
  5. Tom F

    Flash when showing form with VCL Styles

    Thanks for your helpful feedback @Dalija Prasnikar @Uwe Raabe @Darian Miller.and others. I created a tiny test program that has the same flashing problem on the main form and subform. I tested it on another machine, and on a VM on my machine and there's no flashing! WTF?! I updated all my monitor drivers and the problem remains on my computer. It's hard to know how frequent or rare this problem will be in the field. ¯\_(ツ)_/¯ I'm going to post the source in a new thread and ask for members to download, compile, and test. Thanks again for taking the time to respond to my OP and for all your contributions to our community. Tom
  6. Tom F

    Flash when showing form with VCL Styles

    Thanks, @Darian Miller. In my opinion, Delpih Styles is worse than worthless as long as the flicker is there. If my software exhibited this kind of flicker, it would be laughed at by our customers. There's no way I use Styles as long as this defect continues to exist. I'm disappointed that EMB would pretend that this feature works.
  7. Tom F

    Changing TToolButton image and using transparency

    @aehimself Very clever approach. Thanks for sharing it.
  8. Tom F

    Changing TToolButton image and using transparency

    I'm always wary of "just trying it" because I worry that my testing might fail to uncover some problem context that I wasn't aware of. But, I answered my OP question #1 here by, um, just trying it. The line below causes the VCL to refresh all Toobar buttons with the contents of the ImageList. ToolBar.Images := ImageList; So, if my user switches from a Light to a Dark style, I can use the above code to switch to a different set of toolbar icons. I asked my OP question #2 very poorly. I know very little about image files, alpha channels, etc. Here's the question rephrased: I am going to hire a graphics designer to design 32x32 icons for a toolbar similar the DIY-designed 16x16 ones below. Since we are going to allow the user to select a light or dark VCL style, is my thinking correct that we probably need a second set of similar icons, but designed for dark styles, especially if our icons us a lot of transparency for their background. Otherwise, on a dark style, using icons that work on a light style like the above looks terrible, like this: I will be adding the files that the graphic designer delivers to two ImageLists used by a Toolbar and its ToolButtons. We are not going to support different DPIs at the current time. I plan to ask the designer for the same icon twice, one icon that looks good on a light background and one that looks good on a dark background. What else do I need to ask the designer given the above scenario? What file type, what about transparency? When adding these files to the ImageList, how do the Transparent Color and Fill Color fields (below) come into play? How do I avoid the kind of red shadow shown below from occurring? (The source file for the image below is in the OP as circle2.bmp.) I want to be able to give my designer clear instructions on the format of their deliverable. Something like: "We want you to deliver color, 32x32 png files with an alpha channel for transparency" Are png files the file of choice for a project like this or does another file type work better? Is there anything else I need to tell the designer? Am I over-thinking this?
  9. I can't get Code Completion to work. It pops up suggestions when I type a period after an object name. But, when I type a standalone variable name, I want it to offer a list of matching variables. For example, in an empty project, when I type "Vari" below, I want it to automatically suggest VariableName. Or must I always hit CTRL-Space for that list? procedure TForm1.FormShow(Sender: TObject); var VariableName: integer; begin Vari end; Is there some configuration option I've missed enabling? This is in D11 with Update 1. My configuration:
  10. Hi, Sherlock, I disagree with you. I don't think styles are a toy or a waste of EMB time and money. Styles are a necessary tool to allow us developers to modify our apps. I agree that massive changes are ill-advised and will confuse the user. But many modern apps (including the IDE) have a dark mode, which is what we are using styles for. We're not going to make massive changes to the UI that would confuse the user.
  11. Uwe, yes, undoubtedly there is some subjectivity to this. UI design is going to be personal to some degree. However, IMO, that doesn't negate the value of hearing about other people's experiences.
  12. Thanks for the clarification, Remy.
  13. Also note, aehimself, that StrToFloat will cause an exception if scGPDBEDit82.Text is not a valid floating point number. To avoid that, you could use https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.SysUtils.StrToFloatDef If the conversion fails, the default is returned instead.
  14. THANK YOU. Thank you, Remy. As usual, you're a fount of information! I appreciate you're having taken the time to answer this question. And of course I also appreciate all the contributions you have made over the years with your software and with your participation in the forums. Insert other media
  15. Thanks, Sherlock. I thought I recalled an auto-invoke that would make suggestions without my having to press a special key (or type .) I guess I was mistaken.
  16. I've been using the freeware Cromis.DirectoryWatch for many years. I recently grabbed a much more recent version (from 2018) from here: https://github.com/CPsoftBE/BackupOfCromis. And reworked my code to use it on Windows 10, Delphi 11.2. It works great, except when I hit CTRL-ALT-DEL, when I get the range error shown below. I confess to being a total "script kiddie" when it comes to this kind of deep OS code. It appears the "if Assigned()"-code block is only done when a user enters CTRL-ALT-DEL. Perhaps this error deliberately caused by Microsoft when someone does CTRL-ALT-DELETE? I don't want to just ignore this problem, but don't have any idea how to safely fix it. Any suggestions?
  17. I just got EMB marketing email that says, "Get 25% OFF plus 18 months of Maintenance for the price of 12 for RAD Studio, Delphi, or C++Builder, and don’t miss a release for 1.5 years." WTF does EMB that mean by that??? If a 12-month license was normally $100, then would I get 18 months for $75? Is it me, or does their marketing department need some who <checks notes> actually know how to write unambiguous copy? Or are they deliberately trying to make it difficult for us? ¯\_(ツ)_/¯ I
  18. Tom F

    Confusing marketing email from EMB

    Yeah. You're right My sloppy thinking and typing. Maybe my skin's a bit thin. But, I'd think that a good marketing department would have omitted sending this email to customers like me who are current on their update subscription. That would've saved me from wasting my time on this.
  19. Tom F

    Confusing marketing email from EMB

    Thanks, @corneliusdavid. Why did you conclude that it's only for someone re-subscribing to updates rather than also renewing?
  20. Tom F

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Ooops. My bad. You're absolutely right. II've fix my erroneous post. (Funny how things can be so well embedded in rote "muscle-memory" but not so well embedded in verbal memory.)
  21. Tom F

    Bookmarks dead?

    Do you think we should we just give up on ever getting an updated Bookmarks plugin (formerly from Parnassus) that works in Alexandria? It's now two months late. It's very clever of Embarcadero to keep these kinds of major features as optional plugins rather than integrated into the IDE. Because Embarcadero can claim they released a major update, even if some major features (like Bookmarks) aren't available. I wouldn't treat my customers that way. I'll omit a long rant about Embarcadero, since that's been discussed here before. I just want my Bookmarks. And I'm tired of checking the GetIt Package Manager for it. I'm disappointed. And I'm concerned that these kinds of failures may reveal that Embarcadero's development processes are underfunded and broken.
  22. Tom F

    Parnassus Bookmarks for Delphi 11 Alexandria?

    FYI: There's similar functionality built into the IDE. Use CTRL-SHIFT and UP-ARROW and DOWN-ARROW to jump back and forth between the current method in the implementation and interface section.
  23. Tom F

    Performance monitor for FMX macOS?

    Does anyone know of a performance monitor for FMX macOS?
  24. Tom F

    Performance monitor for FMX macOS?

    Thank you, Rollo62. Perhaps some day that information will be helpful to me. Right now I need to a source code level performance monitor for an FMX app running on macOS. Tom
  25. Tom F

    Performance monitor for FMX macOS?

    Hi, Rollo, Thanks for the suggestion that I use the xcode profiler. The beauty of FMX is that I don't have to know anything about xcode to write great programs on macOS. And, I love FMX and the fact that I can use the same code on Windows and macOS. But the lack of a turn-key profiler for FMX on the Mac is an example of how FMX can be a real pain in the ass on Macs. Do you recall what kind of results you got when you used the xcode profiler? Did you get source level timings and counts? Is xcode FMX friendly? I hate the fact that it seems that I have to become a system-level programmer to get any timings for my FMX app.
×