Please let me now ?
- Berg Forum
- → Viewing Profile: Posts: DelphiToday
Community Stats
- Group Members
- Active Posts 146
- Profile Views 15,787
- Age 57 years old
- Birthday July 7, 1966
-
Gender
Male
Previous Fields
-
Which color is tomato?
Red
User Tools
Friends
DelphiToday hasn't added any friends yet.
Latest Visitors
Posts I've Made
In Topic: Serialize.LoadFromINI & Columns.Update
17 March 2024 - 10:43 PM
In Topic: Serialize.LoadFromINI & Columns.Update
16 March 2024 - 04:26 PM
Here is a screenshot.
BEFORE-2024-03-16_142156.jpg 11.39KB 0 downloads
Now I close the demo and start it up again.
AFTER-2024-03-16_142302.jpg 12KB 0 downloads
Now you can see that the column order is different.
Hope it's now more clearly.
In Topic: Serialize.LoadFromINI & Columns.Update
16 March 2024 - 03:58 PM
Hi,
No this is not the problem it's only a small fix. The visibility was not the main problem but de order of columns after a restart.
Just check the demo and move some columns and close it and start up again than you can see that the order is not correct.
In de demo i hide some columns so you must run it after the first fix.
In Topic: Serialize.LoadFromINI & Columns.Update
16 March 2024 - 01:08 PM
Found kind of error. First change this in your 'procedure TNxGridSerialization.ReadFromINI'
// NOT CORRECT? Columns[i].Visible := IniFile.ReadBool('Visible Columns' + ID, 'Column' + IntToStr(i), True);
Must be: Columns[i].Visible := IniFile.ReadBool('Visible Columns' + ID, 'Column' + IntToStr(i), Columns[i].Visible); // <<<< Columns[i].Visible (not default TRUE)
Because I create some columns with default visible FALSE. As you can see you set this at first to TRUE when reading non existing INI file.
Now to the problem...
I created a demo and can reproduce the fault.
VirtualGrid_TEST.zip 2.46KB 2 downloads
Try it several times and some columns are not correct after a re-run.
Hope you can find this little problem
In Topic: Serialize.LoadFromINI & Columns.Update
15 March 2024 - 11:37 AM
I always save it when ended the program and load when started.
Always after INIT the NextGrid.
- Berg Forum
- → Viewing Profile: Posts: DelphiToday
- Privacy Policy