grid question lazarus / 9-Editor ---------------------------------------------------------------------- eedexter · 2007-08-13 23:20 I have just started to use lazarus and I am a little confused as to where my code is at... I just ended up with the basic code and it isn't showing me what changes have been made.  What I am wanting to do is fit the grid around data that I load into it and be able to define the columns when I load stuff in and I can't find any of the methods to code them.  (it is to replace python wxpython code)..  A tutorial somewhere on how to use lazarus with a sample project would be helpfull..  apologies in advance if I am asking a dumb question. https://sourceforge.net/projects/dex-tracker Code: [Select] { TForm1 }   TForm1 = class(TForm)     DrawGrid1: TDrawGrid;   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation initialization   {$I unit1.lrs} end. ---------------------------------------------------------------------- antonio · 2007-08-14 00:00 I am not sure if I understand what you want. There are some sample projects on http://br.geocities.com/antoniog123456/ ---------------------------------------------------------------------- eedexter · 2007-08-14 00:06 I was hopeing to be able to see more of the code like in python so that I could understand what is happening..  looks like what I did was barely mentioned...  I.e. where are the column headings that I entered...  where are the number of columns...  that sort of thing..  The sample projects may be helpfull I will look into that. ---------------------------------------------------------------------- antonio · 2007-08-14 00:23 There is a lot of others on http://wiki.lazarus.freepascal.org/Projects_using_Lazarus ---------------------------------------------------------------------- Marc · 2007-08-14 08:48 thats the visual and RTTI part of lazarus FPC. You don't need to put everything in code. All visual layout is encoded in a resoucestream (which is encoded in unit1.lrs) All classes derived from TComponent know how to read this and while creating, during the loading phase, all values for the changed properties are read and set. So unlike other languages, you don't need to write any code for this yourself. When adding columns, you probably clicked on the columns property in the ObjectInspector. All properties you see there are the published properties os a class. You can access all of them in your code too. When in the code editor, try typing DrawGrid1. (note the dot) and press CTRL+Space. Now you see all methods and functions available for the grid. ---------------------------------------------------------------------- RudieD · 2007-08-14 11:22 Also, don't you maybe need the dbgrid rather ? It will auto create the required columns for a dataset. ---------------------------------------------------------------------- eedexter · 2007-08-14 14:11 thanks for the help folks.  I liked that grid because the row titles are blank and I am looking for a spreadsheet that I can sometimes put words into, But I don't know why or why I wouldn't like the other one or for that matter what trouble it would cause if I stick with the one I have, I will look into this a little more that should help a bunch.  I saw the example with tcl and was wanting to know if I could do the same with python??  I will have to look closer at all the documention to see what all is posible. ---------------------------------------------------------------------- eedexter · 2007-08-14 16:08 It seems that I have got the classes coming up.....  I believe I am fine when it comes to actions clicks exc..  but I don't have a clue when it comes to getting the data in the form and that probily goes for the text controls also.