Re Detect ColWidthChange 
Author Message
 Re Detect ColWidthChange

Thanks to all who responded.
I have found another solution which notifies when a column width changes in
a DBGrid.
It may not be programmatically correct but it works just perfect.
I do not need to know which column changes for my current requirements but
that should not be difficult to include.
Is there a better or correct solution.?
Helmut
unit DBGridcWidth;
interface
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids;
type
  TDBGridcWidth = class(TDBGrid)
  private
    { Private declarations }
    FOnColWidthsChange: TNotifyEvent;
  protected
    { Protected declarations }
    procedure ColWidthsChanged; override;
  public
    { Public declarations }
  published
    { Published declarations }
     property OnColWidthsChanged: TNotifyEvent read FOnColWidthsChange write
FOnColWidthsChange;
  end;
procedure Register;
implementation
procedure Register;
begin
  RegisterComponents('Samples', [TDBGridcWidth]);
end;
procedure TDBGridcWidth.ColWidthsChanged;
end.begin
// FOnColWidthsChange(nil);
  inherited ColWidthsChanged;
end;



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Detecting if SQL Server is running ok.

2. Detecting record changes

3. How to detect other users on the network

4. detecting shift (left right up dn pgup pgdn home end)

5. How can I detect if my database is conected

6. detecting windows version from TP7?

7. Detecting when a key has been released

8. Q: HELP how to detect an update in a table

9. Detect new row in DBGrid

10. Detecting which session is making posts ....

11. Detecting an older instance of the application

12. Detecting record lock in Delphi

 

 
Powered by phpBB® Forum Software