first of all MOST IMPORTANT for everyone and Rathinagiri: UPDATE HARBOUR please.
HARBOUR COMPILER MINIMUM VERSION REQUIRED IS 3.1 rev. 17105
Some defined vars are added within HbQtGui.ch and I have removed them from hmg.ch
This, for me, it's a good day because I rewrite COMBOBOX object and the compatibility with HMG3 is 80%.
I hope can be a good work.
Only for DROPPEDWITH(), ONCLOSEUP(), ONDROPDOWN() I don't find solution.
Now, ITEMSOURCE, VALUESOURCE and IMAGESOURCE can be used to retrieve data from dbf (see samples/combobox/demo_2.prg). These method can not be used with ITEMS, ADDITEM, IMAGE (as previous Hmg3)
Attention: ITEMS() method must be only used at definition time. After, you must use ADDITEM(....)
Now image are supported (see samples/combobox/demo_1.prg).
I have add a plus: related values. In a combobox always we have a simple list and ITEM(n) give us the displayed text.
With RELATEDVALUES() we can give an alternative returned value using ITEMVAL(n). It can be a number, a string, a date,.... but to prevent errors and to simplify managing always string is returned. If is there someone who want find a good way....
I have done some test (see demo*) but everyone can do more test.
Code: Select all
2011-11-12 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
; HARBOUR COMPILER MINIMUM VERSION REQUIRED IS 3.1 rev. 17105
+ samples/combobox/flags
+ samples/combobox/flags/argentina.png
+ samples/combobox/flags/australia.png
+ samples/combobox/flags/canada.png
+ samples/combobox/flags/denmark.png
+ samples/combobox/flags/finland.png
+ samples/combobox/flags/france.png
+ samples/combobox/flags/italy.png
+ samples/combobox/flags/russian.png
+ samples/combobox/flags/spain.png
+ samples/combobox/flags/sweden.png
+ samples/combobox/flags/switzerland.png
+ samples/combobox/flags/usa.png
+ samples/combobox/flags/usa.png
+ samples/combobox/cicades1.ntx
+ samples/combobox/cicades.dbf
+ samples/combobox/demo_1.hbp
+ samples/combobox/demo_1.prg
+ samples/combobox/demo_2.hbp
+ samples/combobox/demo_2.prg
! source/combobox.prg
! totally rewrited. Please refer to hmg3 documentation
+ RelatedValues() to handle values related with items
+ ItemVal( nIndex, xValue) to get or to set related value
! Item( nIndex, xArg1, xArg2) was extended. xArg2 is the related value.
; these methods are non implemented yet:
DROPPEDWITH(), ONCLOSEUP(), ONDROPDOWN()
! samples/alldemo/demo_1.ch
- removed QAbstractSpinBox_* defined vars because HbQtgui.ch update
* include/hmg.ch
+ #xcommand IMAGESOURCE
! #xcommand ITEMSOURCE
! #xcommand VALUESOURCE
+ #xcommand RELATEDVALUES
- removed QAbstractSpinBox_* defined vars because HbQtgui.ch update