Function COMBOBOX

User avatar
HATHAL
Posts: 77
Joined: Tue Nov 15, 2005 3:38 pm
Location: The Kingdom Saudi Arabia -Riyadh
Contact:

Function COMBOBOX

Post by HATHAL »

Antonio.
problem with Function COMBOBOX
"fwh 8.2"
is stop push key .
Example push key (T= all list ITEMS COMBOBOX "Testing", "this" ).
I have a very important programme previously used this feature.
Antonio What do I do??
I Do you go back to the old version.
regards,
hathal.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Hathal,

For a quick solution, yes, use the combobox.prg from previous version and compile it and link it as another PRG of your application

Could you provide a PRG sample to check the error ? Thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
HATHAL
Posts: 77
Joined: Tue Nov 15, 2005 3:38 pm
Location: The Kingdom Saudi Arabia -Riyadh
Contact:

Post by HATHAL »

We have tried to link COMBOBOX.PRG.
The problem was not finished.
I sent to you email with program to experiment
With the old and the new version and the same source.
User avatar
HATHAL
Posts: 77
Joined: Tue Nov 15, 2005 3:38 pm
Location: The Kingdom Saudi Arabia -Riyadh
Contact:

Post by HATHAL »

ok now. :lol:
i remove COMBOBOX.OBJ from fivehx.lib and add old COMBOBOX.PRG
thank antonio.
hathal.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Hathal,

Maybe you didn't know that the new Combobox has incremental searching? So the first time you press T you get the first item starting with T (just like the old version). In the old version you could then press T again to get the second item beginning with T. This was OK if there were just a few items beginning with T, but if there were a hundred of them, then the user would have to press T one hundred times to get to the last item.

With incremental searching, the user can type in the first two or three letters of the item and find it quickly even when there are a hundred of them. This really seems to be a better solution.

James
User avatar
Marco Turco
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London
Contact:

Post by Marco Turco »

James,
I have had the same Hathal's problem solved replacing the new combobox class with the old without the incremental searching.

The incremental searching is hard to explain and create a lot of problems in support when you have a lot of customers to assist especially because it doesn't show the letter you have pressed.

Anyhow, due the fact that it is a recent implement, I (and many other programmers - I think) already provided a "Search" function out the combobox to use when there are many items with the same initial character.

I think that a FWH built-in solution could be preferrable for example with a parameter to pass to the combobox command to use the incremental search or the standard search.

Antonio... ?



,
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Marco,

>I have had the same Hathal's problem solved replacing the new combobox class with the old without the incremental searching.

>The incremental searching is hard to explain and create a lot of problems in support when you have a lot of customers to assist especially because it doesn't show the letter you have pressed.

Hmm, it DOES show the letter (it shows the whole word), but it doesn't automatically show the dropdown list when you type. Is that what you meant? Does the old version automatically show the dropdown list?

I am trying to understand why incremental searching should be difficult for the user. When the first letter is pressed, both systems should look exactly the same. It is only after the second letter is pressed that they would be different.

It does seem to me that automatically dropping down the list showing the selected item highlighted in the list would make things more obvious to the user.

Granted, users will be confused if you change the behavior to incremental searching, but once they find how much easier it is, then they will be glad. Some users will always complain about any changes even when they are for the better. But the complaints always stop after a week or two.

James
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Am I right that this thread is only about combobox in DROPDOWN LIST style?

I can't get working search in comboboxes in DROPDOWN style.

Regards,
Otto
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Otto,

Yes, we are only talking about the default style DROPDOWNLIST and there are bugs in the search in DROPDOWN style.

Marco,

I found an old version of TCombobox and I find that it does look exactly the same as the new version after typing one character. The found item is shown in the field.

In the old style, if another character is typed (different than the first one) then a new match is found that starts with the new character.

In the new style, if another character is typed (the same or dfferent than the first one) then a new match is found that has the same first character and the new character as the second letter in the item. This allows you to find a match very quickly even in very large lists.

In the old style, if the user types in the first character and the item shown is not the one they want, then they type in the SAME character again and a second match starting with that character is found. As I said in a previous message, if there are lots of items starting with the same character the user will have to type in lots of characters to get the one they want. With incremental searching, a match is usually found with three or less characters even in lists containing hundreds of items.

Neither the old or the new Combobox automatically shows the dropdown list.

Another issue is that if you are using both comboboxes and dbcomboboxes in the same application, then they should work the same (visually they are the same so users can't tell the difference). DBcomboboxes are specifically designed to handle large lists and they would be unusable with the older search method.

I do note that other apps by Microsoft don't use incremental searching but they also all have very short lists (ten or so items). If your app has nothing but very short lists then the old search method is quite useable.

Perhaps a search style flag would satisfy eveyone. Then the question is, which style to use as the default?

James
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Re: Function COMBOBOX

Post by Ugo »

HATHAL wrote:is stop push key .
Antonio,
the last versions contains this code?

Code: Select all

           ...
           case nKey = 190 
           nKey := 0 
           ::cSearchKey += "." 
           ... 
Please see this tread:
http://forums.fivetechsoft.com/viewtopi ... t=combobox
Ciao, best regards,
Ugo
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Ugo,

Please explain what you are saying.

Did you write the incremental search routine for TCombobox?

What key is 190 and what is it's purpose?

James
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

RE: Return Key Behavior

Another issue I have with the newer TCombobox class is that now the return key acts like the tab key--either will move to the next control. I know lots of programmers from the DOS era still want their apps to move from control to control using the Return key, but this is not standard Windows app behavior. Only the Tab key should do this. The Return key should trigger the default pushbutton (usually the OK button). Since the use of the Return key is now hardcoded into the TCombobox class, if a combobox has focus and the user presses the Return key, the focus will just move to the next control--not trigger the default pushbutton. To make things more confusing when the next control (not a combobox) is in focus then the Return key WILL trigger the default pushbutton.

I suggest that the use of the Return key in TCombobox should be optional and should default to off (lWantReturn := .f. ).

James
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

James Bott wrote:What key is 190 and what is it's purpose?
James,
in Keychar method nKey value is 190 when i press "." char. (i don't know why!)
The code capture this event and insert the correct "." into cSearchKey.

See also this tread:
http://forums.fivetechsoft.com/viewtopi ... t=combobox
you found in my post the possibility to use the "INCREMENTAL" and "PREVIOUS" version, this is the solution for all necessity. :wink:

Sorry for my English :(
Ciao, best regards,
Ugo
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Ugo,

>in Keychar method nKey value is 190 when i press "." char. (i don't know why!)
>The code capture this event and insert the correct "." into cSearchKey.

Perhaps you are using the numeric keypad?

I do see a small problem with optional incremental searching. DBCombo had incremental searching first and since DBCombo inherits from TCombobox, it was inheriting the keyChar() and KeyDown() methods. When incremental searching was added to TCombobox it broke the incremental search in DBComobo. I have now fixed that.

If TCombobox's search method is changed again, then DBCombo will also need some modifications to make sure it is working with the new TCombobox.

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marco,

>
I think that a FWH built-in solution could be preferrable for example with a parameter to pass to the combobox command to use the incremental search or the standard search.
>

Yes, that seems the way to go
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply