Function COMBOBOX
- HATHAL
- Posts: 77
- Joined: Tue Nov 15, 2005 3:38 pm
- Location: The Kingdom Saudi Arabia -Riyadh
- Contact:
Function COMBOBOX
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.
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.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
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... ?
,
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
Marco Turco
SOFTWARE XP LLP
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
>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
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
Re: Function COMBOBOX
Antonio,HATHAL wrote:is stop push key .
the last versions contains this code?
Code: Select all
...
case nKey = 190
nKey := 0
::cSearchKey += "."
...
http://forums.fivetechsoft.com/viewtopi ... t=combobox
Ciao, best regards,
Ugo
Ugo
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
James,James Bott wrote:What key is 190 and what is it's purpose?
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.
Sorry for my English
Ciao, best regards,
Ugo
Ugo
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
>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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: