Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 17992, Makes Focuscontrol having behavior of control with ID

by M. Youssfi Email: Anonymous

If you want a FocusControl to have a same behavior like WinApi controls with ID
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 4.0  to 6.0 74 downloads
Copyright: No significant restrictions

Size: 311,979 bytes
Updated on Wed, 08 May 2002 19:04:26 GMT
Originally uploaded on Wed, 08 May 2002 05:15:20 GMT
SHA1 Hash: 2FE316D2C44412844E5613BB12664C411EFD0E3C
MD5 Hash: 12EBB93AF1AA311E2CDA336CB117193F

    Explore the files in this upload

Add the following modification to stdCtrls.pas and then add a reference to this modified unit in Path Library.

Here is the code:
---------------------Begin Modification------------------------------

procedure TCustomLabel.CMDialogChar(var Message: TCMDialogChar);
if (FFocusControl <> nil) and Enabled and ShowAccelChar and
IsAccel(Message.CharCode, Caption) then
with FFocusControl do
if CanFocus then
{Modification by M. Youssfi to force all text to be selected in
TCustomEdit descendant}
if FFocusControl is TCustomEdit then
SendMessage(TCustomEdit(FFocusControl).Handle, EM_SETSEL, 0, -1);
{Force All text to be selected in TCustomEdit child of
TCustomComboBox descendant}
if FFocusControl is TCustomComboBox then
if TCustomComboBox(FFocusControl).Style in [csDropDown,csSimple] then
Message.Result := 1;
---------------------End Modification--------------------------------


   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04