mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 13:39:11 +02:00
EchoMode for TCustomEdit. emNone not implemented for GTK+, falls back to emPassword
behaviour. git-svn-id: trunk@3296 -
This commit is contained in:
parent
284edf961c
commit
bb06eb301c
@ -165,22 +165,34 @@ End;
|
|||||||
Params: Value to set FMaxLength to
|
Params: Value to set FMaxLength to
|
||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
Procedure TCustomEdit.SetMaxLength(Value : Integer);
|
procedure TCustomEdit.SetMaxLength(Value : Integer);
|
||||||
Begin
|
begin
|
||||||
FMaxLength := Value;
|
FMaxLength := Value;
|
||||||
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
||||||
End;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomEdit.SetModified
|
Method: TCustomEdit.SetModified
|
||||||
Params: Value to set FModified to
|
Params: Value to set FModified to
|
||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
Procedure TCustomEdit.SetModified(Value : Boolean);
|
procedure TCustomEdit.SetModified(Value : Boolean);
|
||||||
Begin
|
begin
|
||||||
FModified := Value;
|
FModified := Value;
|
||||||
End;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
Method: TCustomEdit.SetEchoMode
|
||||||
|
Params: Value to set FModified to
|
||||||
|
Returns: Nothing
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TCustomEdit.SetEchoMode(Val : TEchoMode);
|
||||||
|
begin
|
||||||
|
if (Val <> FEchoMode) then begin
|
||||||
|
FEchoMode:= Val;
|
||||||
|
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomEdit.SetReadOnly
|
Method: TCustomEdit.SetReadOnly
|
||||||
@ -242,7 +254,12 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.10 2002/09/07 12:14:50 lazarus
|
||||||
|
EchoMode for TCustomEdit. emNone not implemented for GTK+, falls back to emPassword
|
||||||
|
behaviour.
|
||||||
|
|
||||||
Revision 1.9 2002/08/30 06:46:03 lazarus
|
Revision 1.9 2002/08/30 06:46:03 lazarus
|
||||||
|
|
||||||
Use comboboxes. Use history. Prettify the dialog. Preselect text on show.
|
Use comboboxes. Use history. Prettify the dialog. Preselect text on show.
|
||||||
Make the findreplace a dialog. Thus removing resiying code (handled by Anchors now anyway).
|
Make the findreplace a dialog. Thus removing resiying code (handled by Anchors now anyway).
|
||||||
Make Anchors work again and publish them for various controls.
|
Make Anchors work again and publish them for various controls.
|
||||||
|
@ -45,7 +45,6 @@ type
|
|||||||
|
|
||||||
{ TScrollBar }
|
{ TScrollBar }
|
||||||
|
|
||||||
TEditCharCase = (ecNormal, ecUppercase, ecLowerCase);
|
|
||||||
TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth,
|
TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth,
|
||||||
ssAutoHorizontal, ssAutoVertical, ssAutoBoth);
|
ssAutoHorizontal, ssAutoVertical, ssAutoBoth);
|
||||||
|
|
||||||
@ -327,12 +326,16 @@ type
|
|||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TEditCharCase = (ecNormal, ecUppercase, ecLowerCase);
|
||||||
|
TEchoMode = (emNormal, emNone, emPassword);
|
||||||
|
|
||||||
TCustomEdit = class(TWinControl)
|
TCustomEdit = class(TWinControl)
|
||||||
private
|
private
|
||||||
|
FCharCase : TEditCharCase;
|
||||||
|
FEchoMode : TEchoMode;
|
||||||
FMaxLength : Integer;
|
FMaxLength : Integer;
|
||||||
FModified : Boolean;
|
FModified : Boolean;
|
||||||
FReadOnly : Boolean;
|
FReadOnly : Boolean;
|
||||||
FCharCase : TEditCharCase;
|
|
||||||
FOnChange : TNotifyEvent;
|
FOnChange : TNotifyEvent;
|
||||||
FSelLength : integer;
|
FSelLength : integer;
|
||||||
FSelStart : integer;
|
FSelStart : integer;
|
||||||
@ -348,21 +351,22 @@ type
|
|||||||
function GetSelStart : integer; virtual;
|
function GetSelStart : integer; virtual;
|
||||||
function GetSelText : string; virtual;
|
function GetSelText : string; virtual;
|
||||||
procedure InitializeWnd; override;
|
procedure InitializeWnd; override;
|
||||||
|
procedure SetEchoMode(Val : TEchoMode); virtual;
|
||||||
procedure SetSelLength(Val : integer); virtual;
|
procedure SetSelLength(Val : integer); virtual;
|
||||||
procedure SetSelStart(Val : integer); virtual;
|
procedure SetSelStart(Val : integer); virtual;
|
||||||
procedure SetSelText(const Val : string); virtual;
|
procedure SetSelText(const Val : string); virtual;
|
||||||
|
|
||||||
property OnChange : TNotifyEvent read FOnChange write FOnChange;
|
property OnChange : TNotifyEvent read FOnChange write FOnChange;
|
||||||
public
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure SelectAll;
|
procedure SelectAll;
|
||||||
property CharCase : TEditCharCase read FCharCase write SetCharCase default ecNormal;
|
property CharCase : TEditCharCase read FCharCase write SetCharCase default ecNormal;
|
||||||
|
property EchoMode : TEchoMode read FEchoMode write SetEchoMode default emNormal;
|
||||||
property MaxLength : Integer read FMaxLength write SetMaxLength default 0;
|
property MaxLength : Integer read FMaxLength write SetMaxLength default 0;
|
||||||
property ReadOnly : Boolean read FReadOnly write SetReadOnly default false;
|
property ReadOnly : Boolean read FReadOnly write SetReadOnly default false;
|
||||||
property SelLength: integer read GetSelLength write SetSelLength;
|
property SelLength: integer read GetSelLength write SetSelLength;
|
||||||
property SelStart: integer read GetSelStart write SetSelStart;
|
property SelStart: integer read GetSelStart write SetSelStart;
|
||||||
property SelText: String read GetSelText write SetSelText;
|
property SelText: String read GetSelText write SetSelText;
|
||||||
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
|
||||||
property Modified : Boolean read GetModified write SetModified;
|
property Modified : Boolean read GetModified write SetModified;
|
||||||
property Text;
|
property Text;
|
||||||
published
|
published
|
||||||
@ -393,15 +397,18 @@ type
|
|||||||
TEdit = class(TCustomEdit)
|
TEdit = class(TCustomEdit)
|
||||||
published
|
published
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property OnChange;
|
|
||||||
property OnClick;
|
|
||||||
property CharCase;
|
property CharCase;
|
||||||
property DragMode;
|
property DragMode;
|
||||||
|
property EchoMode;
|
||||||
property MaxLength;
|
property MaxLength;
|
||||||
property PopupMenu;
|
property PopupMenu;
|
||||||
property ReadOnly;
|
property ReadOnly;
|
||||||
property Text;
|
property Text;
|
||||||
property Visible;
|
property Visible;
|
||||||
|
property OnChange;
|
||||||
|
property OnClick;
|
||||||
|
property OnEnter;
|
||||||
|
property OnExit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TMemo = class(TCustomMemo)
|
TMemo = class(TCustomMemo)
|
||||||
@ -418,6 +425,8 @@ type
|
|||||||
property Visible;
|
property Visible;
|
||||||
property WordWrap;
|
property WordWrap;
|
||||||
property OnChange;
|
property OnChange;
|
||||||
|
property OnEnter;
|
||||||
|
property OnExit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCustomLabel }
|
{ TCustomLabel }
|
||||||
@ -725,7 +734,12 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.42 2002/09/07 12:14:50 lazarus
|
||||||
|
EchoMode for TCustomEdit. emNone not implemented for GTK+, falls back to emPassword
|
||||||
|
behaviour.
|
||||||
|
|
||||||
Revision 1.41 2002/09/05 10:12:06 lazarus
|
Revision 1.41 2002/09/05 10:12:06 lazarus
|
||||||
|
|
||||||
New dialog for multiline caption of TCustomLabel.
|
New dialog for multiline caption of TCustomLabel.
|
||||||
Prettified TStrings property editor.
|
Prettified TStrings property editor.
|
||||||
Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property
|
Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property
|
||||||
|
Loading…
Reference in New Issue
Block a user