开发者

Adding a checkbox to cxGridDBColumn (DateEdit)

I using Delphi BDS 2006 and have a DevExpress cxGridDBColumn with properties set to DateEdit and was wondering whether it is possible to add a checkbox to the di开发者_如何学JAVAsplayed date time picker popup?


I am not sure that I understand what you wish to achieve. Anyway, it is impossible without creating a custom cxEditor which supports this look&feel and desired functionality.


Here is a quick hack which should help you implement this feature. However, you should handle the checkBox yourself. I have done this for the standalone editor, however, the same approach will work with the inplace editor:

procedure TForm1.cxDateEdit1PropertiesPopup(Sender: TObject);
var
  AEdit: TcxDateEdit;
  ACalendar: TcxPopupCalendar;
  ACheckBox: TcxCheckBox;
begin
  AEdit := TcxDateEdit(Sender);
  if AEdit.Tag <> 1 then
  begin
    AEdit.Tag := 1;
    ACalendar := TcxPopupCalendar(AEdit.Properties.PopupControl);
    ACheckBox := TcxCheckBox.Create(Self);
    ACheckBox.Parent := ACalendar.Parent;
    ACheckBox.Align := alBottom;
    ACheckBox.Transparent := True;
    ACalendar.Parent.Height := ACalendar.Parent.Height + ACheckBox.Height;
  end;
end;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜