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

View File

@ -746,13 +746,15 @@ end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
procedure TControl.SetName(const Value: TComponentName); procedure TControl.SetName(const Value: TComponentName);
var var
ChangeText: Boolean; ChangeText: Boolean;
begin 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); inherited SetName(Value);
if ChangeText then text := Value; if ChangeText then Text := Value;
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
@ -1077,11 +1079,12 @@ end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
procedure TControl.SetVisible(Value : Boolean); procedure TControl.SetVisible(Value : Boolean);
begin begin
if FVisible <> Value then if classname='TBEVEL' then writeln('[TControl.SetVisible] ',Value,' ',FVisible);
begin if FVisible <> Value then
FVisible := Value; begin
Perform(CM_VISIBLECHANGED, Ord(Value), 0); FVisible := Value;
end; Perform(CM_VISIBLECHANGED, Ord(Value), 0);
end;
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
@ -1308,6 +1311,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.18 2001/03/27 21:12:53 lazarus
MWE: MWE:
+ Turned on longstrings + Turned on longstrings

View File

@ -40,11 +40,26 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TGraphicControl.WMPaint(var Message: TLMPaint); procedure TGraphicControl.WMPaint(var Message: TLMPaint);
begin begin
// Canvas.Lock; // tspeedbutton is buggy: this is a workaround
try if lowercase(Classname)='tspeedbutton' then begin
Paint; Paint;
finally exit;
// Canvas.Unlock; 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;
end; end;
@ -63,6 +78,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.1 2000/07/13 10:28:25 michael
+ Initial import + Initial import

View File

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