How to use fpGUI lazarus / 1-Linux ---------------------------------------------------------------------- Blaazen · 2009-08-06 12:05 Hello, Can someone explain me what is the right way to use fpGUI widgets? I downloaded Lazarus 0.9.27 from SVN, fpGUI from git, I made everything (I hope) what is written in fpGUI readme and on the wiki. I built Lazarus with LCL-> fpGUI. When I choose Tool -> Compiler Options to Qt or GTK2 it works, but when I choose fpGUI and run my project, it show nothing and then displays dialog "Execution stopped." after while. When I saw some example codes in fpgui/examples/gui it always uses other components, TfpgForm instead of TForm and so on. Does it mean that i have to change component types in my project to run fpGUI. Or where I do mistake? Thanks for any help, I have to tell I had no problems on Vista and when I moved to Linux it's hell. But Qt widgets work fine, so I can work. ---------------------------------------------------------------------- Blaazen · 2009-08-09 19:20 So, nobody use fpGUI? ---------------------------------------------------------------------- theo · 2009-08-09 19:30 Quote from: Blaazen on August 09, 2009, 09:20:49 pmSo, nobody use fpGUI? It's not yet really usable afaik. See: http://wiki.lazarus.freepascal.org/Roadmap Why don't you use GTK2? Of course Qt works very well too. ---------------------------------------------------------------------- Phil · 2009-08-09 19:31 Quote from: Blaazen on August 09, 2009, 09:20:49 pmSo, nobody use fpGUI?  It's too incomplete to do anything with: http://wiki.lazarus.freepascal.org/Roadmap#Status_of_components_on_eac h_widgetset Is there some reason why you don't want to to use one of the other working widgetsets? Thanks. -Phil ---------------------------------------------------------------------- theo · 2009-08-09 19:51 @Phil: Do you know them? http://www.sumitsays.com/public/images/thomson_and_thompson.jpg ---------------------------------------------------------------------- Blaazen · 2009-08-10 10:38 Thank you for help. O.K. I can use Qt or GTK2, I just see fpGUI is pre-Alpha stadium, so it's clear. However I just have question about Z-order function in different widgets. In my project, I use TBitBtn (Button with bitmap) placed over TStringGrid, but it doesn't work in GTK2. Is it bug or simply a property? I know TSpeedbutton is always under TStringGrid in Qt, GTK2 and also in Win32/64, even if you set Z-order -> Move to Top. But in GTK2 are all types of buttons (TButton, TBitBtn and TSpeedbutton) always "hidden" under TStringGrid. ---------------------------------------------------------------------- Vincent Snijders · 2009-08-10 10:41 More information about fpgui without LCL: http://opensoft.homeip.net/fpgui/ ---------------------------------------------------------------------- theo · 2009-08-10 11:11 Quote from: Blaazen on August 10, 2009, 12:38:55 pm In my project, I use TBitBtn (Button with bitmap) placed over TStringGrid, Can you show a screenshot of how that should look? Should it act like a cell editor? Sth. like this? Code: [Select]procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer;   var Editor: TWinControl); begin   Editor:=BitBtn1;   Editor.Top:=StringGrid1.CellRect(ACol,ARow).Top;   Editor.Left:=StringGrid1.CellRect(ACol,ARow).Left;   Editor.Show; end; ---------------------------------------------------------------------- Phil · 2009-08-10 17:20 Quote from: theo on August 09, 2009, 09:51:06 pm@Phil: Do you know them? http://www.sumitsays.com/public/images/thomson_and_thompson.jpg Not familiar with this site and it just returns a server error. Thanks. -Phil ---------------------------------------------------------------------- Blaazen · 2009-08-10 18:50 Thank you, Theo. It is exactly what I need. I have also cell editor, but I didn't use a "Editor:TWinControl" object. I simply changed visibility and x,y coordinates of my buttons when method OnSelection was called. Using "Editor:TWinControl" is better way, it works also with GTK2 and there are no Z-order problems. Also thanks to Vincent for next fpGUI info. I think this thread is solved. Blaazen. ---------------------------------------------------------------------- Graeme · 2009-08-11 20:25 Quote from: Blaazen on August 06, 2009, 02:05:58 pmCan someone explain me what is the right way to use fpGUI widgets? Only by chance that I saw this message, I don't normally hang out in the Forums, only the mailing list. Anyway, fpGUI Toolkit is currently meant to be used without the LCL. It includes it's own Form Designer (located in the 'uidesigner' directory), so you can visually design forms as well. I set it up with Lazarus IDE via the Tools menu. So Ctrl+Shitf+F12 uses the current editor file and opens the fpGUI UI Designer with it. I have been developing like this for almost two years now. fpGUI also includes a Lazarus add-on package which registers a new fpGUI based project in the "File > New Project" menu. The LCL+fpGUI widgetset included with Lazarus is currently only a "proof of concept" to see if fpGUI can be integrated with LCL and how much effort that would be. It seems fairly simple to do and I do have it on my todo list - but unfortunately it is not a high priority for me. I still have other features and improvements I want to add to fpGUI Toolkit itself. Currently the LCL+fpGUI widgetset supports a few basic components like TEdit, TMenuBar, TRadioButton, TCheckBox etc... But in it's current "alpha" state, it is not very useful. Using fpGUI without the LCL is currently your only real option. ---------------------------------------------------------------------- Zaher · 2009-08-12 11:37 As i understand ( and correct me when i have mistake) fpGui provide a standard controls that build from scratch, like TEdit TButton..., in other words it dose not use the OS controls, so it will be compatible with all OSes with no difference and no need to a multiple widgetset for each control, fpGui just give the ground to draw and build controls between OSs. ---------------------------------------------------------------------- Graeme · 2009-08-12 12:17 Quote from: Zaher on August 12, 2009, 01:37:17 pmfpGui provide a standard controls that build from scratch, like TEdit TButton...Yes, fpGUI Toolkit is a custom drawn toolkit with everything implemented in Object Pascal. It does not use native OS widgets like Lazarus LCL or wxWidgets. This was done by design because we wanted the exact same user experience and look & feel on all supported platforms. We use fpGUI in our commercial projects - which had such a requirement. So what you see on one platform, is exactly how it will look on another platform. Later this year I will be implementing full theme support, which will allow the user to "mimic" the native widgets on each platform. fpGUI already has some theme support but very basic - I'm working on a much improved design.