Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: a Unit problem?
« Last post by Zvoni on Today at 12:07:12 pm »
what's your fpc.cfg look like?
2
General / a Unit problem?
« Last post by EventHorizon on Today at 11:59:09 am »
Hello to all.

before posing the question, I would like to mention my setting: Void Linux 64bit, and fpc 3.2.2 (downloaded and installed by the site of FPC and not using the Void repositories, which have an older version). My installation works (I mean I have tested various programs).

To the question now:
From this site https://www.streetinfo.lu/computing/lazarus/doc/mandelbrot.html I have downloaded the corresponding program.
1. Unzipped the file
2. $ cd Downloads/mandelbrot_src
3. There are three files: mandelbrot.lpi,  mandelbrot.lpr,  mandelbrot.lps
4. Upon issuing
   
Code: Pascal  [Select][+][-]
  1. $ fpc mandelbrot.lpr
    I get:
   
Code: Pascal  [Select][+][-]
  1.     Free Pascal Compiler version 3.2.2 [2021/05/16] for x86_64
  2.     Copyright (c) 1993-2021 by Florian Klaempfl and others
  3.     Target OS: Linux for x86-64
  4.     Compiling mandelbrot.lpr
  5.     mandelbrot.lpr(14,18) Fatal: Can't find unit graph used by mandelbrot
  6.    Fatal: Compilation aborted
  7.    Error: /home/userX/bin/FPC/fpc-3.2.2/bin/ppcx64 returned an error exitcode
    I do not understand. Other programs using units seem to work. Am I doing something stupid?

    Thanks
3
General / Re: JEDI error but unit compiles??
« Last post by Roland57 on Today at 11:50:11 am »
I would like to see the file too.

Meanwhile, if SQL commands are really the issue, you could try to surround them like this:

Code: Pascal  [Select][+][-]
  1. {(*}
  2. Q.SQL.Text := 'SELECT *, Count(*) AS KT FROM MyTable WHERE  .....';
  3. {*)}
4
LCL / Re: Using KeyPress event, how to get subsequent key presses?
« Last post by Bart on Today at 11:32:53 am »
In a TMemo, during the KeyPressed event how do you get the key pressed to be "disposed of" (or dropped is maybe a better term) once you do what you want with it
Set Key to #0.

Bart
5
General / Re: Configure JCF messages
« Last post by DomingoGP on Today at 11:26:55 am »
I have added these options in the trunk version of Jedi code format to disable warning messages.
You have to insert one or more of the following comments in the unit source code to disable the messages.

//jcf:warnassigntofunctionname=off
//jcf:warncasenoelse=off
//jcf:warnemptyblock=off
//jcf:warnunusedparam=off

I hope this solves the problem for you.

Regards
Domingo

6
FV/Textmode IDE / Re: IDE instability on Raspberry Pi?
« Last post by rvk on Today at 10:37:14 am »
On rpi3 with bookworm 64bit it also hangs on File menu.
With rpi3 with bullseye 32bit it works but the screen handling is still a mess via SSH.

7
Graphics / Re: Boleeman's projects are published on GitHub
« Last post by AlexTP on Today at 10:18:04 am »
Added these 3 demos too (bgrabmp tree + spiral + bgrabmp spiral).
And new 'STARS' too.
8
LCL / Re: Using KeyPress event, how to get subsequent key presses?
« Last post by alpine on Today at 10:02:15 am »
*snip*
and while it reads the first key pressed, subsequent key presses leave KeyPressed stuck at the first character that was typed (viewing in the Watch window while debugging).  Once I grab that key (I am adding it to a buffer) how do I get the next key pressed to be captured by this function?
I'm not experiencing that behavior with TMemo.OnKeyPress, probably your problem lies somewhere else.

Lazarus 2.2.4 (rev lazarus_2_2_4) FPC 3.2.2 x86_64-linux-gtk2
9
Hello ArchChem,

Welcome to the forum.  :)

To investigate, I would need to reproduce the different of line spacings. It may depend on the font family and the system.

Can you provide a simple example that displays both line spacing? Something like this:
Code: Pascal  [Select][+][-]
  1. uses BGRABitmap, BGRABitmapTypes;
  2.  
  3. {$R *.lfm}
  4.  
  5. { TForm1 }
  6.  
  7. procedure TForm1.FormPaint(Sender: TObject);
  8. var
  9.   ts: TSize;
  10.   style: TTextStyle;
  11.   bmp: TBGRABitmap;
  12.   halfX: integer;
  13. begin
  14.   halfX := ClientWidth div 2;
  15.   with Canvas do
  16.   begin
  17.     Brush.Color := clWhite;
  18.     FillRect(0, 0, halfX, ClientHeight);
  19.     Brush.Style := bsClear;
  20.  
  21.     Font.Color := clBlack;
  22.     Font.Height := 50;
  23.     Font.Name := 'Arial';
  24.     ts := Canvas.TextExtent('Hello world');
  25.     Rectangle(0, 0, ts.cx, ts.cy);
  26.     TextOut(0, 0, 'Hello world');
  27.  
  28.     style := Canvas.TextStyle;
  29.     style.Wordbreak:= true;
  30.     style.SingleLine:= false;
  31.     TextRect(rect(0, 50, halfX, ClientHeight),
  32.       0, 50, 'Text with'#13#10'Line endings', style);
  33.   end;
  34.  
  35.   bmp := TBGRABitmap.Create(halfX, ClientHeight, BGRAWhite);
  36.   with bmp.CanvasBGRA do
  37.   begin
  38.     Brush.Style := bsClear;
  39.  
  40.     Font.Color := clBlack;
  41.     Font.Height := 50;
  42.     Font.Name := 'Arial';
  43.     ts := Canvas.TextExtent('Hello world');
  44.     Rectangle(0, 0, ts.cx, ts.cy);
  45.     TextOut(0, 0, 'Hello world');
  46.  
  47.     style := Canvas.TextStyle;
  48.     style.Wordbreak:= true;
  49.     style.SingleLine:= false;
  50.     TextRect(rect(0, 50, halfX, ClientHeight),
  51.       0, 50, 'Text with'#13#10'Line endings', style);
  52.   end;
  53.   bmp.Draw(Canvas, halfX, 0);
  54.   bmp.Free;
  55. end;
10
Graphics / Re: Your best UI design - contest
« Last post by circular on Today at 09:36:11 am »
LazPaint by @circular
Thank you the mention. There is as well a light theme:
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018