View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017692||Lazarus||LCL||public||2010-10-22 21:53||2010-10-24 21:20|
|Reporter||Miroslav Nyameshchuk||Assigned To||Jesus Reyes|
|Product Version||0.9.29 (SVN)||Product Build|
|Target Version||Fixed in Version||0.9.29 (SVN)|
|Summary||0017692: Don't save parameter StringGrid.DefaultRowHeight|
|Description||In Object Inspector StringGrid.DefaultRowHeight=20.|
But execute program in same computer in Windows XP, this parameter have change to other.
I think, this parameter has depends from System Font Propeties in Screen.
|Tags||No tags attached.|
|Fixed in Revision||27819|
DefaultRowHeight *is not* stored by default and yes initially it's based on the current font size, only if user manually change the value in object inspector it is stored. Once it value is stored the grid should not ignore it but use the stored value.
If there is something not working according to this (logic), it could be an issue, and in this case, please describe how to reproduce the problem.
1. New Project.
2. Put StringGrid on Form
3. Put Label on Form.
procedure TForm1.FormCreate(Sender: TObject);
5. Exit From Lazarus.
Label value is 20
7. Close Program.
8. Change Size of Font in Screen Parameters (Screen Propeties). Exmple "big".
9. Run program.
Label value is 23.
That is correct, as I said it depends on current font (which probably depends on screen resolution).
As it conforms the logic I mentioned I don't see what is the problem.
Before build this parameter has value 20.
After compile (in exe-file) this parameter has values 20 or not?
Is values on Object Inspector must not be saved on program?
"After compile (in exe-file) this parameter has values 20 or not?"
The object inspector shows the current value, but it doesn't necessarily mean it's a fixed value, also it allows you to change it if you want and in this case it becomes a fixed value. Only if it's a fixed value it is stored with the exe other way it's a calculated value.
"Is values on Object Inspector must not be saved on program?
Not necessarily. And in fact if the value was defined as "default" it's not saved in form's lfm file. Even if you change it to a different value and then return it to original value.
For DefaultRowHeight it works a little different, for example if original value is 20 and you change it to 21 and then change it again to 20, the value become fixed the first time it was changed to 21, and there is not way to restore it status to "unfixed" so the value will be stored.
||I am change value in Object inspector from 20 to 21, again from 21 to 20 - no effect. After run program Label value "23".|
||I checked the implementation and you are right, it should be now fixed, please try again and if it's ok please close this report.|
After change value in Object inspector from 20 to 21 and again - all work good. Thanks.
But how to know when the parameter will change in run-time, and when - no?
Make a derived TStrinGrid to access GridFlags property or use an access class:
if gfDefRowHeightChanged in TGridAccess(Grid).GridFlags then
Default Row has been modified, so it's now fixed
Default Row is still calculated.
|2010-10-22 21:53||Miroslav Nyameshchuk||New Issue|
|2010-10-22 21:53||Miroslav Nyameshchuk||Widgetset||=> Win32/Win64|
|2010-10-22 22:14||Jesus Reyes||Status||new => assigned|
|2010-10-22 22:14||Jesus Reyes||Assigned To||=> Jesus Reyes|
|2010-10-22 22:22||Jesus Reyes||LazTarget||=> -|
|2010-10-22 22:22||Jesus Reyes||Note Added: 0042005|
|2010-10-22 22:22||Jesus Reyes||Status||assigned => feedback|
|2010-10-22 22:24||Jesus Reyes||Note Edited: 0042005|
|2010-10-22 22:31||Miroslav Nyameshchuk||Note Added: 0042006|
|2010-10-22 22:40||Jesus Reyes||Note Added: 0042007|
|2010-10-22 22:47||Miroslav Nyameshchuk||Note Added: 0042008|
|2010-10-22 23:09||Jesus Reyes||Note Added: 0042011|
|2010-10-23 12:16||Miroslav Nyameshchuk||Note Added: 0042015|
|2010-10-23 20:34||Jesus Reyes||Fixed in Revision||=> 27819|
|2010-10-23 20:34||Jesus Reyes||Status||feedback => resolved|
|2010-10-23 20:34||Jesus Reyes||Fixed in Version||=> 0.9.29 (SVN)|
|2010-10-23 20:34||Jesus Reyes||Resolution||open => fixed|
|2010-10-23 20:34||Jesus Reyes||Note Added: 0042033|
|2010-10-23 22:11||Miroslav Nyameshchuk||Note Added: 0042036|
|2010-10-24 21:06||Jesus Reyes||Note Added: 0042065|
|2010-10-24 21:20||Miroslav Nyameshchuk||Status||resolved => closed|
|2010-10-24 21:20||Miroslav Nyameshchuk||Note Added: 0042066|