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

Mailing lists / lazarus / 2012-02
10 messages · 6 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Is there any way (hopefully easy) to change the background colour of a specific cell in a stringgrid?
Thanks,
Dave.
procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer; aState:…
Thanks!
/Dave.
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
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
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.
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
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" <
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120309/dc38dc9f/attachment.html>
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
2012/3/9 Ing. H?ctor F. Fiandor Rosario
Sorry for misunderstanding.
So, are you saying that this works on your development machine, but not on the users machine?
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120310/cb25569e/attachment.html>
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