mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 20:18:34 +02:00
New dialog for multiline caption of TCustomLabel.
Prettified TStrings property editor. Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property Removed saving of old combo text (it broke things and is not needed). Cleanups. git-svn-id: trunk@2114 -
This commit is contained in:
parent
e7d65f6940
commit
c6b0c62f81
@ -1186,7 +1186,7 @@ end;
|
||||
procedure TCustomSynEdit.CreateParams(var Params: TCreateParams);
|
||||
const
|
||||
ScrollBar: array[TScrollStyle] of DWORD = (0, WS_HSCROLL, WS_VSCROLL,
|
||||
WS_HSCROLL or WS_VSCROLL);
|
||||
WS_HSCROLL or WS_VSCROLL, WS_HSCROLL, WS_VSCROLL, WS_HSCROLL or WS_VSCROLL);
|
||||
BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER);
|
||||
ClassStylesOff = CS_VREDRAW or CS_HREDRAW;
|
||||
begin
|
||||
|
@ -185,12 +185,12 @@ end;
|
||||
|
||||
procedure TMemoTestForm.Button5Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Lines.Add(Edit1.Text);
|
||||
Memo1.Append(Edit1.Text);
|
||||
end;
|
||||
|
||||
procedure TMemoTestForm.Button6Click(Sender: TObject);
|
||||
begin
|
||||
Memo2.Lines.Add(Edit1.Text);
|
||||
Memo2.Append(Edit1.Text);
|
||||
end;
|
||||
|
||||
begin
|
||||
|
@ -17,32 +17,6 @@
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.Append
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.Append(Value : String);
|
||||
begin
|
||||
//TODO: Custommemo.append
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.SetLines
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMEmo.SetLines(Value : TStrings);
|
||||
begin
|
||||
if Value <> nil then
|
||||
begin
|
||||
Assert(False, 'Trace:Assigning Lines');
|
||||
FLines.Assign(Value);
|
||||
Assert(False, 'Trace:Assigned Lines');
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.Create
|
||||
@ -55,6 +29,8 @@ constructor TCustomMemo.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
fCompStyle := csMemo;
|
||||
Width:= 185;
|
||||
Height:= 89;
|
||||
FWordWrap := True;
|
||||
FFont := TFont.Create;
|
||||
FLines := TMemoStrings.Create(Self);
|
||||
@ -74,16 +50,59 @@ begin
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.Append
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.Append(const Value : String);
|
||||
begin
|
||||
Lines.Add(Value);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.SetLines
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.SetLines(Value : TStrings);
|
||||
begin
|
||||
if Value <> nil then
|
||||
begin
|
||||
Assert(False, 'Trace:Assigning Lines');
|
||||
FLines.Assign(Value);
|
||||
Assert(False, 'Trace:Assigned Lines');
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.SetWordWrap
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.SetWordWrap(Value : Boolean);
|
||||
procedure TCustomMemo.SetScrollbars(const Value : TScrollStyle);
|
||||
begin
|
||||
FWordWrap := Value;
|
||||
//TODO:Call sendmessage
|
||||
if Value <> FScrollbars then begin
|
||||
FScrollbars:= Value;
|
||||
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomMemo.SetWordWrap
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.SetWordWrap(const Value : boolean);
|
||||
begin
|
||||
if Value <> FWordWrap then begin
|
||||
FWordWrap := Value;
|
||||
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
||||
end;
|
||||
end;
|
||||
|
||||
// included by stdctrls.pp
|
||||
@ -91,6 +110,12 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.7 2002/09/05 10:12:07 lazarus
|
||||
New dialog for multiline caption of TCustomLabel.
|
||||
Prettified TStrings property editor.
|
||||
Memo now has automatic scrollbars (not fully working), WordWrap and Scrollbars property
|
||||
Removed saving of old combo text (it broke things and is not needed). Cleanups.
|
||||
|
||||
Revision 1.6 2002/05/10 06:05:52 lazarus
|
||||
MG: changed license to LGPL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user