mortenm
11/15/2005 10:18:00 AM
Hi marcin,
We made a form that would run executeQuery for each char the user typed. It
worked ok when typing lower case letters, but no when typing upper case
letters. The methods we changed were:
public void textChange()
{
;
super();
element.delAutoCompleteString(this);
qbrName.value("*" + this.text() + "*");
CustTable_ds.executeQuery();
}
public void enter()
{
#define.WM_KEYDOWN (0x0100)
#define.VK_END (0x23)
#define.VK_DOWN (0x28)
int i;
super();
if (this.text())
{
WinApi::sendMessage(this.hWnd(), #WM_KEYDOWN, #VK_END, '');
}
}
public boolean modified()
{
boolean ret;
;
ret = super();
qbrName.value("*" + this.text() + "*");
CustTable_ds.executeQuery();
return ret;
}
Maybe this could help you.
Regards,
Morten Mile
"marcin" wrote:
> Hi, I have created a form with one StringEdit (ItemId) and a Grid containing
> records from the InventTable. I have built a query range (qbr) on
> InventTable.ItemId. When user types chars in the StringEdit control my code
> filters InventTable by mean of overriden method:
>
> public void textChange()
> {
> super();
> qbr.Value(StrFmt('%1*',ItemId.ValueStr()));
> InventTable_DS.ExecuteQuery();
> }
>
> everything works fine except fact that ExecuteQuery() causes my StringEdit
> to get focus - so all text is selected... any ideas? Regards, marcin