mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:00:16 +02:00
Button.Default now sets focus
git-svn-id: trunk@1945 -
This commit is contained in:
parent
3caa4e4007
commit
3f50a49cd3
@ -1376,25 +1376,22 @@ begin
|
|||||||
|
|
||||||
LM_AddChild :
|
LM_AddChild :
|
||||||
begin
|
begin
|
||||||
Assert(False, 'Trace:Adding a child to Parent');
|
Assert(False, 'Trace:Adding a child to Parent');
|
||||||
If (TWinControl(Sender).Parent is TToolbar) then
|
If (TWinControl(Sender).Parent is TToolbar) then
|
||||||
Begin
|
Begin
|
||||||
// Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> %s ---calling INSERTBUTTON from Add Child', [AParent.ClassName, Sender.ClassNAme]));
|
// Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> %s ---calling INSERTBUTTON from Add Child', [AParent.ClassName, Sender.ClassNAme]));
|
||||||
exit;
|
exit;
|
||||||
end
|
end
|
||||||
else Begin
|
else Begin
|
||||||
AParent := (Sender as TWinControl).Parent;
|
AParent := (Sender as TWinControl).Parent;
|
||||||
if Not Assigned(AParent) then
|
if Not Assigned(AParent) then Begin
|
||||||
Begin
|
Assert(true, Format('Trace: [TgtkObject.IntSendMessage3] %s --> Parent is not assigned', [Sender.ClassName]));
|
||||||
Assert(true, Format('Trace: [TgtkObject.IntSendMessage3] %s --> Parent is not assigned', [Sender.ClassName]));
|
end
|
||||||
|
else Begin
|
||||||
end
|
Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> Calling Add Child: %s', [AParent.ClassName, Sender.ClassNAme]));
|
||||||
else
|
AddChild(Pgtkwidget(AParent.Handle), PgtkWidget(Handle), AParent.Left, AParent.Top);
|
||||||
Begin
|
end;
|
||||||
Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> Calling Add Child: %s', [AParent.ClassName, Sender.ClassNAme]));
|
end;
|
||||||
AddChild(Pgtkwidget(AParent.Handle), PgtkWidget(Handle), AParent.Left, AParent.Top);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LM_LV_DELETEITEM :
|
LM_LV_DELETEITEM :
|
||||||
@ -1444,11 +1441,14 @@ begin
|
|||||||
|
|
||||||
LM_BTNDEFAULT_CHANGED :
|
LM_BTNDEFAULT_CHANGED :
|
||||||
Begin
|
Begin
|
||||||
if (TButton(Sender).Default)
|
if (TButton(Sender).Default) then begin
|
||||||
and (GTK_WIDGET_CAN_DEFAULT(pgtkwidget(handle))) then
|
writeln('AAA1 ',TButton(Sender).Name,':',TButton(Sender).ClassName);
|
||||||
gtk_widget_grab_default(pgtkwidget(handle))
|
TButton(Sender).SetFocus;
|
||||||
else
|
//and (GTK_WIDGET_CAN_DEFAULT(pgtkwidget(handle))) then
|
||||||
gtk_widget_Draw_Default(pgtkwidget(Handle)); //this isn't right but I'm not sure what to call
|
// gtk_widget_grab_default(pgtkwidget(handle))
|
||||||
|
//else
|
||||||
|
// gtk_widget_Draw_Default(pgtkwidget(Handle)); //this isn't right but I'm not sure what to call
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LM_DESTROY :
|
LM_DESTROY :
|
||||||
@ -6734,6 +6734,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.304 2002/12/25 11:53:47 mattias
|
||||||
|
Button.Default now sets focus
|
||||||
|
|
||||||
Revision 1.303 2002/12/22 23:07:28 mattias
|
Revision 1.303 2002/12/22 23:07:28 mattias
|
||||||
mem leak with tooltips, fix from Jeroen
|
mem leak with tooltips, fix from Jeroen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user