Hello All,
I want to somewhat mimic the IE address combobox: 1) if a user clicks on the down arrow of the combobox,the user gets a list of the typed addresses. 2) Furtermore if the user starts typing an address he gets a list of the visited addresses that ressemble the typed letters. So far so good.
To do this I put a combobox and a listbox on a form. The listbox's property Visible is set to .F. It changes to .T. if a _tally's query is !0 where after the list gets filled with the query results
Problems/questions:
1) When the listbox becomes visible, it overlaps with my IE activeX control.
So that some listbox items aren't visible anymore (unreadable) . How to resolve this.
2) When the list gets visible the user can scroll through the list with the down and up key. If the bottom or end of the list or if the user is reached, the mouse focus has to go to the combobox. I tried to achieve this with the following code in the keypress event. The web control gets the focus instead of the combobox.
LPARAMETERS nKeyCode, nShiftAltCtrl
#define key_up 5
#define key_down 24
#define key_enter 13
DO CASE
CASE nKeyCode = key_up
IF this.listindex = 1
thisform.combourl.setfocus()
ENDIF
CASE nKeyCode = key_down
IF this.ListIndex = this.ListCount
thisform.combourl.SetFocus
ENDIF
CASE nKeyCode = key_enter
SELECT tbltyped
APPEND BLANK
REPLACE aantal WITH RECNO(),cUrltyped WITH this.Value,dDatetime WITH DATETIME()
thisform.combourl.AddItem(this.Value)
thisform.combourl.value = thisform.list1.Value
thisform.combourl.setfocus
ENDCASE
I still have some questions, but for now the answers on these questions should me getting going on.
Thanks.
Zakaria al Azhar