Sign in Join

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

Mailing lists / lazarus / 2012-02

String grids

10 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

David Copeland

Is there any way (hopefully easy) to change the background colour of a specific cell in a stringgrid?

Thanks,
Dave.

David Copeland JSI Data Systems Limited 613-727-9353.

Reply by email

David Copeland
to Unknown author: procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer; aState:…

Thanks!

/Dave.

Earlier message 22 lines
-----Original Message----- From: Reply-to: Lazarus mailing list To: Lazarus mailing list Subject: Re: [Lazarus] String grids Date: Wed, 29 Feb 2012 16:39:11 +0100 (CET) > Is there any way (hopefully easy) to change the background colour of a > specific cell in a stringgrid? > procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer; aState: TGridDrawState); begin SG1.Canvas.brush.color := clWhite; If (aCol = 4) and (aRow = 1) Then SG1.Canvas.Brush.color := clRed; end; The PrepareCanvas may be used. /Kaj --

Reply by email

Unknown author
to David Copeland: Is there any way (hopefully easy) to change the background colour of a specific cell in a…
Is there any way (hopefully easy) to change the background colour of a specific cell in a stringgrid?
procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer;
  aState: TGridDrawState);
begin
  SG1.Canvas.brush.color := clWhite;
  If (aCol = 4) and (aRow = 1) Then
      SG1.Canvas.Brush.color := clRed;
end;
The PrepareCanvas may be used.

/Kaj

Reply by email

Alexsander Rosa
to David Copeland: Thanks! /Dave. -----Original Message----- From: Reply-to: Lazarus mailing list To:…

There's a lot more you can do with String Grids
http://wiki.lazarus.freepascal.org/Grids_Reference_Page

2012/2/29 David Copeland

Show quoted text 5 lines
Thanks! /Dave.
Atenciosamente, Alexsander da Rosa http://rednaxel.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120229/a6619699/attachment.html>

Reply by email

David Copeland
to Alexsander Rosa

Yes, I am discovering this. For example, how to change the background colour of only a portion of a cell. That turned out to be very easy.

Thanks,
Dave.

Earlier message 14 lines
-----Original Message----- From: Alexsander Rosa Reply-to: Lazarus mailing list To: Lazarus mailing list Subject: Re: [Lazarus] String grids Date: Wed, 29 Feb 2012 14:37:31 -0300 There's a lot more you can do with String Grids http://wiki.lazarus.freepascal.org/Grids_Reference_Page 2012/2/29 David Copeland Thanks! /Dave.

Reply by email

Ing. Héctor F. Fiandor Rosario
to David Copeland

i have finished an application that use the TDbf and, as expected, generates .dbf files.

I have tried the application in other PC, and dont read the .dbf file.

I have observed that in this PC, the .dbf is shown as an Excel file, maybe due to the Panel Control Options (I dont want to "investigate" too much).

Can anybody help me with the routine to change (or at less assure) the Panel Control Options for files, as we do the the decimal separator?

thanks in advance,

Ing. H?ctor F. Fiandor Rosario

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/

Reply by email

Richard Mace
to Ing. Héctor F. Fiandor Rosario

Are you saying that you need to be able to open the .dbf file by double clicking on it and instead of your application opening it, it is opening in Excel?

Richard
On 9 Mar 2012 11:57, "Ing. H?ctor F. Fiandor Rosario" <

Show quoted text 33 lines
wrote: i have finished an application that use the TDbf and, as expected, generates .dbf files. I have tried the application in other PC, and dont read the .dbf file. I have observed that in this PC, the .dbf is shown as an Excel file, maybe due to the Panel Control Options (I dont want to "investigate" too much). Can anybody help me with the routine to change (or at less assure) the Panel Control Options for files, as we do the the decimal separator? thanks in advance, Ing. H?ctor F. Fiandor Rosario -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120309/dc38dc9f/attachment.html>

Reply by email

Ing. Héctor F. Fiandor Rosario
to Richard Mace

Dear Mr. Richard:

no, i dont said it.

first, i have tried to execute de application. The application work, but not read the .dbf file with some data. It work like the first time, without history, as empty table.

Then, I have closed the application, and open the Windows explores, in the folder with the .dbf file.

I have observed that it appears, exists, with some kb, not empty.

The icom that appears looks to be an Excel file icom.

this PC is not my PC and I dont have permission to go too far.

I close the explorer, and finish my session there.

thanks for your time,

Ing. H?ctor F. Fiandor Rosario

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistem a Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120309/785cb169/attachment.html>

Reply by email

Richard Mace
to Ing. Héctor F. Fiandor Rosario

2012/3/9 Ing. H?ctor F. Fiandor Rosario

Show quoted text 5 lines
** Dear Mr. Richard: no, i dont said it.

Sorry for misunderstanding.

Show quoted text 5 lines
first, i have tried to execute de application. The application work, but not read the .dbf file with some data. It work like the first time, without history, as empty table.

So, are you saying that this works on your development machine, but not on the users machine?

Show quoted text 8 lines
Then, I have closed the application, and open the Windows explores, in the folder with the .dbf file. I have observed that it appears, exists, with some kb, not empty. The icom that appears looks to be an Excel file icom.

I think this is a red herring and not important, as this is only relevant if you are wanting to double click on the file, although, I might not be correct in saying that.

Show quoted text 19 lines
this PC is not my PC and I dont have permission to go too far. I close the explorer, and finish my session there. thanks for your time, Ing. H?ctor F. Fiandor Rosario -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120310/cb25569e/attachment.html>

Reply by email

Reinier Olislagers
to Richard Mace
Richard Mace wrote 25 lines
2012/3/9 Ing. H?ctor F. Fiandor Rosario < <mailto:>> first, i have tried to execute de application. The application work, but not read the .dbf file with some data. It work like the first time, without history, as empty table. So, are you saying that this works on your development machine, but not on the users machine? Then, I have closed the application, and open the Windows explores, in the folder with the .dbf file. I have observed that it appears, exists, with some kb, not empty. The icom that appears looks to be an Excel file icom. I think this is a red herring and not important, as this is only relevant if you are wanting to double click on the file, although, I might not be correct in saying that.

I agree with Richard: the file association determines what happens when you double click the item in Windows explorer - it should have nothing to do with how your program works.

I'd try and get the dbf from the user's computer if possible and analyze that. If that is not possible, I'd add logging output to your program (e.g. in a debug build mode) and ask the client to send you the log. I'm sure others will have additional ideas...

Just for your information: note that there are some bugs open for the .dbf code and the dbf code is currently unmaintained. You might want to consider alternatives such as sqlite or Firebird embedded.

Regards,
Reinier

Reply by email