Topic: Grid Table text Right Justified
I just created my first database and I cannot find a way to Left Justify the text in my Grid Table. The labels are left but the data fields are right.
My Visual Database → General → Grid Table text Right Justified
I just created my first database and I cannot find a way to Left Justify the text in my Grid Table. The labels are left but the data fields are right.
Hello lectrond
Welcome to MVD Club !
to justify the contents of a column in a grid
procedure Form1_TableGrid1_OnChange (Sender: string);
begin
Form1.TableGrid1.Columns[0].Alignment := taRightJustify; // first column
Form1.TableGrid1.Columns[1].Alignment := taCenter;
Form1.TableGrid1.Columns[2].Alignment := taLeftJustify;
end;
If you want to justify all the columns we can use a loop
Be carefull, with Delphi (the native language of MVD), the first column begins at 0 (zero)
Hope this helps you !
JB
So, there is no check box for justifying text in a grid? It defaults to Right Justify? I need to write a script to make it left?
I just created a test data base and all of the grid text came back Left Justified. How did all my grid text become Right justified on my first data base? They were simply made using the video. I hate to start from scratch but so far I have found no simple method of justifying my text.
Hi Lectrond,
Any field that is defined as 'text' should appear, by default, as left justified (and with a left justified heading) in any tablegrid. For this, you wouldn't need to write any script.
If you could attach your first test database (without the .exe file) where the text was appearing as right justified, I'm sure someone would be able to have a look at it for you and see if something isn't set up correctly.
Also, which version of MVD are you using?
Regards,
Derek.
Thanks Derek. I'm using Version 4.1 on windows 7 professional. Text boxes have a property called alignment, its there that you can justify the text , taLeftJustify. There is no alignment in the grids property's. If I have to script to Right justify, that's Ok. Well I must have done something wrong. The small test database I made to check for default alignment has overwritten my first database. Even though they have a different name, they are now the same. I will make another test base give it a different name and see if it overwrites this one. And so the problems begin.
Ok, dig this. I make a test program called Test_grid, to check the default text alignment on the grid and it defaults correctly. Today I open my original database and it is now the same as the Test_grid. I made a third data base callec Test_three, and saved it to Test_three. Now all my other two databases are the same as Test_three, even though one was dated last saved, yesturday. This is what upsets me about simple software not working correctly. Can anyone explain this thing?
OK its verified. Saving any MVD program on my computer automatically changes all and every other MVD project to the current one irregardless of where they are. Open them individually and they will all be the last one saved. Even if you erase the last one, the remainder will all be the same. Even if you reboot. I tried it on our server and in my C drive and the same. This is a serious problem that I have never encountered. If believe, because my program was also, right justifying the text in my grid that the main program is corrupted. This only verifies it. Someone please advise.
Hello lectrond, Derek
Send us your project (without .dll and .exe) and show us exactly what you want to obtain as justification.
Left, Right or Center Justify some columns (or all) of a grid is not difficult by using OnChange event on your grid
(as I posted it into my first answer)
Best regards
JB
I cannot save my projects anymore. Saving a new project automatically changes all existing projects. I have found no solution. Presently MVD is no longer being used until someone can explain this.
Solved. How many of you knew that you have to save each project to its own folder. I just found out.
Once again, I have come to a complete stop. I started working on some relationships and now I get " no such table: machine_parts" and I am looking right at it. There is no typo. This is getting quite tiresome. Can someone help me with this?
Hello Lectrond,
Most of us have encountered these sort of error messages at one time or another and it's usually a quick fix. If you attach your project, someone will be able to point out what has happened.
Derek
How do I attach my project?
Hello lectrond, hello Derek
You send us all parts of your project without .exe and dll.files.
You zip them and join them as attachment (see attachments at bottom of your message fenester and click Choose a file.
When you've picked zip file of your project, click on Add file (its name will display at the end of your message) then click on Submit Reply
No hesitation if you meet any problem, call us
Regards
JB
Here is my project sans dll and exe.
Hi Lectrond,
Thanks for the attachement.
Was the 'machine parts' table previously named 'service_records'?
Simply renaming a table or field in MVD doesn't normally cause this type of problem so I'm wondering if the database was moved or copied from another location with a schema that was out of sync with the current MVD table definitions.
Anyway, in this instance, all you need to do is to delete sqlite.db and then run your project again; sqlite.db will recreate itself and start to use the updated schema.
Hope this moves you forward,
Derek.
Thank you, that worked.
My Visual Database → General → Grid Table text Right Justified
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi