lazarus/lcl/include/customlabel.inc
lazarus ecfc86ab66 MG: changed license to LGPL
git-svn-id: trunk@1667 -
2002-05-10 06:05:58 +00:00

123 lines
3.8 KiB
PHP

// included by stdctrls.pp
{******************************************************************************
TCustomLabel
******************************************************************************
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.LCL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
{------------------------------------------------------------------------------
Method: TCustomLabel.SetLayout
Params: None
Returns: Nothing
------------------------------------------------------------------------------}
procedure TCustomLabel.SetLayout(Value : TTextLayout);
begin
if FLayout <> Value then
begin
FLayout := Value;
CNSendMessage(LM_SETPROPERTIES,Self,nil);
end;
end;
{------------------------------------------------------------------------------
Method: TCustomLabel.SetAlignment
Params: None
Returns: Nothing
------------------------------------------------------------------------------}
procedure TCustomLabel.SetAlignment(Value : TAlignment);
begin
if fAlignment <> value then
Begin
fAlignment := value;
handleneeded;
invalidate;
CNSendMessage(LM_SETPROPERTIES,Self,nil);
end;
end;
{------------------------------------------------------------------------------
Method: TCustomLabel.SetWordWrap
Params: None
Returns: Nothing
------------------------------------------------------------------------------}
procedure TCustomLabel.SetWordWrap(Value : Boolean);
Begin
if fWordWrap <> value then
Begin
fWordWrap := value;
HandleNeeded;
invalidate;
CNSendMessage(LM_SETPROPERTIES,Self,nil);
end;
end;
{------------------------------------------------------------------------------
Method: TCustomLabel.GetLabelText
Params: None
Returns: Nothing
------------------------------------------------------------------------------}
function TCustomLabel.GetLabelText: String;
begin
GetLabelText := Caption;
end;
{------------------------------------------------------------------------------
Method: TCustomLabel.Create
Params: AOwner: the owner of the class
Returns: Nothing
Constructor for the class.
------------------------------------------------------------------------------}
constructor TCustomLabel.Create(AOwner : TComponent);
begin
inherited Create(AOwner);
fCompStyle := csLabel;
FLayout := tlBottom;
ControlStyle := ControlStyle + [csOpaque, csReplicatable];
SetBounds(0, 0, 65, 17);
end;
// included by stdctrls.pp
{ =============================================================================
$Log$
Revision 1.3 2002/05/10 06:05:52 lazarus
MG: changed license to LGPL
Revision 1.2 2002/04/18 08:09:03 lazarus
MG: added include comments
Revision 1.1 2000/07/13 10:28:25 michael
+ Initial import
Revision 1.3 2000/05/30 22:28:41 lazarus
MWE:
Applied patches from Vincent Snijders:
+ Added GetWindowRect
* Fixed horz label alignment
+ Added vert label alignment
}