Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-07

How to use fpGUI?

8 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth
to Holger Aschmann
"Holger Aschmann" wrote
Hi. I write my programs in Free Pascal on NotePad, and I don't like to use

Lazarus. Is there any possibility to use fpGUI, or doesn't it work without Lazarus?

Of course you can use fpGUI without Lazarus. Normally adding the unit directory of fpGUI as -Fu option should be enough, but maybe some defines are also needed. Take a look at the fpGUI website for more information. In principle you could even use the LCL without Lazarus. The question that strikes me here is why you would prefer Notepad instead of an IDE like Lazarus? An IDE simplifies coding a lot by providing various code completion and refactoring functionality and you don't need to use it's visual designer if you don't want to.

Regards,
Sven

Reply by email

Graeme Geldenhuys
to Holger Aschmann:
Holger Aschmann wrote
I write my programs in Free Pascal on NotePad, and I don't like to use Lazarus.

NotePad is an interesting choice. In a push I would maybe prefer Free Pascal's Text IDE before I use NotePad. I'll give you the benefit of the doubt and believe you are referring to NotePad++ instead. ;-)

Is there any possibility to use fpGUI, or doesn't it work without Lazarus?

Yes of course you can use fpGUI without Lazarus. fpGUI doesn't depend on any IDE or editor. To make compiling easier from the command line, fpGUI includes compilation scripts for the framework. It also includes extrafpc.cfg files in the "examples" directory which sets some last minute paths and compiler options. These *.cfg files are handy for your own projects too.

eg:
cd <fpgui>/examples/apps/ide/src/
fpc @extrafpc.cfg maximus.lpr

I recommend you use the latest fpGUI source code from the Git repository:

git clone https://github.com/graemeg/fpGUI.git

I've just started the v1.2 release branch for testing.

The docs/INSTALL.txt file describes how to compile fpGUI, and how to use it from various IDE's (FP Text IDE, Lazarus, MSEide, Maximus - fpGUI's own demo app) or from the command line.

If you have any further questions, don't hesitate to pop over to the support newsgroup. There are many fpGUI users more than willing to help you along the way. The following URL has details for the newsgroup. [http://fpgui.sourceforge.net/support.shtml]

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Marco van de Voort
to Sven Barth: Lazarus. Is there any possibility to use fpGUI, or doesn't it work without Lazarus? Of…

In our previous episode, Sven Barth said:

Show quoted text 5 lines
In principle you could even use the LCL without Lazarus. The question that strikes me here is why you would prefer Notepad instead of an IDE like Lazarus? An IDE simplifies coding a lot by providing various code completion and refactoring functionality and you don't need to use it's visual designer if you don't want to.

The shading of ifdefs in the syntax highlighting that Lazarus acquired a while(year?) back is seriously addictive. If I work in Lazarus only one day I already miss it when I go back to Delphi.

Reply by email

Martin Schreiber
to Holger
Holger wrote
I am really writing my programs on NotePad, not Notepad++ or something like that. I do not need the colour-games, but I want to hold control about that, what I am doing. For me the NotePad ist the right thing.

Then you might like MSEide. I also don't like color-games and want to have full control about what happens.
There is also MSEgui, a very sophisticated gui-toolkit. http://sourceforge.net/projects/mseide-msegui/

Martin
(Programming experiences since 1974) ;-)

Reply by email

Nataraj S Narayan
to Graeme Geldenhuys: NotePad is an interesting choice. In a push I would maybe prefer Free Pascal's Text IDE…

Graeme

Sorry for butting in. But wanna ask:-
Does the latest fpgui have TFpgStringGrid have the method 'LoadFromCSVFile' as in lcl TStringGrid?

Is it trivial to add?

warm regards

Nataraj

On Sun, Jul 20, 2014 at 3:17 PM, Graeme Geldenhuys <

Show quoted text 53 lines
wrote: On 2014-07-20 04:50, Holger Aschmann wrote: > > I write my programs in Free Pascal on NotePad, and I don't like to use > Lazarus. NotePad is an interesting choice. In a push I would maybe prefer Free Pascal's Text IDE before I use NotePad. I'll give you the benefit of the doubt and believe you are referring to NotePad++ instead. ;-) > Is there any possibility to use fpGUI, or doesn't it work > without Lazarus? Yes of course you can use fpGUI without Lazarus. fpGUI doesn't depend on any IDE or editor. To make compiling easier from the command line, fpGUI includes compilation scripts for the framework. It also includes extrafpc.cfg files in the "examples" directory which sets some last minute paths and compiler options. These *.cfg files are handy for your own projects too. eg: cd <fpgui>/examples/apps/ide/src/ fpc @extrafpc.cfg maximus.lpr I recommend you use the latest fpGUI source code from the Git repository: git clone https://github.com/graemeg/fpGUI.git I've just started the v1.2 release branch for testing. The docs/INSTALL.txt file describes how to compile fpGUI, and how to use it from various IDE's (FP Text IDE, Lazarus, MSEide, Maximus - fpGUI's own demo app) or from the command line. If you have any further questions, don't hesitate to pop over to the support newsgroup. There are many fpGUI users more than willing to help you along the way. The following URL has details for the newsgroup. [http://fpgui.sourceforge.net/support.shtml] Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Graeme Geldenhuys
to Nataraj S Narayan
Nataraj S Narayan wrote
Does the latest fpgui have TFpgStringGrid have the method 'LoadFromCSVFile' as in lcl TStringGrid?

It didn't, but does now. :) Get the latest code from the 'develop' branch.

I didn't like the idea of including hard-coded CSV methods and CSV processing into the standard StringGrid component, so for fpGUI I created a StringGridBuilder class that does that for you. This way the builder class can be extended (new methods added to the original), or a descendant class created and key methods overridden so it can handle other file formats too. For example fixed length or TAB delimited files, or even an ODS (OpenDocument Spreadsheet) file.

Usage:
======

uses
  fpg_StringGridBuilder;

...

var
  sgb: TStringGridBuilder;
begin
  try
    sgb := TStringGridBuilder.CreateCustom(Grid1, edtFile.FileName,
chkHasHeader.Checked);
    sgb.Run;
  finally
    sgb.Free;
  end;
end;

This is actually similar to what I have done in one of my commercial applications. But instead of a CSV file, the columns (including title & width) and sort order was driven by a set of "View" classes. You could have multiple views of the same data objects, by simply selecting the desired view from a menu. The StringGridBuilder then handled the whole setup and grid population for you.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email