mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 04:18:48 +02:00
Changes for TComboBox events KeyPress Focus.
Shane git-svn-id: trunk@143 -
This commit is contained in:
parent
b45677ffb5
commit
5db12a2d5c
@ -747,6 +747,7 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
Procedure TWinControl.KeyPress(var Key: Char);
|
||||
begin
|
||||
Writeln('[KeyPress] KeyPress');
|
||||
if Assigned(FOnKeyPress) then FOnKeyPress(Self, Key);
|
||||
end;
|
||||
|
||||
@ -759,6 +760,7 @@ var
|
||||
ShiftState: TShiftState;
|
||||
begin
|
||||
Result := True;
|
||||
Writeln('Getting focus...');
|
||||
F := GetParentForm(Self);
|
||||
if (F <> nil)
|
||||
and (F <> Self)
|
||||
@ -1266,6 +1268,8 @@ end;
|
||||
Procedure TWinControl.WMSetFocus(var Message : TLMSetFocus);
|
||||
Begin
|
||||
Assert(False, Format('Trace:TODO: [TWinControl.LMSetFocus] %s', [ClassName]));
|
||||
Writeln('Getting focus...');
|
||||
DoEnter;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1388,6 +1392,9 @@ end;
|
||||
procedure TWinControl.WMKillFocus(var Message: TLMKillFocus);
|
||||
begin
|
||||
Assert(False, Format('Trace: TODO: [TWinControl.LMKillFocus] %s', [ClassName]));
|
||||
Writeln('Losing focus...');
|
||||
DoExit;
|
||||
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1412,7 +1419,7 @@ end;
|
||||
procedure TWinControl.WMEnter(var Message: TLMEnter);
|
||||
begin
|
||||
Assert(False, Format('Trace: TODO: [TWinControl.LMEnter] %s', [ClassName]));
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinControl.WMEraseBkgnd
|
||||
@ -1884,6 +1891,10 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.12 2001/01/28 21:06:07 lazarus
|
||||
Changes for TComboBox events KeyPress Focus.
|
||||
Shane
|
||||
|
||||
Revision 1.11 2001/01/23 23:33:54 lazarus
|
||||
MWE:
|
||||
- Removed old LM_InvalidateRect
|
||||
|
@ -457,7 +457,10 @@ activate_time : the time at which the activation event occurred.
|
||||
StrDispose(pStr);
|
||||
end;
|
||||
|
||||
LM_SETFOCUS:gtk_widget_grab_focus(PgtkWidget(handle));
|
||||
LM_SETFOCUS: if GTK_WIDGET_CAN_FOCUS(PgtkWidget(Handle)) then
|
||||
gtk_widget_grab_focus(PgtkWidget(handle))
|
||||
else
|
||||
Writeln('This control '+TControl(Sender).name+' can not get focus');
|
||||
|
||||
LM_SetSize :
|
||||
begin
|
||||
@ -1253,6 +1256,12 @@ begin
|
||||
begin
|
||||
if (sender is TMemo) then
|
||||
Writeln('KEY-PRESS-EVENT for TMEmo');
|
||||
if (sender is TComboBox) then
|
||||
Begin
|
||||
ConnectSignal(PgtkObject(PgtkCombo(TComboBox(sender).handle)^.entry), 'key-press-event', @GTKKeyUpDown, GDK_KEY_PRESS_MASK);
|
||||
ConnectSignal(PgtkObject(PgtkCombo(TComboBox(sender).handle)^.entry), 'key-release-event', @GTKKeyUpDown, GDK_KEY_RELEASE_MASK);
|
||||
|
||||
end;
|
||||
ConnectSignal(gFixed, 'key-press-event', @GTKKeyUpDown, GDK_KEY_PRESS_MASK);
|
||||
ConnectSignal(gFixed, 'key-release-event', @GTKKeyUpDown, GDK_KEY_RELEASE_MASK);
|
||||
end;
|
||||
@ -2587,6 +2596,10 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.23 2001/01/28 21:06:07 lazarus
|
||||
Changes for TComboBox events KeyPress Focus.
|
||||
Shane
|
||||
|
||||
Revision 1.22 2001/01/28 03:51:42 lazarus
|
||||
Fixed the problem with Changed for ComboBoxs
|
||||
Shane
|
||||
|
@ -110,6 +110,9 @@ type
|
||||
property Visible;
|
||||
property OnChange;
|
||||
property OnClick;
|
||||
property OnEnter;
|
||||
property OnExit;
|
||||
property OnKeyPress;
|
||||
end;
|
||||
|
||||
TListBoxStyle = (lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable);
|
||||
@ -492,6 +495,10 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.11 2001/01/28 21:06:07 lazarus
|
||||
Changes for TComboBox events KeyPress Focus.
|
||||
Shane
|
||||
|
||||
Revision 1.10 2001/01/11 20:16:47 lazarus
|
||||
Added some TImageList code.
|
||||
Added a bookmark resource with 10 resource images.
|
||||
|
Loading…
Reference in New Issue
Block a user