devexpress - Delphi: Name of Method that is called for updating content of TxcDateEdit (or TEdit) control needed -
i'm writing routine checks input of tcxdateedit (from devexpress). after number typed in, should check , try autocomplete rest of content. in case, if user types in day in empty tcxdateedit control should automatically fill in current month , year.
the problem need fire autocompletion method after number typed user , visually added in tcxdateedit control. can check actual input. i'm searching name of method used control update tcxdateedit. don't mean method implies focus lost, mean method called typing in control after (or while) each typed key added string variable content of control. i'm pretty sure similar method exists in common tedit control. if tell me name of method thankful.
thanks in advanced!
what ask possible using onchange event of properties, shown in following image

using event , editingtext property edit, can use following code:
uses dateutils, strutils; procedure tform1.cxdateedit1propertieschange(sender: tobject); var month : word; year : word; day : word; barpos : integer; dateedit : tcxdateedit; begin dateedit := (sender tcxdateedit); barpos := pos('/', dateedit.editingtext); if barpos > 0 begin month := monthof(now); year := yearof(now); day := strtoint(leftstr(dateedit.editingtext, barpos -1 )); dateedit.date := encodedate(year, month, day); end; end; this code automatically assigns current month , year when day typed in user, can adapt whatever requirements.
i tested on delphi 2006 version 6.42 of devexpress expresseditors library.
Comments
Post a Comment