diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 3f52c8300a..7d5bc02339 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -309,8 +309,8 @@ type FAlignmentWidget : TAlignment; procedure SetSimpleText(Value : String); public - constructor Create(AOwner : TComponent); - destructor Destroy; + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; published property SimpleText : String read FSimpleText write SetSimpleText; property Visible; @@ -876,6 +876,10 @@ end. { ============================================================================= $Log$ + Revision 1.2 2000/12/29 18:33:54 lazarus + TStatusBar's create and destroy were not set to override TWinControls so they were never called. + Shane + Revision 1.1 2000/07/13 10:28:23 michael + Initial import diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 0a063db274..ced63b5beb 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -1192,16 +1192,9 @@ end; ------------------------------------------------------------------------------} constructor TControl.Create(AOwner : TComponent); begin -{ if AOwner = nil - then Assert(False, Format('Trace:[TControl.Create] %s --> Create(AOwner: nil)', [ClassName])) - else Assert(False, Format('Trace:[TControl.Create] %s --> Create(AOwner: %s)', [ClassName, AOwner.ClassNAme])); -} inherited Create(AOwner); - FControlStyle := [csCaptureMouse, - csClickEvents, - csSetCaption, - csDoubleClicks]; + FControlStyle := [csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks]; FAnchors := [akLeft,akTop]; FAlign := alNone; // initial control isn't visible (It isn't created yet) @@ -1283,6 +1276,10 @@ end; { ============================================================================= $Log$ + Revision 1.7 2000/12/29 18:33:54 lazarus + TStatusBar's create and destroy were not set to override TWinControls so they were never called. + Shane + Revision 1.6 2000/12/29 13:14:05 lazarus Using the lresources.pp and registering components. This is a major change but will create much more flexibility for the IDE. diff --git a/lcl/include/statusbar.inc b/lcl/include/statusbar.inc index 787ff6064d..255dbf47aa 100644 --- a/lcl/include/statusbar.inc +++ b/lcl/include/statusbar.inc @@ -3,19 +3,15 @@ {------------------------------------------------------------------------------} constructor TStatusBar.Create(AOwner : TComponent); begin - Assert(False, 'Trace:Inside TStatusBar Constructor'); inherited Create(AOwner); fCompStyle := csStatusBar; + Align := alBottom; + + Setbounds(0,TWinControl(AOwner).Height-15,TWInControl(AOwner).Width,15); - CreateComponent(AOwner); - Height := 15; - Width := 100; - Top := 3; - Left := 1; FContext := 0; -Align := alBottom; FMessage := -1; end; diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index 638dafa4fe..a26ef3f189 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -1739,8 +1739,6 @@ begin if (Parent <> nil) then Parent.HandleNeeded; end; - // MWE: moved to createwnd - // if fCompStyle <> csNone then CreateHandle; end; end; @@ -1892,6 +1890,10 @@ end; { ============================================================================= $Log$ + Revision 1.6 2000/12/29 18:33:54 lazarus + TStatusBar's create and destroy were not set to override TWinControls so they were never called. + Shane + Revision 1.5 2000/12/29 13:14:05 lazarus Using the lresources.pp and registering components. This is a major change but will create much more flexibility for the IDE. diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index 18aa63b2fd..dc4c88494e 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -985,22 +985,8 @@ begin else writeln ('STOPPOK: [TGtkObject.SetText] Possible superfluous use of SetText, use SetLabel instead!'); end; -{STOPPOK: Code seems superfluous, see SetLabel instead -var - pStr: PChar; - // Stoppok: Hmm, this cast looks quite dangerous if the code above is also valid - case TLMNotebookEvent(Data^).fCompStyle of - csNotebook : - begin -writeln ('STOPPOK: [TGtkObject.SetText] Notebook: Why the hell are we getting here?'); - pStr := StrAlloc(Length(TLMNotebookEvent(Data^).Str) + 1); - StrPCopy(pStr, TLMNotebookEvent(Data^).Str); - gtk_notebook_set_tab_label_text(PGtkNotebook(TWinControl(TLMNotebookEvent(Data^).Parent).handle), - PGtkWidget(TWinControl(TLMNotebookEvent(Data^).Child).handle), - pStr); - end; - end; -} +{STOPPOK: Code seems superfluous, see SetLabel instead} + end; {------------------------------------------------------------------------------ @@ -1848,6 +1834,15 @@ begin csSTATUSBAR : begin + Writeln('*****************************'); + Writeln('*****************************'); + Writeln('*****************************'); + Writeln('*****************************'); + Writeln('*******gtk_status_bar********'); + Writeln('*****************************'); + Writeln('*****************************'); + Writeln('*****************************'); + Writeln('*****************************'); P := gtk_statusbar_new(); Assert(False, 'Trace:In CreateComponent --StatusBar'); end; @@ -2702,6 +2697,10 @@ end; { ============================================================================= $Log$ + Revision 1.12 2000/12/29 18:33:54 lazarus + TStatusBar's create and destroy were not set to override TWinControls so they were never called. + Shane + Revision 1.11 2000/12/22 19:55:38 lazarus Added the Popupmenu code to the LCL. Now you can right click on the editor and a PopupMenu appears.