Re: [lazarus] Initialize a DBGrid
German C. Basisty [EMAIL PROTECTED] wrote:Hi! Here goes another question: I have a form. This form contains a DBGrid. The DBGrid retrives information via an SQL connection from a PostgreSQL Database. How do I do to initialize parameters (like DBGrid1.Columns[1].Width := 20) when the form is shown (when the form appears)? Best Regards , German You can init this OnShow event or OnActive or Oncreate it's depend from your application. If you want to init when form show - Form.Show - OnShow If you want to init when form change from Z-windows - OnActive or if just once initialization when form created - OnCreate; You can choose... Thanks sorry for my english =INTOSOFT ALEXIO CHAOS [EMAIL PROTECTED] Yahoo Messager = - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
[lazarus] Initialize a DBGrid
Hi! Here goes another question: I have a form. This form contains a DBGrid. The DBGrid retrives information via an SQL connection from a PostgreSQL Database. How do I do to initialize parameters (like DBGrid1.Columns[1].Width := 20) when the form is shown (when the form appears)? Best Regards , German
Re: [lazarus] Initialize a DBGrid
German C. Basisty wrote: Hi! Here goes another question: I have a form. This form contains a DBGrid. The DBGrid retrives information via an SQL connection from a PostgreSQL Database. How do I do to initialize parameters (like DBGrid1.Columns[1].Width := 20) when the form is shown (when the form appears)? Best Regards , German Exactly like that, I would have thought. You can do it at run time as you have suggested. Put the code in the OnShow event of the form if you want it done once when the form is first opened. Alternatively, you can set them at design time using the columns property of the dbgrid in the Object Inspector. cheers, John _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives