TDbf field editor has no Display Format property? lazarus / 16-Databases ---------------------------------------------------------------------- emaza · 2008-11-17 01:27 Hi! My XP laptop with Lazarus (9.24?) died recently and I had to go back to my old Win98 desktop. I downloaded Lazarus 0.9.26 beta. Everything nicer looking, beter and easier, BUT: When writing a new program that accesses old DBase table, the output shows in scientific notation. With old Lazarus this was controled with field editor after clicking the field on the list displayed by clicking on the field properties corresponding to the Data Access icon. Similar process now gives me precision and size properties for field (which seem to do nothing) but NO Display Format property. Is this a bug? Did I download the wrong version for my PC? Is there a work-arround? Any reply would be helpfull, I have spent hours on this.. ---------------------------------------------------------------------- DougNettleton · 2008-11-17 21:13 Hi: Seems o.k. in a recent snapshot version 0.9.27 from Nov 12, 2008 - FPC version 2.2.3 Unfortunately, TDBEdit components don't respect the Field alignment properties - a known bug. Regards, Doug ---------------------------------------------------------------------- emaza · 2008-11-18 01:18 Hi Doug, Thanks for your quick reply. I understand that downloading and using snapshot versions is risky, specially for inexperienced users like me. I supose my safe alternatives are either to: a) live with it, keep using 0.9.26 fpc 2.2.2 and wait for a stable version 0.9.27 fpc 2.2.3, or b) download the old 0.9.24 and use that. Have you used the 0.9.27 snapshot? Is there a safe way to test it? Rgds, Maza ---------------------------------------------------------------------- DougNettleton · 2008-11-18 20:35 Hi Maza: If you download any recent version of 0.9.27 with FPC 2.2.3 and it will compile itself, it's probably o.k.  I usually install the following component packages: 1) LazReports 2) rxNew 3) zeoslib version 6.6.3 or a recent snapshot.  If I remember correctly version 6.6.3 doesn't have RefreshCurrent, which I kind of depend on in multi-user Applications.  Currently I'm playing around with a "Single user" application, so I don't care about RefreshCurrent. And then try to compile my app.  If that all goes o.k. that snapshot is usually quite usable.  I use tortoise to keep the lazarus components - especially rxnew up to date. In my experience, you'd have to be very unlucky to not have much better results with a recent snapshot than version 0.9.24.  If any given snapshot doesn't work, I usually just download the next one and give it a try.   When I get one, I like, I usually stick with it for quite a while. Good Luck, Doug ---------------------------------------------------------------------- emaza · 2008-11-20 06:19 Hi Doug, Thanks for your very informative post. I downloaded today’s (20081119) snapshot and gave it a first try. Seems ok, but might have to solve some problem with a “RegisterDBF” unit that poped up. Will give it a better look on the weekend. I have installed and used Lazreports and Zeoslib before, but will have to read up on  rxNew and Tortoise to better understand your advise, and to keep on learning Lazarus. I am also very embarrassed to have to admit, in order not to mislead others who might read my first message, that the Display Format is there in v0.9.26. The following is for the benefit of those, not familiar with Delphi. Readers please bear in mind that the names of the windows mentioned below might not be exact, as in your IDE, because my Lazarus is not in English and I had to translate. Wrong road #1:   Right click on the TDbf to view it in the object inspector. On the Object Inspector properties select FieldDefs and click the “…” button. This will give you an editing window with all your table’s field names. This is a FieldDefs edit window and looks like the one you want, BUT it is not. Wrong road #2:   A right click on the TDbf icon will pop up a menu that will also NOT take you in the right direction, but could be confused with the one you will get in step 1 below. Do not mistake one for the other: Correct road #1:   A left click to select the TDbf icon, followed by a right click on the selected icon will give you the pop up menu that has the “Edit Fields” option on top. This option will display a field editor window for the selected TDbf. Correct road #2:  A double right click on the TDbf icon will take you directly to the above field editor window. In either case, the field editor window will be blank. A right click on it will do nothing, BUT: Correct road, step 2: A left click on this window will pop up a menu with several options. Correct road, step 3: Select the Add fields option of this menu. This will open ANOTHER window (also a FieldDefs window BUT not the same that you get in wrong road #1). This other window will have all your field’s names. Correct road, step 4: Select all the fields, or the ones you want, and click the “Create” button. The window will close and place the selected fields on the original field editor window. They will now also show up in the top of your Object Inspector because Lazarus has now written them for you in the code editor, under your TForm class declaration. Correct road, step 5: Select one of the TDbf’s fields (one is probably already selected) in the Object Inspector, and click the DisplatFormat property. Correct road, step 6:  Write in your desired format. For example: #,##0.00 and you are done. Writing this took some time. I hope it will serve as proper penance for my previous error. Special apologies to Doug might also be in order. Rgds, Maza:)