Jump to content


Photo

Font face in cell


  • Please log in to reply
6 replies to this topic

#1 ObiWan

ObiWan
  • Members
  • 46 posts

Posted 11 February 2016 - 03:45 PM

Hi

is there any way to have different font in single cells ?
 
I also try htmlcolumn but with no success
 
Thanks
 
cu


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 11 February 2016 - 05:49 PM

Hi,

 

Unfortunately I don't have such property in v5. In v6 there is a Font property for each Cell.

 

I think that solution may be to use Custom Drawing events?

 

If is small grid on your form, I suggest moving to v6. I will help with migration.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 ObiWan

ObiWan
  • Members
  • 46 posts

Posted 12 February 2016 - 03:51 PM

Hi 

thanks a lot for your answer.

I have already installed version 6 so I will try immediatly.

 

cu



#4 ObiWan

ObiWan
  • Members
  • 46 posts

Posted 12 February 2016 - 04:02 PM

GREAT !!!!!!!!!!!!!!!

Thanks a lot:)



#5 jamiguel77

jamiguel77
  • Members
  • 137 posts
  • Gender:Male

Posted 11 August 2019 - 07:23 PM

Hi Friends, i downloaded last version of: nextgrid_d7.exe and the version is: 5.9.85

 

i am use D7

1) how to download version 6?

2) if cant, how to change the color of a specific cell: 

 

if strtodate(netduedate)<dpFechaDesde.date then
    begin
       wng.cell[10,wng.LastAddedRow].Color:=$00C2B4FC;
       wng.cell[9,wng.LastAddedRow].Font.size:=12;
        wng.cell[9,wng.LastAddedRow].Font.color:=#ff00ff;  // or clred
    end;
 
Thanks


#6 jamiguel77

jamiguel77
  • Members
  • 137 posts
  • Gender:Male

Posted 11 August 2019 - 07:43 PM

i can do:

 

procedure TFprocesa.NgCashCellFormating(Sender: TObject; ACol,
  ARow: Integer; var TextColor: TColor; var FontStyle: TFontStyles;
  CellState: TCellState);
var
  wvalor:String;
begin
  if (Acol=10) then
  begin
    wvalor:=NgCash.cell[Acol, Arow].AsString;
    if (strtofloat(wvalor)<0) then
    begin
      TextColor:=clred;
      FontStyle:=[fsbold];
   end;
  end;  
end;
 
 
how to change font size?
 
thanks


#7 jamiguel77

jamiguel77
  • Members
  • 137 posts
  • Gender:Male

Posted 11 August 2019 - 07:54 PM

i do the job:

 

(not like me but here the work):

 

procedure TFprocesa.NgCashCustomDrawCell(Sender: TObject; ACol,
  ARow: Integer; CellRect: TRect; CellState: TCellState);
var
  wvalor:String;  
begin
  if (Acol=10) then
  begin
    with NgCash.Columns[ACol].Display do
    begin
      wvalor:=NgCash.cell[Acol, Arow].AsString;
      if (strtofloat(wvalor)<0) then
      begin
        Canvas.Font.Size := 13;
        Canvas.Font.Style:=[fsbold];
        Canvas.Font.Color:=clred;
 
      end;
      AsString := NgCash.Cell[ACol, ARow].AsString;
      PaintBackground(NgCash.CellByName[ACol, ARow].Color, True);
      Paint;
    end;
  end;  
end;





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users