Are you looking for an easy way to change the color of a glyph in your FireMonkey application? Look no further than the Change Glyph Color Demo! This demo shows you how to use a FireMonkey TEffect to quickly and easily change the RGB color of a TGlyph with just one line of code.
This demo is perfect for Android, iOS, macOS, Windows, and Linux developers who want to create cross-platform applications with a single code base and single UI. So whether you’re targeting mobile devices or desktop computers, the Change Glyph Color Demo has you covered. Give it a try today and see how easy it is to add some flair to your FireMonkey applications!
Download the full cross-platform RGB color effect source code on Github.
This demo is part of over 100 cross-platform demos with everything from camera demos to emoji demos and painting demos.
Inhaltsverzeichnis
What is a glyph in software development?
In glyph-based software development, a glyph is a symbol that represents a data element or an action. Glyphs are often used to provide visual cues to users, making it easier to navigate and interact with software applications. In many cases, glyphs are simply graphical representations of text characters. However, they can also be more complex symbols that convey specific meaning or convey information in a more abstract way. Glyphs are often used in icons and other user interface elements, and they can be an effective way to improve the usability of software applications.
Screenshot
What does the example source code look like?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Klassen, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ImgList, FMX.Layouts, FMX.StdCtrls, FMX.Effects, FMX.Controls.Presentation, FMX.Filter.Effects, System.ImageList, FMX.Objects; type TForm1 = Klasse(TForm) MaterialOxfordBlueSB: TStyleBook; ToolBar1: TToolBar; ShadowEffect4: TShadowEffect; Label1: TLabel; GridPanelLayout1: TGridPanelLayout; <strong> Glyph1: TGlyph;</strong> ImageList1: TImageList; <strong> FillRGBEffect1: TFillRGBEffect; Glyph2: TGlyph; FillRGBEffect2: TFillRGBEffect; Glyph3: TGlyph; FillRGBEffect3: TFillRGBEffect;</strong> Rectangle1: TRectangle; Rectangle2: TRectangle; Rectangle3: TRectangle; procedure Rectangle1Click(Sender: TObject); procedure Rectangle2Click(Sender: TObject); procedure Rectangle3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} <strong>procedure TForm1.Rectangle1Click(Sender: TObject); Start FillRGBEffect1.Enabled := nicht FillRGBEffect1.Enabled; end; procedure TForm1.Rectangle2Click(Sender: TObject); Start FillRGBEffect2.Enabled := nicht FillRGBEffect2.Enabled; end; procedure TForm1.Rectangle3Click(Sender: TObject); Start FillRGBEffect3.Enabled := nicht FillRGBEffect3.Enabled; end;</strong> end. |
Ready to learn how to program cross-platform apps like this?
Sign up for the Coding Boot Camp 2022 to learn to program. Topics include: Games, JavaScript, Web, Python, SQL, Databases, iOS, MacOS, Android, Mobile, Linux, Windows, Desktop, Server, and Arduino.
Design. Code. Kompilieren. Bereitstellen.
Kostenlos testenUpgrade heute
Kostenlose Delphi Community EditionKostenlose C ++ Builder Community Edition