Lazarus

Miscellaneous => Suggestions => LCL => Topic started by: wOvAN on November 13, 2009, 06:34:45 am

Title: DBDateEdit
Post by: wOvAN on November 13, 2009, 06:34:45 am
Hello, everyone.

I did a very little job, wrote TDBDateEdit component inherited from TDateEdit and based on implementation of TDBEdit, made some corrections and it seems to work.

I would be glad if someone could  do the rest and place it into LCL.

TO DO:

Code: [Select]
protected
    procedure CalendarPopupReturnDate(Sender: TObject; const ADate: TDateTime); virtual;
Title: Bug: CalendarPopup
Post by: wOvAN on November 15, 2009, 06:58:38 pm
just yet tested TDateEdit on "StayOnTop" form and cought a bug, the calendar window (of course) popups behind the parent form.
in CalendarPopup unit, since that, i suggest change procedure "ShowCalendarPopup" by setting  
PopupForm.FormStyle always to fsStayOnTop.


something like this:
Code: [Select]
procedure ShowCalendarPopup(const Position: TPoint; ADate: TDateTime;
                            OnReturnDate: TReturnDateEvent);
var
  PopupForm: TCalendarPopupForm;
begin
  PopupForm := TCalendarPopupForm.Create(nil);
  PopupForm.Initialize(Position, ADate);
  PopupForm.FOnReturnDate := OnReturnDate;
 
{Let it be on TOP}
  PopupForm.FormStyle:=fsStayOnTop;
 
  //TODO: Change to PopupForm.Show when gtk supports non modal forms on top of
  //modal forms.
  {$IFDEF windows}
  PopupForm.Show;
  {$ELSE}
  PopupForm.ShowModal;
  {$ENDIF}
end;      


Also: i'm not an expert in GTK, but maybe the solution might resolve the showmodal case
Code: [Select]

{$ELSE}
PopupForm.ShowModal;
{$ENDIF}

Thanks for your attention :)
Title: Re: DBDateEdit
Post by: LacaK on November 16, 2009, 08:16:55 am
I think, you should post Feature request in bug tracker (and attach there your code), to not lost this one ...
Title: Re: DBDateEdit
Post by: LacaK on November 23, 2009, 09:14:45 am
Any news in this case ?
Is this FR already in bug tracker ?
or should I post it ?
Title: Re: DBDateEdit
Post by: LacaK on November 26, 2009, 07:38:39 am
http://bugs.freepascal.org/view.php?id=15189
TinyPortal © 2005-2018