Skip to content

Commit

Permalink
- adding fix for #96
Browse files Browse the repository at this point in the history
  • Loading branch information
desjarlais committed Jan 5, 2024
1 parent 05b4082 commit fdc2c6f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Scintilla.NET/Scintilla.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NeutralLanguage>en-US</NeutralLanguage>
<Description>Source Editing Component based on Scintilla 5 series.</Description>
<Copyright>Copyright (c) 2018, Jacob Slusser. All rights reserved. VPKSoft, cyber960 2022, desjarlais 2023.</Copyright>
<Version>5.3.3.12</Version>
<Version>5.3.3.14</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\$(Configuration)\ScintillaNET.xml</DocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
Expand All @@ -27,12 +27,12 @@
<PropertyGroup>
<PackageId>Scintilla5.NET</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/desjarlais/ScintillaNET</PackageProjectUrl>
<RepositoryUrl>https://github.com/desjarlais/ScintillaNET</RepositoryUrl>
<PackageProjectUrl>https://github.com/desjarlais/Scintilla.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/desjarlais/Scintilla.NET</RepositoryUrl>
<PackageIcon>vpksoft_logo.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<PackageTags>ScintillaNET Scintilla Editor</PackageTags>
<PackageReleaseNotes>Please visit https://github.com/desjarlais/ScintillaNET/releases to view the release notes.</PackageReleaseNotes>
<PackageReleaseNotes>Please visit https://github.com/desjarlais/Scintilla.NET/releases to view the release notes.</PackageReleaseNotes>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SignAssembly Condition="'$(SignAssembly)' == 'true'">true</SignAssembly>
Expand Down
12 changes: 12 additions & 0 deletions Shared/Scintilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,17 @@ private void InitDocument(Eol eolMode = Eol.CrLf, bool useTabs = false, int tabW
DirectMessage(NativeMethods.SCI_SETINDENT, new IntPtr(indentWidth));
}

/// <summary>
/// Default Attributes values do not always get applied to the control.
/// https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.defaultvalueattribute?view=net-8.0&redirectedfrom=MSDN

Check warning on line 1409 in Shared/Scintilla.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

XML comment has badly formed XML -- 'Reference to undefined entity 'redirectedfrom'.'

Check warning on line 1409 in Shared/Scintilla.cs

View workflow job for this annotation

GitHub Actions / build (Release)

XML comment has badly formed XML -- 'Reference to undefined entity 'redirectedfrom'.'

Check warning on line 1409 in Shared/Scintilla.cs

View workflow job for this annotation

GitHub Actions / build (Release)

XML comment has badly formed XML -- 'Reference to undefined entity 'redirectedfrom'.'
/// "A DefaultValueAttribute will not cause a member to be automatically initialized with the attribute's value. You must set the initial value in your code."
/// This function is created to be called in the OnHandleCreated event so that we can force the default values to be applied.
/// </summary>
private void InitControlProps()
{
CaretLineBackColor = Color.Yellow;
}

/// <summary>
/// Inserts text at the specified position.
/// </summary>
Expand Down Expand Up @@ -1761,6 +1772,7 @@ protected override unsafe void OnHandleCreated(EventArgs e)
{
// Set more intelligent defaults...
InitDocument();
InitControlProps();

// I would like to see all of my text please
DirectMessage(NativeMethods.SCI_SETSCROLLWIDTH, new IntPtr(1));
Expand Down

0 comments on commit fdc2c6f

Please sign in to comment.