[lazarus] Some properties doesn't get saved

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 31 18:45:00 EST 2003


On Fri, 31 Oct 2003 14:51:42 -0600 (CST)
Jesus Reyes <jesusrmx at yahoo.com.mx> wrote:

>  --- Jens Arm <Jens.Arm at gmx.de> escribió: > Hi
> > 
> > If I change the fixedrows/fixedcols-property of the tstringgrid
> > they aren't saved in the *.lrs.
> > If I change the Scrollbars property nothing happens.
> > 
> > Jens
> > 
> 
> fixedrows/fixedcols are saved here, however there is a problem when
> fixedrows/cols are >= 5.
> 
> suppose that i set rowcount=10, fixedrows=5 and save the project, in
> the lfm file i get something like this:
>     ...
>     COLCOUNT = 3
>     DEFAULTCOLWIDTH = 64
>     DEFAULTDRAWING = False
>     DEFAULTROWHEIGHT = 24
>     FIXEDCOLOR = -2147483633
>     FIXEDCOLS = 2
>     FIXEDROWS = 5
>     GRIDLINEWIDTH = 0
>     OPTIONS = [gofixedvertline, ... ]
>     PARENTCTL3D = False
>     ROWCOUNT = 10
>     ...
> 
> As a grid is created with 5 cols/rows by default, lazarus reads
> properties as it find it in the lfm file (which  are alphabetically
> sorted I think) 

Not neccessarily. 


> so when lazarus try to set fixedRows to 5 it show a
> messagebox because the rule: FixedRows can't be >= RowCount.
> 
> so, how can I 'force' RowCount to appear before FixedRows in the lfm
> file? or should I find another way using the component state?

This is a common problem during loading. Normal solution: When the csLoading
flag is set, store the new value, override Loaded and set it there.

 
> About the scrollbars it's a gtk interface issue, you can make the
> scrollbars to show but they won't hide

Not completely implemented yet.


>, you can't even get the
> scrollbar size :( ( or there is a way? )

  Width := GetSystemMetrics(SM_CXHSCROLL);
  Height := GetSystemMetrics(SM_CYHSCROLL);

Keep in mind that these values can change during runtime and that the call
is not very fast. 


> by the way, does someone noticed that using clwindow color produces
> black backgrounds?. checkout the color combobox in object inspector.

The color depends on your theme. The gtk-interface uses a special widget,
that most themes forget to set. There is a discussion in the devel list how
to fix this. I hope to improve it next week.


Mattias






More information about the Lazarus mailing list