Fixed the problem with Changed for ComboBoxs

Shane

git-svn-id: trunk@141 -
This commit is contained in:
lazarus 2001-01-28 03:51:42 +00:00
parent da5aa5f57d
commit d0a3aae6d1
3 changed files with 29 additions and 2 deletions

View File

@ -52,9 +52,11 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomComboBox.AttachSignals; procedure TCustomComboBox.AttachSignals;
begin begin
Writeln('[TCustomComboBox] AttachSignals');
inherited AttachSignals; inherited AttachSignals;
Assert(False, Format('Trace:[TCustomComboBox.AttachSignals] %s', [ClassName])); Assert(False, Format('Trace:[TCustomComboBox.AttachSignals] %s', [ClassName]));
SetCallback (LM_CHANGED); SetCallback (LM_CHANGED);
Writeln('[TCustomComboBox] Exiting AttachSignals');
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -132,6 +134,7 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomComboBox.DoChange(var Msg); procedure TCustomComboBox.DoChange(var Msg);
begin begin
Writeln('[TCustomComboBox] DoChange');
if Assigned(FOnChange) then FOnChange(Self); if Assigned(FOnChange) then FOnChange(Self);
end; end;
@ -321,6 +324,10 @@ end;
{ {
$Log$ $Log$
Revision 1.4 2001/01/28 03:51:42 lazarus
Fixed the problem with Changed for ComboBoxs
Shane
Revision 1.3 2000/11/29 21:22:35 lazarus Revision 1.3 2000/11/29 21:22:35 lazarus
New Object Inspector code New Object Inspector code
Shane Shane

View File

@ -76,7 +76,19 @@ var
begin begin
Result := True; Result := True;
EventTrace('changed', data); EventTrace('changed', data);
Mess.Msg := CM_TEXTCHANGED; // Changed on 01/04/2001 from LM_CHANGED to CM_TEXTCHANGED by Shane for TCustomEdit
Mess.Msg := LM_CHANGED;
Result := DeliverMessage(Data, Mess) = 0;
end;
function gtkchanged_editbox( widget: PGtkWidget; data: gPointer) : GBoolean; cdecl;
var
Mess : TLMessage;
begin
Result := True;
EventTrace('changed', data);
Mess.Msg := CM_TEXTCHANGED;
Result := DeliverMessage(Data, Mess) = 0; Result := DeliverMessage(Data, Mess) = 0;
end; end;
@ -1098,6 +1110,10 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.19 2001/01/28 03:51:42 lazarus
Fixed the problem with Changed for ComboBoxs
Shane
Revision 1.18 2001/01/24 23:26:40 lazarus Revision 1.18 2001/01/24 23:26:40 lazarus
MWE: MWE:
= moved some types to gtkdef = moved some types to gtkdef

View File

@ -1213,7 +1213,7 @@ begin
else if sender is TCustomCombobox else if sender is TCustomCombobox
then ConnectSignal (PGtkObject(PGtkCombo(gobject)^.entry), 'changed', @gtkchangedCB) then ConnectSignal (PGtkObject(PGtkCombo(gobject)^.entry), 'changed', @gtkchangedCB)
else else
ConnectSignal(gObject, 'changed', @gtkchangedCB); ConnectSignal(gObject, 'changed', @gtkchanged_editbox);
LM_CLICKED : LM_CLICKED :
begin begin
@ -2587,6 +2587,10 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.22 2001/01/28 03:51:42 lazarus
Fixed the problem with Changed for ComboBoxs
Shane
Revision 1.21 2001/01/24 23:26:40 lazarus Revision 1.21 2001/01/24 23:26:40 lazarus
MWE: MWE:
= moved some types to gtkdef = moved some types to gtkdef