Mega Code Archive

 
Categories / Delphi / Examples
 

Status-progressbars

Subject: RE: ProgressBar in StatusPanel Wolfgang, Create a TStatusBar component as below, enabling csAcceptsControls in its ControlStyle: unit MyStatusBar; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls; type TMyStatusBar = class(TStatusBar) private { Private declarations } protected { Protected declarations } public constructor Create(AOwner: TComponent); override; published { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Win32', [TMyStatusBar]); end; constructor TMyStatusBar.Create(AOwner: TComponent); begin inherited Create(AOwner); ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, csDoubleClicks]; end; end. An instance of this StatusBar will accept controls (and respond to mouse clicks). If you don't need to have a control on the StatusBar respond to mouse clicks, you may want to set this as: ControlStyle := [csAcceptsControls, csNoStdEvents]; Help (ControlStyle) says the application will run faster if you have this setting. SizeGrip on the ScrollBar still works with csNoStdEvents enabled. Note that such a control's Left setting is relative to the StatusBar's Left; I don't know how (or if you can) position such a control relative to a StatusBar.Panel[]. I position them as part of the MainForm.OnResize event. Steve Helgeson Lamplighter Software -----Original Message----- From: owner-delphi@Kyler.com [mailto:owner-delphi@Kyler.com]On Behalf Of Disch Sent: Friday, March 26, 1999 5:37 AM To: delphi@Kyler.com Subject: ProgressBar in StatusPanel Hi all, how can I make put a TProgressBar (or any other VC) into a TStatusBar? Help would be great, thanks Wolfgang Disch **************************************************** If you don't want to see any more of these messages, send a message to: MajorDomo@Kyler.com with a message of: UNSUBSCRIBE delphi **************************************************** If you don't want to see any more of these messages, send a message to: MajorDomo@Kyler.com with a message of: UNSUBSCRIBE delphi