You've already forked lazarus-ccr
* Fixed inline editor auto size feature
* Removed references for TnT components git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@302 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -20,9 +20,6 @@
|
|||||||
// See below for more info about it.
|
// See below for more info about it.
|
||||||
{.$define UseLocalMemoryManager}
|
{.$define UseLocalMemoryManager}
|
||||||
|
|
||||||
{.$define TntSupport} // Added by Igor Afanasyev to support unicode-aware inplace editors. This implementation uses
|
|
||||||
// Troy Wolbrink's TNT controls, which can be found at:
|
|
||||||
// http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm.
|
|
||||||
|
|
||||||
//Lazarus port options
|
//Lazarus port options
|
||||||
{$define EnableOLE}
|
{$define EnableOLE}
|
||||||
|
@ -137,9 +137,6 @@ uses
|
|||||||
, Themes, UxTheme
|
, Themes, UxTheme
|
||||||
{$endif COMPILE_7_UP}
|
{$endif COMPILE_7_UP}
|
||||||
{$endif ThemeSupport}
|
{$endif ThemeSupport}
|
||||||
{$ifdef TntSupport}
|
|
||||||
, TntStdCtrls // Unicode aware inplace editor.
|
|
||||||
{$endif TntSupport}
|
|
||||||
{$ifdef EnableAccessible}
|
{$ifdef EnableAccessible}
|
||||||
, oleacc // for MSAA IAccessible support
|
, oleacc // for MSAA IAccessible support
|
||||||
{$endif};
|
{$endif};
|
||||||
@ -2738,11 +2735,7 @@ type
|
|||||||
// Edit support classes.
|
// Edit support classes.
|
||||||
TStringEditLink = class;
|
TStringEditLink = class;
|
||||||
|
|
||||||
{$ifdef TntSupport}
|
|
||||||
TVTEdit = class(TTntEdit)
|
|
||||||
{$else}
|
|
||||||
TVTEdit = class(TCustomEdit)
|
TVTEdit = class(TCustomEdit)
|
||||||
{$endif TntSupport}
|
|
||||||
private
|
private
|
||||||
FRefLink: IVTEditLink;
|
FRefLink: IVTEditLink;
|
||||||
FLink: TStringEditLink;
|
FLink: TStringEditLink;
|
||||||
@ -28679,18 +28672,11 @@ var
|
|||||||
begin
|
begin
|
||||||
if not (vsMultiline in FLink.FNode.States) then
|
if not (vsMultiline in FLink.FNode.States) then
|
||||||
begin
|
begin
|
||||||
// avoid flicker
|
|
||||||
SendMessage(Handle, WM_SETREDRAW, 0, 0);
|
|
||||||
|
|
||||||
DC := GetDC(Handle);
|
DC := GetDC(Handle);
|
||||||
LastFont := SelectObject(DC, Font.Handle);
|
LastFont := SelectObject(DC, Font.Handle);
|
||||||
try
|
try
|
||||||
// Read needed space for the current text.
|
// Read needed space for the current text.
|
||||||
{$ifdef TntSupport}
|
|
||||||
GetTextExtentPoint32W(DC, PWideChar(Text), Length(Text), Size);
|
|
||||||
{$else}
|
|
||||||
GetTextExtentPoint32(DC, PChar(Text), Length(Text), Size);
|
GetTextExtentPoint32(DC, PChar(Text), Length(Text), Size);
|
||||||
{$endif TntSupport}
|
|
||||||
Inc(Size.cx, 2 * FLink.FTree.FTextMargin);
|
Inc(Size.cx, 2 * FLink.FTree.FTextMargin);
|
||||||
|
|
||||||
// Repaint associated node if the edit becomes smaller.
|
// Repaint associated node if the edit becomes smaller.
|
||||||
@ -28704,7 +28690,6 @@ begin
|
|||||||
finally
|
finally
|
||||||
SelectObject(DC, LastFont);
|
SelectObject(DC, LastFont);
|
||||||
ReleaseDC(Handle, DC);
|
ReleaseDC(Handle, DC);
|
||||||
SendMessage(Handle, WM_SETREDRAW, 1, 0);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -28860,25 +28845,21 @@ begin
|
|||||||
FTree.GetTextInfo(Node, Column, FEdit.Font, FTextBounds, Text);
|
FTree.GetTextInfo(Node, Column, FEdit.Font, FTextBounds, Text);
|
||||||
FEdit.Font.Color := clWindowText;
|
FEdit.Font.Color := clWindowText;
|
||||||
FEdit.Parent := Tree;
|
FEdit.Parent := Tree;
|
||||||
//todo_lcl_check see effect of recreatewnd
|
|
||||||
RecreateWnd(FEdit);
|
|
||||||
FEdit.HandleNeeded;
|
FEdit.HandleNeeded;
|
||||||
FEdit.Text := Text;
|
FEdit.Text := Text;
|
||||||
|
|
||||||
if Column <= NoColumn then
|
if Column <= NoColumn then
|
||||||
begin
|
begin
|
||||||
//FEdit.BidiMode := FTree.BidiMode;
|
FEdit.BidiMode := FTree.BidiMode;
|
||||||
FAlignment := FTree.Alignment;
|
FAlignment := FTree.Alignment;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
//FEdit.BidiMode := FTree.Header.Columns[Column].BidiMode;
|
FEdit.BidiMode := FTree.Header.Columns[Column].BidiMode;
|
||||||
FAlignment := FTree.Header.Columns[Column].Alignment;
|
FAlignment := FTree.Header.Columns[Column].Alignment;
|
||||||
end;
|
end;
|
||||||
{
|
|
||||||
if FEdit.BidiMode <> bdLeftToRight then
|
if FEdit.BidiMode <> bdLeftToRight then
|
||||||
ChangeBidiModeAlignment(FAlignment);
|
ChangeBidiModeAlignment(FAlignment);
|
||||||
}
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user