Release 0.1.2: workarounds for recent Lazarus changes that broke TOvcTable Columns and Rows property editors and recent FPC 2.1.1 change that broke compilation of ovcvlb.pas.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@51 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
macpgmr
2007-02-05 03:21:13 +00:00
parent 9e709906f5
commit ae8aa2ccaa
5 changed files with 39 additions and 8 deletions

View File

@ -33,15 +33,21 @@
<A name="Whats_New"></A><H3>What's New</H3>
<UL>
<LI>20070128 release:
<LI>20070204 release (0.1.2):
<UL>
<LI>Workarounds found for recent Lazarus changes that broke TOvcTable Columns
and Rows editors.
<LI>Workaround found for recent FPC 2.1.1 change that broke compilation of ovcvlb.pas.<P>
</UL>
<LI>20070128 release (0.1.1):
<UL>
<LI>An example program that demos the TO32FlexEdit control has been added
even though validation doesn't work with LCL (see "To Do" list below).
If you have Delphi you can compile the example to see how validation
is supposed to work.
<LI>Recent changes in FPC 2.1.1 appear to have broken both the Columns
and Rows design-time property editors for the TOvcTable control. The
property editors still work with FPC 2.0.4. Stay tuned...
<LI>Recent changes in Lazarus on Windows appear to have broken both the
Columns and Rows design-time property editors for the TOvcTable control.
The property editors still work with OS X. Stay tuned...
<LI>Custom cursors are now visible when resizing table columns at runtime on
Windows. However, cursor also disappears sometimes. Stay tuned on
this one too...<P>
@ -61,7 +67,7 @@
<UL>
<LI>Controls have now been tested with GTK2 widgetset (see table below).<P>
</UL>
<LI>20070107 release:
<LI>20070107 release (0.1.0):
<UL>
<LI>TOvcVirtualListBox control added.
<LI>Installation no longer registers TOvcSimpleField and TOvcTCSimpleField
@ -145,7 +151,7 @@ access to the Lazarus install folder. After rebuilding, be sure to start
<TD>XP SP2</TD>
<TD>&nbsp;</TD>
<TD>win32</TD>
<TD>20070126 snapshot of 0.9.21 with FPC 2.1.1</TD>
<TD>20070202 snapshot of 0.9.21 with FPC 2.1.1</TD>
</TR>
<TR VALIGN=TOP>
@ -612,7 +618,7 @@ OS X tips for Lazarus:<P>
<P>
<HR>
Last updated: Jan. 28, 2007
Last updated: Feb. 4, 2007
<P>
</BODY>

View File

@ -96,6 +96,7 @@ type
FRows : TOvcTableRows;
FRowNum : TRowNum;
CurDefHt : boolean;
FormShowCalled : Boolean;
protected
procedure RefreshRowData;
@ -165,6 +166,12 @@ procedure TOvcfrmRowEditor.ApplyButtonClick(Sender: TObject);
NewHeight : Integer;
RS : TRowStyle;
begin
{20070204 workaround for recent change to Lazarus where
ctlRowNumberChange gets called by ShowModal for some reason
(thus calling this method) before FormShow event handler
which initializes things.}
if not FormShowCalled then
Exit;
NewRowLimit := StrToIntDef(ctlRowLimit.Text, FRows.Limit);
if (NewRowLimit < 1) or (NewRowLimit > MaxInt) then {Out of range?}
NewRowLimit := FRows.Limit; {Restore previous row limit}
@ -221,6 +228,7 @@ procedure TOvcfrmRowEditor.FormShow(Sender: TObject);
ctlDefaultHeight.Text := IntToStr(FRows.DefaultHeight);
ctlRowLimit.Text := IntToStr(FRows.Limit);
RefreshRowData;
FormShowCalled := True;
end;
{--------}
procedure TOvcfrmRowEditor.RefreshRowData;

View File

@ -164,6 +164,12 @@ procedure TOvcfrmColEditor.ApplyButtonClick(Sender: TObject);
var
NewColWidth : Integer;
begin
{20070204 workaround for recent change to Lazarus where
ctlColNumberChange gets called by ShowModal for some reason
(thus calling this method) before FormShow event handler
which creates and initializes Cells.}
if not Assigned(Cells) then
Exit;
FCols[ColNum].Hidden := ctlHidden.Checked;
NewColWidth := StrToIntDef(ctlWidth.Text, FCols[ColNum].Width);
if (NewColWidth < 5) or (NewColWidth > 32767) then {Out of range?}

View File

@ -31,7 +31,7 @@
"/>
<License Value="MPL 1.1
"/>
<Version Minor="1" Release="1"/>
<Version Minor="1" Release="2"/>
<Files Count="1">
<Item1>
<Filename Value="myovcreg.pas"/>

View File

@ -1159,7 +1159,14 @@ var
Clip : TRect;
Last : Integer;
{20070204 workaround for recent change to FPC that
no longer permits nested procedure to have same
name as other method in class.}
{$IFNDEF FPC}
procedure DrawItem(N : LongInt; Row : Integer);
{$ELSE}
procedure DrawItem2(N : LongInt; Row : Integer);
{$ENDIF}
{-Draw item N at Row}
var
S : PAnsiChar;
@ -1257,7 +1264,11 @@ begin
{display each row}
for I := 1 to Last do
{$IFNDEF FPC}
DrawItem(FTopIndex+Pred(I), I+Ord(FShowHeader));
{$ELSE}
DrawItem2(FTopIndex+Pred(I), I+Ord(FShowHeader));
{$ENDIF}
{paint any blank area below last item}
CR.Top := FRowHeight * (Last+Ord(FShowHeader));