A better Listbox/Combobox
Moderator: Rathinagiri
A better Listbox/Combobox
Hello,
I only use hmg for a few weeks now, but already, I am amazed, what I can do with my old clipper-code.
Of course, I still have some wishes left. The Listbox/Combobox-behaviour is something that could be improved.
When the user types a key, the first item that starts with that letter gets selected. But when the user types the second letter, it jumps to the first item that starts with that letter.
Much better would be the behaviour of the Firefox-Combobox: The second key gets interpreted as the second letter of the item. If you pause for a while, the key is interpreted as the first letter, again.
When dealing with long lists, it would make it so much more comfortable.
I am not sure, if you can change the Combobox, or if you just use the Windows API.
Have a nice weekend
Raumi75
I only use hmg for a few weeks now, but already, I am amazed, what I can do with my old clipper-code.
Of course, I still have some wishes left. The Listbox/Combobox-behaviour is something that could be improved.
When the user types a key, the first item that starts with that letter gets selected. But when the user types the second letter, it jumps to the first item that starts with that letter.
Much better would be the behaviour of the Firefox-Combobox: The second key gets interpreted as the second letter of the item. If you pause for a while, the key is interpreted as the first letter, again.
When dealing with long lists, it would make it so much more comfortable.
I am not sure, if you can change the Combobox, or if you just use the Windows API.
Have a nice weekend
Raumi75
Raumi75 http://raumi75.jimdo.com
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: A better Listbox/Combobox
Hi,
Thanks for trying HMG.
The feature you are mentioning, is already there Raumi.
The only thing is, you have to add the option "Sort".
This is the syntax for combobox from Roberto's reference.
In this, after invisible, you can see an option SORT.
Thanks for trying HMG.
The feature you are mentioning, is already there Raumi.
The only thing is, you have to add the option "Sort".
This is the syntax for combobox from Roberto's reference.
Code: Select all
@ <nRow> ,<nCol>
COMBOBOX <ControlName>
[ OF | PARENT <ParentWindowName> ]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField1> [ , <ItemSourceField2> ] ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT ]
[ WIDTH <nWodth> ]
[ HEIGHT <nHeight>]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ON DROPDOWN <OnDropDownProcedure> | <bBlock> ]
[ ON CLOSEUP <OnCloseUpProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ BREAK ]
[ GRIPPERTEXT <cGripperText> ]
[ INVISIBLE ]
[ SORT ]
[ IMAGE <acImageNames> ]
[ DROPPEDWIDTH <nDroppedWidth> ]
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: A better Listbox/Combobox
Hello rathinagiri,rathinagiri wrote: The only thing is, you have to add the option "Sort".
thank you for the quick reply. Great to hear that this feature is already implemented.
I just did not expect the SORT-option to do that.
Raumi75
Raumi75 http://raumi75.jimdo.com
Re: A better Listbox/Combobox
Bonsoir tout le monde,
où dois je mettre l'option "SORT" du COMBOBOX dans la grille suivante 'GRID09' à la ligne 54
grand merci a vous
Hi everyone,
Where must I put the "SORT" option COMBOBOX in the following grid 'GRID09' on line 54.
big thank you to you all
où dois je mettre l'option "SORT" du COMBOBOX dans la grille suivante 'GRID09' à la ligne 54
grand merci a vous
Hi everyone,
Where must I put the "SORT" option COMBOBOX in the following grid 'GRID09' on line 54.
big thank you to you all
Code: Select all
/*
* HMG Grid Demo
* (c) 2005 Roberto Lopez
*/
#include "hmg.ch"
Function Main
Local aRows [20] [3]
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 ;
HEIGHT 400 ;
TITLE 'Mixed Data Type Grid Test' ;
MAIN
DEFINE MAIN MENU
DEFINE POPUP 'File'
MENUITEM 'Set Item' ACTION SetItem()
MENUITEM 'Get Item' ACTION GetItem()
END POPUP
END MENU
aRows [1] := {113.12,date(),1,1 , .t. }
aRows [2] := {123.12,date(),2,2 , .f. }
aRows [3] := {133.12,date(),3,3, .t. }
aRows [4] := {143.12,date(),1,4, .f. }
aRows [5] := {153.12,date(),2,5, .t. }
aRows [6] := {163.12,date(),3,6, .f. }
aRows [7] := {173.12,date(),1,7, .t. }
aRows [8] := {183.12,date(),2,8, .f. }
aRows [9] := {193.12,date(),3,9, .t. }
@ 10,10 GRID Grid_1 ;
WIDTH 620 ;
HEIGHT 330 ;
HEADERS {'Column 1','Column 2','Column 3','Column 4','Column 5'} ;
WIDTHS {140,140,140,140,140} ;
ITEMS aRows ;
EDIT ON CHANGE playbeep() ;
COLUMNCONTROLS { {'TEXTBOX','NUMERIC','$ 999,999.99'} , {'DATEPICKER','DROPDOWN'} ,{'COMBOBOX',{'One','Two','Three'}}, { 'SPINNER' , 1 , 20 } , { 'CHECKBOX' , 'Yes' , 'No' } } ;
CELLNAVIGATION
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
PROCEDURE SETITEM()
Form_1.Grid_1.Item (2) := { 123.45 , date() , 2 , 10 , .T. }
RETURN
L'Algerie vous salut
Y.TABET
Y.TABET
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A better Listbox/Combobox
Salaam aleik Tabet
But controls used in this property are limited versions of _real_ controls;
haven't all "specialties" ( properties, methods, events ) of them.
As an example, although when COMBOBOX control used alone has more than 30 "specialties", as a COLUMNCONTROL in GRID has only three:
As a result : we can't use SORT ( and many other ) property of self-contained COMBOBOX, in the COMBOBOX as COLUMNCONTROL in GRID.
Maassalaam
Happy HMG
COLUMNCONTROLS property of GRID is a very handy feature.tonton2 wrote: Where must I put the "SORT" option COMBOBOX in the following grid 'GRID09' on line 54.
But controls used in this property are limited versions of _real_ controls;
haven't all "specialties" ( properties, methods, events ) of them.
As an example, although when COMBOBOX control used alone has more than 30 "specialties", as a COLUMNCONTROL in GRID has only three:
Code: Select all
COMBOBOX
{ cControlType , acItems , axReturnValues }
cControlType 'COMBOBOX' (Required)
acItems (Required)
axReturnValues (Optional)
Maassalaam
Happy HMG
Last edited by esgici on Sun Nov 10, 2013 9:00 am, edited 1 time in total.
Viva INTERNATIONAL HMG
Re: A better Listbox/Combobox
Alakum assalam,
Merci beaucoup mon ami
thank you very much my friend
Merci beaucoup mon ami
thank you very much my friend
L'Algerie vous salut
Y.TABET
Y.TABET
Re: A better Listbox/Combobox
Hi to all the team,
can you be used in place of COMBOBOX => COMBOBOXSEARCH ?
if so, how do it?
Merci beaucoup
can you be used in place of COMBOBOX => COMBOBOXSEARCH ?
if so, how do it?
Merci beaucoup
L'Algerie vous salut
Y.TABET
Y.TABET
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A better Listbox/Combobox
Hi Tabet
If in any form as a _normal_ control, yes;
if in GRID as a column control, no
A column control in GRID may be : TEXTBOX, DATEPICKER, COMBOBOX, SPINNER or CHECKBOX.
Happy HMG
Maassalam
Where ?tonton2 wrote: can you be used in place of COMBOBOX => COMBOBOXSEARCH ?
if so, how do it?
If in any form as a _normal_ control, yes;
if in GRID as a column control, no
A column control in GRID may be : TEXTBOX, DATEPICKER, COMBOBOX, SPINNER or CHECKBOX.
Happy HMG
Maassalam
Viva INTERNATIONAL HMG
Re: A better Listbox/Combobox
COLUMNCONTROLS { {'TEXTBOX','NUMERIC','$ 999,999.99'} , {'DATEPICKER','DROPDOWN'} ,{'COMBOBOX',{'One','Two','Three'}},
merci,
thank you so much now, I'll find another way to do it
merci,
thank you so much now, I'll find another way to do it
L'Algerie vous salut
Y.TABET
Y.TABET
Re: A better Listbox/Combobox
c'est ce que je veux faire dans la grille avec un equivalent de COMBOSEARCHBOXraumi75 wrote:Hello,
......
When the user types a key, the first item that starts with that letter gets selected. But when the user types the second letter, it jumps to the first item that starts with that letter.............; The second key gets interpreted as the second letter of the item.., etc...
.......
When dealing with long lists, it would make it so much more comfortable.
Raumi75
this is what I want to do in the grid with an equivalent of a COMBOSEARCHBOX
Assalama
L'Algerie vous salut
Y.TABET
Y.TABET