You've already forked lazarus-ccr
jvcllaz: Fix compilation of JvTabBar_NotebookPages demo with Laz 2.0.8 (or earlier). Remove version check in JvNotebookPageList.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7399 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -25,7 +25,6 @@
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
|
@ -1064,7 +1064,6 @@ object Form1: TForm1
|
||||
DirectiveAttri.Style = [fsBold]
|
||||
CompilerMode = pcmDelphi
|
||||
NestedComments = False
|
||||
TypeHelpers = True
|
||||
left = 157
|
||||
top = 111
|
||||
end
|
||||
|
@ -6,7 +6,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
|
||||
ActnList, StdActns, Menus, SynEdit, SynHighlighterPas, SynHighlighterXML,
|
||||
ActnList, Menus, LCLVersion,
|
||||
SynEdit, SynHighlighterPas, SynHighlighterXML,
|
||||
JvTabBar, JvNotebookPageList, JvTabBarXPPainter;
|
||||
|
||||
type
|
||||
@ -50,6 +51,9 @@ procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
dir: String;
|
||||
begin
|
||||
{$IF LCL_FullVersion >= 2010000}
|
||||
JvTabBar1.PageListTabLink := true;
|
||||
{$IFEND}
|
||||
dir := ExpandFileName(Application.Location + '../../examples/JvTabBar_NotebookPages/');
|
||||
PasSynEdit.Lines.LoadfromFile(dir + 'main.pas');
|
||||
XMLSynEdit.Lines.LoadFromFile(dir + 'JvTabBarDemo_NotebookPages.lpi');
|
||||
|
@ -21,7 +21,7 @@ unit JvNotebookPageList;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ExtCtrls, LCLVersion,
|
||||
Classes, SysUtils, ExtCtrls,
|
||||
JvPageList;
|
||||
|
||||
type
|
||||
@ -100,13 +100,11 @@ end;
|
||||
|
||||
procedure TJvNotebookPageList.MovePage(CurIndex, NewIndex: Integer);
|
||||
begin
|
||||
{$IF LCL_FullVersion >= 2010000}
|
||||
Pages.Move(CurIndex, NewIndex); // Fix for issue #36956
|
||||
{$ELSE}
|
||||
Pages.Exchange(CurIndex, NewIndex);
|
||||
// Note: This code is not working (issue #36956), it exchanges the captions,
|
||||
// not the pages. Required changes in TNotebook are available only in Laz 2.1+
|
||||
{$IFEND}
|
||||
Pages.Move(CurIndex, NewIndex);
|
||||
// Note: This code is not working for Laz < 2.1 (issue #36956),
|
||||
// it exchanges the captions only (not the pages) when PageListTabLink is false
|
||||
// or crashes when PageListTabLink is true.
|
||||
// Required changes in TNotebook are available only in Laz 2.1+
|
||||
end;
|
||||
|
||||
procedure TJvNotebookPagelist.PageCaptionChanged(AIndex: Integer;
|
||||
|
Reference in New Issue
Block a user