MG: bugfixes for TBevel

git-svn-id: trunk@250 -
This commit is contained in:
lazarus 2001-04-02 14:45:26 +00:00
parent 74e4ef2d2d
commit 6fcd18e2a6
4 changed files with 52 additions and 18 deletions

View File

@ -1,8 +1,11 @@
Constructor TBevel.Create(AOwner:TComponent);
Begin
Inherited Create(aOwner);
Inherited Create(AOwner);
ControlStyle:=ControlStyle-[csSetCaption];
FStyle:=bsLowered;
FShape:=bsBox;
SetBounds(0,0,50,50);
End;
Destructor TBevel.Destroy;
@ -43,7 +46,7 @@ Begin
End;
End;
(*Procedure TBevel.Paint;
Procedure TBevel.Paint;
Var
Colora, Colorb:TColor;
Begin
@ -133,8 +136,8 @@ Begin
End;
End;
*)
{
Procedure TBevel.Paint;
Var
Colora, Colorb:TColor;
@ -221,9 +224,13 @@ Begin
End;
End;
End;
}
{
$Log$
Revision 1.3 2001/04/02 14:45:26 lazarus
MG: bugfixes for TBevel
Revision 1.2 2001/03/27 14:27:43 lazarus
Changes from Nagy Zsolt
Shane

View File

@ -746,13 +746,15 @@ end;
{------------------------------------------------------------------------------}
procedure TControl.SetName(const Value: TComponentName);
var
ChangeText: Boolean;
ChangeText: Boolean;
begin
ChangeText := (csSetCaption in ControlStyle) and (Name = text);
ChangeText := (csSetCaption in ControlStyle) and
not (csLoading in ComponentState) and (Name = Text) and
((Owner = nil) or not (Owner is TControl) or
not (csLoading in TControl(Owner).ComponentState));
inherited SetName(Value);
if ChangeText then text := Value;
inherited SetName(Value);
if ChangeText then Text := Value;
end;
{------------------------------------------------------------------------------}
@ -1077,11 +1079,12 @@ end;
{------------------------------------------------------------------------------}
procedure TControl.SetVisible(Value : Boolean);
begin
if FVisible <> Value then
begin
FVisible := Value;
Perform(CM_VISIBLECHANGED, Ord(Value), 0);
end;
if classname='TBEVEL' then writeln('[TControl.SetVisible] ',Value,' ',FVisible);
if FVisible <> Value then
begin
FVisible := Value;
Perform(CM_VISIBLECHANGED, Ord(Value), 0);
end;
end;
{------------------------------------------------------------------------------}
@ -1308,6 +1311,9 @@ end;
{ =============================================================================
$Log$
Revision 1.19 2001/04/02 14:45:26 lazarus
MG: bugfixes for TBevel
Revision 1.18 2001/03/27 21:12:53 lazarus
MWE:
+ Turned on longstrings

View File

@ -40,11 +40,26 @@ end;
------------------------------------------------------------------------------}
procedure TGraphicControl.WMPaint(var Message: TLMPaint);
begin
// Canvas.Lock;
try
// tspeedbutton is buggy: this is a workaround
if lowercase(Classname)='tspeedbutton' then begin
Paint;
finally
// Canvas.Unlock;
exit;
end;
// end of workaround
if Message.DC <> 0 then
begin
// Canvas.Lock;
try
Canvas.Handle := Message.DC;
try
Paint;
finally
Canvas.Handle := 0;
end;
finally
// Canvas.Unlock;
end;
end;
end;
@ -63,6 +78,9 @@ end;
{ =============================================================================
$Log$
Revision 1.2 2001/04/02 14:45:26 lazarus
MG: bugfixes for TBevel
Revision 1.1 2000/07/13 10:28:25 michael
+ Initial import

View File

@ -1589,7 +1589,7 @@ end;
------------------------------------------------------------------------------}
procedure TWinControl.WMWindowPosChanged(var Message : TLMWindowPosChanged);
begin
Writeln('[TWINCONTROL].WMWINDOWPOSCHANGED');
//Writeln('[TWINCONTROL].WMWINDOWPOSCHANGED');
if Message.WindowPos <> nil then
with Message.WindowPos^ do
begin
@ -1965,6 +1965,9 @@ end;
{ =============================================================================
$Log$
Revision 1.28 2001/04/02 14:45:26 lazarus
MG: bugfixes for TBevel
Revision 1.27 2001/03/27 14:27:43 lazarus
Changes from Nagy Zsolt
Shane