fpGUI
fpGUI copied to clipboard
BUILD: windows build fail.
E:\repos\LAZARUS\fpgui-1.4.1\src>build.bat
Creating missing directory ..\lib\x86_64-win64
Compiling GDI CoreLib
Free Pascal Compiler version 3.2.3-1394-g3d2b1f062e [2024/06/14] for x86_64
Copyright (c) 1993-2024 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling corelib\gdi\fpgui_toolkit.pas
Compiling .\corelib\fpg_base.pas
Compiling corelib\gdi\fpg_impl.pas
Compiling .\corelib\fpg_main.pas
Compiling .\corelib\fpg_constants.pas
Writing Resource String Table file: fpg_constants.rsj
Compiling corelib\gdi\fpg_interface.pas
Compiling corelib\gdi\fpg_gdi.pas
Compiling corelib\gdi\fpg_oledragdrop.pas
fpg_oledragdrop.pas(113,23) Error: No matching implementation for interface method "SetData(const tagFORMATETC;var TagSTGMEDIUM;LongBool):LongInt; StdCall;" found
fpg_oledragdrop.pas(203,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: D:\LAZARUS\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode
E:\repos\LAZARUS\fpgui-1.4.1\src>
Thank you for reporting this. Good news is that this was fixed about 3 years ago in the "maint" branch. Can you please 'git clone' (or download) that, and try again.
It is ok, but i don't know how to use. Yes , I have add requirements on the Project Inspector Form, after compile, but The application Window skin not effect.
I just search how to change lazarus project's target application's skin, So I find fpGUI.
I want to change skin.
I have look this:
So I want know what's the next step for it.
Im new, and bad English. Sorry.
Help me, please.
Hello. If you like custom layout, maybe you could take a look at: https://github.com/fredvs/uidesigner_ext/releases/tag/1.9.1
It has plenty of build-in layout.
And to set a style for your app, after you choose one in the menu "Review", for example "Chrome Silver flat menu".
Copy the unit from uidesigner_ext source (source are here): https://github.com/fredvs/uidesigner_ext/
/uidesigner_ext/src/fpg_style_round_silver_flat_horz.pas
into the main directory of your program (you may add all those you want to switch live for a other style for your app).
Then in the main unit of your program, add this (and other styles needed):
uses
...
fpg_stylemanager, // this to enable styles
fpg_style_chrome_silver_flatmenu, // add more styles if you want
...
And in the MainProc, add this after fpgApplication.Initialize;
if fpgStyleManager.SetStyle('Chrome silver flat menu') then
fpgStyle := fpgStyleManager.Style;
You may also in your app change with other style using fpgStyleManager.SetStyle() depending of what style-units you added in the uses section.
The name of the style is defined at each end of fpg_style_xxx.pas in initialization section, for example fpg_style_round_silver_flat_horz.pas:
initialization
fpgStyleManager.RegisterClass('Chrome silver flat menu', TExtStyle);
I just search how to change lazarus project's target application's skin, So I find fpGUI.
Note that fpGUI is completely independent of Lazarus. You can use Lazarus to edit-compile the source but fpGUI needs its own form designer: uidesigner: https://github.com/graemeg/fpGUI/tree/develop/uidesigner
(or possibly uidesigner_ext as presented previously)
Glad you like it @bird00101011 . :-) fpGUI includes built-in themes. They are managed by the fpgStyleManager, defined in the fpg_stylemanager.pas unit. The fpg_style_win2k.pas is currently the default for fpGUI. Simply comment out the cDefaultStyle line in fpg_style_win2k.pas, and put a similar line into any of the other styles you would like your fpGUI to default too.
You can also switch styles at runtime, when you start up your application, by simply passing in the --style <style-name> command line parameter.