* * *

Recent Posts

Pages: [1] 2 3 ... 10
General / Re: TBarchart not found
« Last post by wp on Today at 07:10:47 pm »
I wanted to create a nice analog clock app...

Thx for help!

Another analog clock is found in the TvPlanIt package: http://wiki.freepascal.org/Turbopower_Visual_PlanIt#TVpClock. Download link at the top the article.
General / Re: Error writing content after import a Delphi project
« Last post by micheus on Today at 07:10:47 pm »
Ok. I figured out why the messages talk about "params[0]", although in the component properties window we can see the Params property correctly set - it should be by magic.

By adding and setup a new TIBQuery in another empty window - using the same query/parameters/properties - I could do a better comparison between the .LFM files and I saw the source of problem.

I Still think that after the import process Lazarus must remove any properties that are not present in its native controls, but as we see in the converted .LFM file it doesn't do that. But, like a magic it's able to extract the parameters from the old imported .DFM file and build the control in run-time.

I'm going to try go ahead now I know I can't trust in Lazarus import process.
General / Re: TBarchart not found
« Last post by dietmar on Today at 06:58:14 pm »
I wanted to create a nice analog clock app...

Thx for help!

Beginners / Magnifier over TEdit
« Last post by tudi_x on Today at 06:22:35 pm »
hi All,
in Lazarus 1.6.4 i need to place a magnifier over a TEdit in order to indicate the search capabilities using the TEdit as per attached screen capture.
the magnifier should dissappear when the user would write in the TEdit (change event).

please advise if there is a way to place the magnifier over the TEdit (ex. in TImage) or the canvas should be drawn over the TEdit.

thank you
BGRABitmap and LazPaint / Re: error install bgracontrols
« Last post by Handoko on Today at 06:16:23 pm »
Try to reinstall it again with this installation instruction:
Mac OS X / Re: Constructing a string of Unicode characters
« Last post by howardpc on Today at 06:07:51 pm »
You can do something like this:
Code: Pascal  [Select]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. const
  3.   Long_Line = '─';
  4. var
  5.   li: TListItem;
  6.   i: Integer;
  7. begin
  8.   ListView1.Font.Name:='Lucida Bright';
  9.   li:=ListView1.Items.Add;
  10.   li.Caption:='';
  11.   for i:=0 to 19 do begin
  12.     li.Caption:=li.Caption+Long_Line;
  13.   end;
  14. end;
General / Re: Showing hint with content of a cell in a DBGrid
« Last post by wp on Today at 06:03:25 pm »
Forget this old code, cell hints have been built in some time ago: http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Cell_hints

Besides that, the "hacking" type-cast is wrong. In order to access a protected property of a component you must declare a descendant of this component, not of its ancestor, i.e. you must declare TMyGrid = class(TDBGriid) not class(TDBCustomGrid). If this had been working in Laz 1.0.10 then it was a bug.

Instead of the double cast do a single cast. TMyGrid(Sender).DataLink.ActiveRecord.

You could also work with bookmarks.
BGRABitmap and LazPaint / Re: error install bgracontrols
« Last post by majid.ebru on Today at 05:48:46 pm »
after install.
i think some icons don't show correctly .
is it true?:
General / Showing hint with content of a cell in a DBGrid
« Last post by derles on Today at 05:48:44 pm »
Hello all.
I have the need of showing a hint with the content of a cell of a DBGrid when the mouse moves over the cell (not current cell).
I was using Lazarus 1.0.10 and FPC 2.6.2, and solved the issue with this code, simulating the hint with a memo control:
Code: Pascal  [Select]
  1. type
  2.   TMyGrid = Class(TCustomDBGrid);
  4. procedure TForm1.dbgrid1MouseMove(Sender: TObject;Shift: TShiftState; X, Y: Integer);
  5. var
  6.   row, col: integer;
  7.   rec: integer;
  8. begin
  9.   inherited;
  11.   TDBGrid(Sender).MouseToCell(X, Y, col, row);
  13.   if dgTitles in TDBGrid(Sender).Options then
  14.     Dec(row);
  16.   if TMyGrid(TDBGrid(Sender)).DataLink.Active and (row >= 0) and (col = 2) then
  17.   begin
  18.     rec := TMyGrid(TDBGrid(Sender)).DataLink.ActiveRecord;
  20.     try
  21.       TMyGrid(TDBGrid(Sender)).DataLink.ActiveRecord := row;
  23.       Memo1.Text := TDBGrid(Sender).Columns[col].Field.AsString;
  24.       Memo1.Visible := True;
  25.     finally
  26.       TMyGrid(TDBGrid(Sender)).DataLink.ActiveRecord := rec;
  27.     end;
  28.   end
  29.   else
  30.   begin
  31.     Memo1.Text := '';
  32.     Memo1.Visible := False;
  33.   end;
  34. end;

Last week I updated Lazarus to 1.6.4, FPC 3.02, and in the same code I have a typecast error at compliling:
Error: Class or Object types "TDBGrid" and "TMyGrid" are not related
in every line with the code TMyGrid(TDBGrid(Sender)).DataLink.Active

If I replace
i have no error at compliling, but this error at runtime:
Invalid TypeCast

If not use TMyGrid, using just the typecast
i have this compliling error:
Error: identifier idents no member "DataLink"

After a few days working on it, I still can't figure out how to solve this.
Any suggestion ?

I use Firebird and ZeosLib.

Mac OS X / Re: Constructing a string of Unicode characters
« Last post by Thaddy on Today at 05:40:14 pm »
You do not explain WHAT type of unicode. In UTF8 old code should work. #2500 is UTF16-LE, not UTF8. Try {$mode delphiunicode}
Pages: [1] 2 3 ... 10


Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus