Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Add support for SCI_GETFOCUS and SCI_SETFOCUS #448

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/ScintillaNET/Scintilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4287,6 +4287,25 @@ public int IndicatorValue
}
}

/// <summary>
/// This is used by clients that have complex focus requirements such as having their own window
/// that gets the real focus but with the need to indicate that Scintilla has the logical focus.
/// </summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool InternalFocusFlag
{
get
{
return (DirectMessage(NativeMethods.SCI_GETFOCUS) != IntPtr.Zero);
}
set
{
var focus = (value ? new IntPtr(1) : IntPtr.Zero);
DirectMessage(NativeMethods.SCI_SETFOCUS, focus);
}
}

/// <summary>
/// Gets or sets the current lexer.
/// </summary>
Expand Down