Questions tagged [lazarus]

Lazarus is an open-source multiplatform RAD environment for the Free Pascal compiler, in the spirit of Delphi, with which it has a fairly high degree of compatibility.

Lazarus is a an open-source multiplatform RAD environment for the Free Pascal compiler, in the spirit of Delphi, with which it has a fairly high degree of compatibility.

See http://lazarus.freepascal.org

1306 questions
5
votes
1 answer

FPC : RTTI on records

This is my first time on this site. Usually, I have no problem to found replies in the old posts but I don't success with my actual problem. I would like to know how use RTTI functions to know at running time the properties/members of a record under…
5
votes
1 answer

Why am I losing transparency when calling BitBlt or CopyRect?

Problem I am trying to copy 32x32 tiles from a TBitmap into a TPaintbox which is my map editor, but I cannot seem to get the transparency working correctly. See the image below: Note: For the purpose of the demo and testing, I have placed a TImage…
user1175743
5
votes
1 answer

Can Lazarus 64-bit for Windows compile to 64-bit for Windows?

I downloaded, what i thought, would be the 64-bit version of Lazarus: Although it downloads a 32-bit build: And after installing it, the IDE is 32-bits: And it builds 32-bit binaries: Changing the targeting options to win64, win64, win64: Gives…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
5
votes
3 answers

Delphi equivalent to Free Pascal's FPC define?

Is there a compiler define that tells if source code is compiled with delphi, in the sense of an equivalent to the FPC define in Free Pascal? I am developing a unit that should be compatible with three Pascal compilers (Lazarus / Free Pascal, Delphi…
jwdietrich
  • 474
  • 6
  • 17
5
votes
1 answer

Best way for read and write a text file

I am using the latest version of Lazarus IDE and I have a Memo1 on my TForm1. I have to load a text file in Memo1 and then edit every line of the Memo (I use Memo1.Lines.Strings[i] := ...). At the end I must save the edited memo at a particular…
Alberto Miola
  • 4,643
  • 8
  • 35
  • 49
5
votes
1 answer

Problem with WM_COMMAND on Lazarus/FPC

I have form with MainMenu and I want to intercept when the user selects a command item from a menu. This works in Delphi: type TForm1 = class(TForm) ... // Memo and MainMenu created protected procedure WMCommand(var Info: TWMCommand);…
Michał Niklas
  • 53,067
  • 18
  • 70
  • 114
5
votes
3 answers

How to set the value of an enum type?

I have the following: TDirection = (dirNorth, dirEast, dirSouth, dirWest); TDirections = set of TDirection; In a seperate class I have it declared as a property: property Directions: TDirections read FDirections write FDirections; What I want is…
user1175743
5
votes
3 answers

GUI Only By Using FPC

I want to know how I can develop GUI applications(32 Bits) without using Delphi language(Object Pascsl), only by using FPC with Lazarus installed(Pascal). Thanks.
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
5
votes
1 answer

Global Management of Multiple Compilers in Lazarus IDE

I've been searching around the Lazarus IDE documentation for a bit, and thus far only found information related to cross compiling, so I was hoping someone could give me a straight answer on this. I'm currently working on a project that will require…
Charles Grunwald
  • 1,441
  • 18
  • 22
5
votes
1 answer

delphi: how can I put Image in DBGrid Title?

How can I put Image in TDBGrid column heading? I tried, but the image kept showing and kept disappearing when i put the mouse over the title. procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column:…
ABDNET
  • 121
  • 2
  • 6
5
votes
1 answer

Get pixel color under mouse cursor - FAST way

Is there ANY way to get pixel color under mouse cursor really FAST? I have a mouse hook and I try to read pixel color during mouse move. Its kind of ColorPicker Any attempts with getPixel and BitBlt were terribly slow. UPDATE - ADDED CODE unit…
Jan Pfeifer
  • 2,854
  • 25
  • 35
5
votes
2 answers

Delphi TFrame Create/Destroy

How to create (when I want to show it) and destroy (when I want to hide it) frames on the main TForm? Frames' align = alClient. I tried this: The form: unit main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,…
Alex P.
  • 3,697
  • 9
  • 45
  • 110
4
votes
2 answers

Interfaces in Lazarus/FPC: Multiple inheritance

I'm trying to create a shell extension to provide EXIF information for JPEG files in Windows Explorer "infotips", and am using Lazarus as this needs to produce an x64 DLL. Does Lazarus support multiple inheritance with interfaces, and if so, how do…
Mark K Cowan
  • 1,755
  • 1
  • 20
  • 28
4
votes
1 answer

How to avoid having a fixed column when adding columns dynamically to a TStringGrid at runtime?

I am using Lazarus 0.9.30.2. I have a standard TForm with a standard TStringGrid on it. The string grid has no columns or rows on it at design time. In the Object Inspector the following values are set. ColCount = 0 Columns = 0 FixedCols =…
user1174918
  • 525
  • 6
  • 22
4
votes
1 answer

Is it possible to change the colour of TTabSheet tabs

I am running Lazarus 0.9.30.2. I have a TForm on which there is a TPageControl. Within the TPageControl there is a series of TTabSheets (about 30 of them). What I want to do is colour code the tabs, so the first 10 are Red, next 10 are Blue and…
user1174918
  • 525
  • 6
  • 22