jvcllaz: Fix TJvNavigationPaine issues at designtime.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5397 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2016-11-30 16:21:48 +00:00
parent 78c08bdc4d
commit 1a983b8ada
2 changed files with 45 additions and 34 deletions

View File

@ -1,17 +1,24 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="10"/>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="2"/>
<XPManifest>
<TextName Value="CompanyName.ProductName.AppName"/>
<TextDesc Value="Your application description."/>
</XPManifest>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@ -33,72 +40,68 @@
<Unit0>
<Filename Value="JvNavPaneDemo.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JvNavPaneDemo"/>
<CursorPos X="36" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit0>
<Unit1>
<Filename Value="JvNavPaneDemoMainForm.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="JvNavPaneDemoMainFrm"/>
<HasResources Value="True"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="JvNavPaneDemoMainForm.lrs"/>
<UnitName Value="JvNavPaneDemoMainForm"/>
<CursorPos X="56" Y="345"/>
<TopLine Value="341"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<TopLine Value="107"/>
<CursorPos X="56" Y="345"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\..\packages\JvXPBarReg.pp"/>
<UnitName Value="JvXPBarReg"/>
<CursorPos X="15" Y="20"/>
<TopLine Value="2"/>
<CursorPos X="15" Y="20"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="..\..\run\JvXPBar.pas"/>
<UnitName Value="JvXPBar"/>
<CursorPos X="3" Y="1758"/>
<TopLine Value="1747"/>
<CursorPos X="3" Y="1758"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
<Filename Value="..\..\packages\JvXPBarLaz.pas"/>
<UnitName Value="JvXPBarLaz"/>
<CursorPos X="5" Y="9"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<CursorPos X="5" Y="9"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\..\run\JvTypes.pas"/>
<UnitName Value="JvTypes"/>
<CursorPos X="12" Y="41"/>
<TopLine Value="26"/>
<EditorIndex Value="2"/>
<TopLine Value="65"/>
<CursorPos X="31" Y="47"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit5>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
<JumpHistory HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\resources\"/>
<OtherUnitFiles Value="..\..\run\"/>
<IncludeFiles Value="..\..\resources"/>
<OtherUnitFiles Value="..\..\run"/>
<UnitOutputDirectory Value="..\..\out"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
@ -106,9 +109,6 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Watches Count="4">

View File

@ -954,6 +954,7 @@ type
procedure Loaded; override;
procedure DoDropDownMenu(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
function InternalGetPageClass: TJvCustomPageClass; override;
procedure Paint; override;
property NavPages[Index: Integer]: TJvNavPanelPage read GetNavPage;
public
constructor Create(AOwner: TComponent); override;
@ -1618,6 +1619,16 @@ begin
UpdatePositions;
end;
procedure TJvCustomNavigationPane.Paint;
begin
if (csDesigning in ComponentState) or (PageCount = 0) then
begin
Canvas.Brush.Color := Color;
Canvas.FillRect(0, 0, Width, Height);
end;
inherited;
end;
procedure TJvCustomNavigationPane.SetActivePage(Page: TJvCustomPage);
begin
inherited SetActivePage(Page);