TWWDBLookupCombo Modified Flag not set

86 views
Skip to first unread message

Debbie Erickson

unread,
Mar 19, 2015, 12:14:00 PM3/19/15
to woll2woll...@googlegroups.com
Good morning, everyone.  I have the Infopower 2007 components and am in a Delphi 7 environment (Still!  LOL!).  I have a TwwDBGrid and the first column contains an embedded TwwDBLookupCombo.  The property settings I have set on the combo box are:

ssoEnabled:= true;
ssoCaseSensitive:= False;
Showmatchtext:= True;

I don't believe any other fields are pertinent to the question, but if they are, I can provide upon request.

Now, for the question.  I do a closest match by typing something into the column.  I can see that it is finding a match because the rest of the lookup value is in highlight.  I also see an * in the column, so it does look like the record in the grid is in edit or insert mode.  When I press the tab key, I go into the onexit event for the combobox.  At that point, the modified flag value on the combobox is false, the underlying table is in browse, not edit or insert, and when I look at the text property of the combo, it shows a blank. The text that was visible on screen is then cleared, too. Strangely, if I click on a different field, instead of keying the tab key, it all works perfectly.

I was thinking that something was interfering or resetting the tab key.  The code I have in the key down event of the combobox has nothing to do with a tab.

procedure TFormDMActiv.DBLookupComboDMAPartsKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  if (Key=VK_ESCAPE) then
  begin
    DMA_DM.TableDMAParts.Cancel;
  end;
end;

Can you please explain what is happening?  I really don't know what to look for.

Debbie Erickson

unread,
Mar 19, 2015, 2:58:09 PM3/19/15
to woll2woll...@googlegroups.com
My bad!  As I clicked on the "post", I realized the problem.  Besides the embedded control, the grid also had a key down event defined.  Sure enough, I had some old code that caused this.  Sorry!!


Reply all
Reply to author
Forward
0 new messages