I am kind of stuck with the following:
I am currently floating a control (datepicker from rxlib) over a grid with the following code:
procedure TLog.LogGridDrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
If DataCol = 0 then begin
If LogModule.tblLog.State in [dsEdit, dsInsert] then begin
If (gdFocused in State) then begin
Date.Left := LogGrid.Left + Rect.Left;
Date.Top := LogGrid.Top + Rect.Top;
Date.Width := Rect.Right - Rect.Left;
Date.Visible := True;
And when I want to make the control invisible again I use the following code:
procedure TLog.LogGridColExit(Sender: TObject);
If LogGrid.Columns.Title.Caption = Date.Name then
Date.Visible := False;
Ok now to my question:
How do I make the control invisible when I click on the horizontal scroll bar and also when I click on a component outside of the grid.
P.S. If you try the code above you will see it only makes the control invisible when I click on another field in the grid.
Thanks in advance for any help you can provide.
Note to Igor
If it would not take up much of your time then I think coming up with a
away to override the dbgrid would be the best bet. And since this sound like a big task I have increased the points as you can see.
Have you ever had your Delphi form/application just hanging while waiting for data to load?
This is the article to read if you want to learn some things about adding threads for data loading in the background.
First, I'll setup a general applica…
This Article will show you how to validate number with TEdit control,
What's the TEdit control?
TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …