DBGrid column width lazarus / 16-Databases ---------------------------------------------------------------------- TRNelson · 2016-01-27 15:11 Is there a way of setting the column widths on DBGrid?  I am using it to display the records in a Firebird database table and I would prefer to have a fixed column width for each item in the record.  Thanks! (If this is not the right place to ask this, I will move it). ---------------------------------------------------------------------- howardpc · 2016-01-27 16:06 Somewhere suitable (perhaps the form's OnCreate handler) add something like 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 var  i: integer;begin  for i:=0 to DBGrid1.Columns.Count-1 do    DBGrid1.Columns.Items[i].Width:=;end; ---------------------------------------------------------------------- TRNelson · 2016-01-27 16:11 Awesome!  It does exactly what I want.  I should have seen that, I think.  Still pretty new to this game. ---------------------------------------------------------------------- dogriz · 2016-01-28 06:47 You can do it via ObjectInspector, too - right click on DBGrid, select Edit Columns, add fields and set widths (DataSet and DBConnection should be active @designtime for that). ---------------------------------------------------------------------- TRNelson · 2016-01-28 16:40 Great thanks.  More good information.  I needed to do this at run time.