TsCellCombobox doesn't show font size. lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- Soner · 2018-08-14 09:52 When the font size not exist in combobox-list then, then it doesn't show it. here is how to fix it: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // fpspreadsheetctrols.pas// Add only the line with comment  at the end.procedure TsCellCombobox.ExtractFromCell(ARow, ACol: Cardinal);//...    cfiFontSize:      begin        fnt := Worksheet.ReadCellFont(cell);        ItemIndex := Items.IndexOf(Format('%.0f', [fnt.Size]));        if ItemIndex<0 then Text:=fnt.Size.ToString; //soner add this line      end; ---------------------------------------------------------------------- wp · 2018-08-14 15:28 Fixed in ccr-r6602. Applied the same to the other values of TsCellCombobox.FormatItem. ---------------------------------------------------------------------- Soner · 2018-08-16 06:55 @wp Thanks. Can you make this changes too? It's for number column width, first left column with numbers. The TsCustomWorksheetGrid.GetDefaultHeaderColWidth exist already, but it must changed and others are new. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpspreadsheetgrid.pas   TsCustomWorksheetGrid = class(TCustomDrawGrid, IsSpreadsheetControl)  private    { Private declarations }    fDefaultHeaderColWidth: Integer;  public    property DefaultHeaderColWidth: Integer read GetDefaultHeaderColWidth write SetDefaultHeaderColWidth default 0;  end;  TsWorksheetGrid = class(TsCustomWorksheetGrid)  published    property DefaultHeaderColWidth;  end;  function TsCustomWorksheetGrid.GetDefaultHeaderColWidth: Integer;begin  if fDefaultHeaderColWidth=0 then Result := Canvas.TextWidth(' 9999999 ')  else Result := fDefaultHeaderColWidth;end; procedure TsCustomWorksheetGrid.SetDefaultHeaderColWidth(const AValue: Integer);begin  if fDefaultHeaderColWidth=AValue then exit;  fDefaultHeaderColWidth:=AValue;  //Setup;  //<-- Shall we call it? GetDefaultHeaderColWidth is used only in Setup;end;  Can we change this two things? 1)Wenn you press [delete]-key in a cell then then this deletes the cell completly, borders, font properties... Can we delete only the content number, text or formula like in other spreadsheet applications? [ctrl] or[shift] + [delete] can delete completely. 2)Wenn you press in merged cells right key you cannot select the cells on the right side. It sould selectable. I will check how we can do this two issues today afternoon. ---------------------------------------------------------------------- wp · 2018-08-16 07:33 Quote from: Soner on August 16, 2018, 08:55:54 amCan you make this changes too? It's for number column width, first left column with numbers. The TsCustomWorksheetGrid.GetDefaultHeaderColWidth exist already, but it must changed and others are new. Done in r6603. Renamed it to FixedColWidth. ---------------------------------------------------------------------- wp · 2018-08-16 13:51 Quote from: Soner on August 16, 2018, 08:55:54 am1)Wenn you press [delete]-key in a cell then then this deletes the cell completly, borders, font properties... Can we delete only the content number, text or formula like in other spreadsheet applications? [ctrl] or[shift] + [delete] can delete completely. Done in ccr-r6605. The old behavior (delete everything) is accessible with CTRL+DEL. Quote from: Soner on August 16, 2018, 08:55:54 am2)Wenn you press in merged cells right key you cannot select the cells on the right side. It sould selectable.If you mean to select a cell which now belongs to the merged block: no, this is not intended. That's why they are merged. Being able to select sub-cells of the block would be very confusing because the content and format of the entire block is determined by the top-left cell only. Whatever would be done with the other cells of the block would not be visible. ---------------------------------------------------------------------- Soner · 2018-08-16 17:51 Thanks. Quote from: wp on August 16, 2018, 03:51:45 pm Quote from: Soner on August 16, 2018, 08:55:54 am2)Wenn you press in merged cells right key you cannot select the cells on the right side. It sould selectable.If you mean to select a cell which now belongs to the merged block: no, this is not intended. That's why they are merged. Being able to select sub-cells of the block would be very confusing because the content and format of the entire block is determined by the top-left cell only. Whatever would be done with the other cells of the block would not be visible. I don't mean that. I mean the first row or column after merged cells. In example: 1. Merge cells from B2 to C3 (2 Rows and 2 Columns) 2. Select Merged cell 4. Now press right-key. D2 should be selected but it doesn't.  You can press right-key as often as you want, it will not work. 4. Now press down-key twice. B5 is selected.  You must press down/up key as often as merged row count, to exit merged cells. I think you must press left/right/up/down-key once to select first cell before or after merged cells. I looked at code and could not detect where you prevent in horizontal direction. I wanted also correct the false selection in vertical direction. The best thing is to hold the old selected row or col (before entering in merged cell) in a variable. In example from above when you come from c1 to merged cell (b2:c3) you should exit merged cell to c4 not in b4. (exit to b4 is current behavior). ---------------------------------------------------------------------- Soner · 2018-08-16 18:05 Maybe you did the keyboard navigation ialready here: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$IF LCL_FullVersion >= 1090000}function TsCustomWorksheetGrid.MoveNextSelectable(Relative: Boolean; DCol, DRow: Integer  ): Boolean;var  cell: PCell;  r1, r2, c1, c2: Cardinal;begin  if Relative then begin    cell := Worksheet.FindCell(GetWorksheetRow(Row), GetWorksheetCol(Col));    if Worksheet.IsMerged(cell) then begin      Worksheet.FindMergedRange(cell, r1,c1,r2,c2);      // we are only interested on relative movement (basically by keyboard)      if DCol>0 then DCol := GetGridCol(c2) - Col + 1 else      if DCol<0 then DCol := GetGridCol(c1) - Col - 1 else      if DRow>0 then DRow := GetGridRow(r2) - Row + 1 else      if DRow<0 then DRow := GetGridRow(r1) - Row - 1;    end;  end;  Result := inherited MoveNextSelectable(Relative, DCol, DRow);end;{$ENDIF} I will download the lazarus svn version tomorrow. ---------------------------------------------------------------------- wp · 2018-08-16 18:05 If you use the current Lazarus trunk you will find a different behavior because I applied some code by which Jesus Reyes had fixed a similar bug in the merged_cells demo (in (lazarus)/examples/gridexamples/merged_cells); in this fix, the method MoveNextSelectable of TCustomGrid must be virtual - and this is why you need the latest trunk. It is still not quite correct because arrow-keying through a merged block may jump to a different column after the block. Unfortunately I cannot focus on this issue at the moment. Maybe you try to find the bug yourself, or wait a bit. (But as I said you'll need Laz-trunk). ---------------------------------------------------------------------- Soner · 2018-08-16 18:10 Quote from: wp on August 16, 2018, 08:05:46 pmIf you use the current Lazarus trunk you will find a different behavior because I applied some code by which Jesus Reyes had fixed a similar bug in the merged_cells demo (in (lazarus)/examples/gridexamples/merged_cells); in this fix, the method MoveNextSelectable of TCustomGrid must be virtual - and this is why you need the latest trunk. It is still not quite correct because arrow-keying through a merged block may jump to a different column after the block. Unfortunately I cannot focus on this issue at the moment. Maybe you try to find the bug yourself, or wait a bit. (But as I said you'll need Laz-trunk). Thanks, I found it at least. We posted it in same time. This issue is not important. I can wait up to next release or fix it self. ---------------------------------------------------------------------- Soner · 2018-08-16 18:18 I did it for the current lazarus version. It works good. If someone want it, here is what to do for the current lazarus version: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i //----------- Grids.pasTCustomGrid=class(TCustomControl)  //...  function  MoveNextSelectable(Relative:Boolean; DCol, DRow: Integer): Boolean; virtual; //add at end virtual //..end; //----------- fpspreadsheetgrid.pasTsCustomWorksheetGrid = class  //...   //comment out this condition {.$IF LCL_FullVersion >= 1090000}     function  MoveNextSelectable(Relative: Boolean; DCol, DRow: Integer): Boolean; override;    //comment out this condition  {.$ENDIF}    //comment out the same conditions in implementation part.