Page 1 of 1

FIELD Selector for HMG ?

Posted: Tue May 26, 2020 3:22 am
by AUGE_OHR
hi,

when have a Array from DbStruct() i want to select FIELD to use.
i got a CLASS for Xbase++ but not for HMG.
Picklist.jpg
Picklist.jpg (22.69 KiB) Viewed 2800 times
does somebody already made a Function or CLASS :?:

Re: FIELD Selector for HMG ?

Posted: Tue May 26, 2020 4:36 am
by andyglezl
Easy...

Code: Select all

 
                   @ 250,010 LISTBOX list_1 width 180 HEIGHT 135 TOOLTIP "Doble Click  -->" SORT  FONT "Verdana" SIZE 09 ;
                              ON DBLCLICK { || form_3.list_2.additem(form_3.list_1.item(form_3.list_1.value)), ;
                                               form_3.list_1.deleteitem(form_3.list_1.value) } 
 
                    @ 250,200 LISTBOX list_2 width 180 HEIGHT 135 TOOLTIP "Doble Click  <--" SORT FONT "Verdana" SIZE 09 ;
                              ON DBLCLICK { || form_3.list_1.additem(form_3.list_2.item(form_3.list_2.value)), ;
                                               form_3.list_2.deleteitem(form_3.list_2.value) } 

Re: FIELD Selector for HMG ?

Posted: Wed May 27, 2020 1:04 am
by AUGE_OHR
hi

i have made a PickList Demo which use DBSTRUCT()
hb_PICKLIST.ZIP
(1.84 KiB) Downloaded 161 times
Listbox on right Side have DRAGITEMS .T. so you can move Position
Hb_Picklist.jpg
Hb_Picklist.jpg (49.08 KiB) Viewed 2740 times
have fun

Re: FIELD Selector for HMG ?

Posted: Wed May 27, 2020 3:37 pm
by fouednoomen
Hi AUGE_OHR
i have this error after building program
error.png
error.png (94.4 KiB) Viewed 2657 times

Re: FIELD Selector for HMG ?

Posted: Wed May 27, 2020 4:09 pm
by chrisjx2002
Hi AUGE_OHR,

There is an error when you want to move from right to left due to dragitems flag to .T.
If dragitems flag is .F. everything is OK. When dragitems flag is .T., iMax := LEN( aSelect ) is incorrect... But I don't know how to change it

Re: FIELD Selector for HMG ?

Posted: Wed May 27, 2020 6:26 pm
by AUGE_OHR
fouednoomen wrote: Wed May 27, 2020 3:37 pm i have this error after building program
please show me you Build.LOG which is generate

Re: FIELD Selector for HMG ?

Posted: Wed May 27, 2020 6:30 pm
by AUGE_OHR
hi,
chrisjx2002 wrote: Wed May 27, 2020 4:09 pm There is an error when you want to move from right to left due to dragitems flag to .T.
If dragitems flag is .F. everything is OK. When dragitems flag is .T., iMax := LEN( aSelect ) is incorrect... But I don't know how to change it
hm ...
when using dragitems .T. you have to use SPACEBAR to mark a Item.

Re: FIELD Selector for HMG ?

Posted: Thu May 28, 2020 8:37 am
by chrisjx2002
Thanks for the answer. It works with the space bar!

Re: FIELD Selector for HMG ?

Posted: Thu May 28, 2020 8:18 pm
by fouednoomen
Hi Auge_OHR

this is my Build.LOG file

hbmk2: Processing local make script: hbmk.hbm
hbmk2[PICKLIST]: Warning: File cannot be found: dbf\PICKLIST.hbp
hbmk2[PICKLIST]: Warning: Cannot find dbf\PICKLIST.hbc
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
Cannot open E:\DATACONCEPT\copy.prg, assumed external

No code generated.
hbmk2[PICKLIST]: Error: Running Harbour compiler (embedded). 1
(C:\hmg.3.4.4\harbour\bin\harbour.exe) -n2 E:\DATACONCEPT\copy.prg strecture.prg E:\DATACONCEPT\copy.prg strecture.prg -DHBMK_HAS_PICKLIST=1 -w1 -es2 -DHBMK_HAS_HMG32=1 -q -oC:\Users\user\AppData\Local\Temp\hbmk_ssw91m.dir\ -iC:\hmg.3.4.4\harbour\include -i. -iC:\hmg.3.4.4\include

Re: FIELD Selector for HMG ?

Posted: Thu May 28, 2020 10:45 pm
by AUGE_OHR
fouednoomen wrote: Thu May 28, 2020 8:18 pm this is my Build.LOG file

hbmk2: Processing local make script: hbmk.hbm
hbmk2[PICKLIST]: Warning: File cannot be found: dbf\PICKLIST.hbp
hbmk2[PICKLIST]: Warning: Cannot find dbf\PICKLIST.hbc
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
Cannot open E:\DATACONCEPT\copy.prg, assumed external
hm ... i have blue ICON which is UNICODE IDE while you use red ICON which is ANSI.

you can try to delete hbmk.hbm and just run F5 in IDE