Combo Box Behavior 
Author Message
 Combo Box Behavior

I would like to create an intelligent combo-box so that if you type in the
first few characters of the string it will find the right entry for you.
I am trying to do this by capturing the defaultAction event (the enter key
being pressed) and then searching the list for a match with the entered
string. However I have found that I can't capture that event (the enter
key being pressed). I can capture the event if I use a listbox but I need
to use a combo-box that the user can type into. Any suggestions?

Ari Shapiro  



Sun, 26 Sep 1999 03:00:00 GMT  
 Combo Box Behavior

I have a similar part working for a while now but I am still refining it
so perhaps
I can share an insight or two.  The widget that I have would find the
partially or fully
matched item for you as you type in the entryfield portion of the combo
box,  It doesn't
rely on the enter key so this is how our requirements differed.

I am relying on the XmNmodifyVerifyCallback and XmNvalueChangedCallback
of
CwComboBox.  When the user type in the field, XmNmodifyVerifyCallback is
triggered
and the callbackData contains what the user typed and where he typed it
in the
entryfield.  With this data, the widget then can try to match the items
in the
listbox.  Be careful that you should match against the
displayableStrings of the
converterManager of AbtComboBoxView because you can't assume the items
in
AbtComboBoxView are always String instances.

Hope this is enough for you to start, let me know if you have any
questions.

Wilson.

Quote:

> I would like to create an intelligent combo-box so that if you type in the
> first few characters of the string it will find the right entry for you.
> I am trying to do this by capturing the defaultAction event (the enter key
> being pressed) and then searching the list for a match with the entered
> string. However I have found that I can't capture that event (the enter
> key being pressed). I can capture the event if I use a listbox but I need
> to use a combo-box that the user can type into. Any suggestions?

> Ari Shapiro



Sun, 26 Sep 1999 03:00:00 GMT  
 Combo Box Behavior

What a strange series of coincidences. I have one of these implemented in
VisualAge. It does require dropping into the CW layer, and there is one
line of code that I am not particularly fond of, but what the hell. I have
a column for the Smalltalk report half written on this part already, but am
willing to let the implementation go a little early.

I have attached a .dat file to this document. If this doesn't work, I'll
post it on our web site (which I will do anyway when the column is
submitted).

Wayne
--
Wayne Beaton
The Object People Inc (http://www.objectpeople.com)



Quote:
> I would like to create an intelligent combo-box so that if you type in
the
> first few characters of the string it will find the right entry for you.
> I am trying to do this by capturing the defaultAction event (the enter
key
> being pressed) and then searching the list for a match with the entered
> string. However I have found that I can't capture that event (the enter
> key being pressed). I can capture the event if I use a listbox but I need
> to use a combo-box that the user can type into. Any suggestions?

> Ari Shapiro  

begin 600 combo.dat
<uuencoded_portion_removed>
#20&U
`
end


Wed, 29 Sep 1999 03:00:00 GMT  
 Combo Box Behavior

Quote:

>What a strange series of coincidences. I have one of these implemented in
>VisualAge. It does require dropping into the CW layer, and there is one
>line of code that I am not particularly fond of, but what the hell. I have
>a column for the Smalltalk report half written on this part already, but am
>willing to let the implementation go a little early.

>I have attached a .dat file to this document. If this doesn't work, I'll
>post it on our web site (which I will do anyway when the column is
>submitted).

modifyVerify:clientData:callData: doesn't work correctly with VA3.0a under
OS/2 when the entry field is empty.  It acts as if you clicked on an entry
in the list (brings its entire text into the entry field).  My best guess
is that it's focus related...

You also may want to consider case-insensitive matching.

Tks,
John



Sun, 03 Oct 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help with File-Drop Combo Box behavior

2. Combo Boxes / List Boxes

3. get value of a combo box or a list box in embeds

4. Drop Down Combo Box Issue?

5. different choices for Combo Box in Dataset depending on the row

6. combo box

7. [WB] Combo Box Problem

8. Newbie question about combo boxes

9. VW2.0 Combo Box Widget?

10. ParcPlace Combo Boxes

11. Remove duplicates entries not working on file drop combo box

12. filter on a browse with a combo box ??

 

 
Powered by phpBB® Forum Software