mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-25 13:48:19 +02:00
implement Ctrl+A to select all text for edit controls
git-svn-id: trunk@7063 -
This commit is contained in:
parent
fbde65eae3
commit
c0bd0aabc6
@ -1395,7 +1395,20 @@ Begin
|
|||||||
|
|
||||||
// we cannot tell for sure windows didn't want the key
|
// we cannot tell for sure windows didn't want the key
|
||||||
// winapi too inconsistent about return value
|
// winapi too inconsistent about return value
|
||||||
|
PLMsg^.Result := 0;
|
||||||
DeliverMessage(lWinControl, PLMsg^);
|
DeliverMessage(lWinControl, PLMsg^);
|
||||||
|
|
||||||
|
// handle Ctrl-A for edit controls
|
||||||
|
if (PLMsg^.Result = 0) and (Msg = WM_KEYDOWN) and (WParam = Ord('A'))
|
||||||
|
and (GetKeyState(VK_CONTROL) < 0) and (GetKeyState(VK_MENU) >= 0) then
|
||||||
|
begin
|
||||||
|
GetClassName(Window, winClassName, 20);
|
||||||
|
if CompareMem(@winClassName, @EditClsName, High(EditClsName)+1) then
|
||||||
|
begin
|
||||||
|
// select all
|
||||||
|
Windows.SendMessage(Window, EM_SETSEL, 0, -1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1524,6 +1537,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.198 2005/04/07 15:52:31 micha
|
||||||
|
implement Ctrl+A to select all text for edit controls
|
||||||
|
|
||||||
Revision 1.197 2005/04/06 10:43:40 micha
|
Revision 1.197 2005/04/06 10:43:40 micha
|
||||||
customcheckbox: do not unnecessarily ask state twice
|
customcheckbox: do not unnecessarily ask state twice
|
||||||
first let widget process BM_SETCHECK, so we do not see itemindex=-1 in between
|
first let widget process BM_SETCHECK, so we do not see itemindex=-1 in between
|
||||||
|
@ -191,6 +191,7 @@ Type
|
|||||||
const
|
const
|
||||||
BOOL_RESULT: Array[Boolean] Of String = ('False', 'True');
|
BOOL_RESULT: Array[Boolean] Of String = ('False', 'True');
|
||||||
ClsName: array[0..6] of char = 'Window'#0;
|
ClsName: array[0..6] of char = 'Window'#0;
|
||||||
|
EditClsName: array[0..4] of char = 'Edit'#0;
|
||||||
ButtonClsName: array[0..6] of char = 'Button'#0;
|
ButtonClsName: array[0..6] of char = 'Button'#0;
|
||||||
ComboboxClsName: array[0..8] of char = 'ComboBox'#0;
|
ComboboxClsName: array[0..8] of char = 'ComboBox'#0;
|
||||||
TabControlClsName: array[0..15] of char = 'SysTabControl32'#0;
|
TabControlClsName: array[0..15] of char = 'SysTabControl32'#0;
|
||||||
@ -290,6 +291,9 @@ End.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.136 2005/04/07 15:52:31 micha
|
||||||
|
implement Ctrl+A to select all text for edit controls
|
||||||
|
|
||||||
Revision 1.135 2005/03/03 13:13:51 vincents
|
Revision 1.135 2005/03/03 13:13:51 vincents
|
||||||
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
|
fixed thread synchronize support for fpc 1.9.9 using WakeMainThread
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user