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

View File

@@ -954,6 +954,7 @@ type
procedure Loaded; override; procedure Loaded; override;
procedure DoDropDownMenu(Sender: TObject; MousePos: TPoint; var Handled: Boolean); procedure DoDropDownMenu(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
function InternalGetPageClass: TJvCustomPageClass; override; function InternalGetPageClass: TJvCustomPageClass; override;
procedure Paint; override;
property NavPages[Index: Integer]: TJvNavPanelPage read GetNavPage; property NavPages[Index: Integer]: TJvNavPanelPage read GetNavPage;
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
@@ -1618,6 +1619,16 @@ begin
UpdatePositions; UpdatePositions;
end; 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); procedure TJvCustomNavigationPane.SetActivePage(Page: TJvCustomPage);
begin begin
inherited SetActivePage(Page); inherited SetActivePage(Page);