schreddermaus
11th May 2011, 09:41
Hi guys,

does anybody know how to use GBF and did you already use the option GBF.OPT.MULTIPLE?
I don't get it. All I can do is selecting one item of the tree but not a multiple select.
I'll thank you for every example you can give to me that works!


That was my try:
|Initialise the GBF
ret.val = gbf.init(
gbf.current.library(), |* library
gbf.title, |* title
|* default menu
GBF.MENU.ALL
- GBF.MENU.SRCH.CODE
+ GBF.MENU.FILE.OPEN,
|* standard buttons
GBF.BUTTON.ALL
- GBF.BUTTON.FILE.SAVE
- GBF.BUTTON.CUT
- GBF.BUTTON.UNDO
- GBF.BUTTON.INSERT
- GBF.BUTTON.COPY
- GBF.BUTTON.PASTE
- GBF.BUTTON.DELETE
- GBF.BUTTON.TEXT
- GBF.BUTTON.GRP.NEW
- GBF.BUTTON.GRP.FRST
- GBF.BUTTON.GRP.PREV
- GBF.BUTTON.GRP.NEXT
- GBF.BUTTON.GRP.LAST,
|* Options
GBF.OPT.1.WINDOW
+ GBF.OPT.SHADOWS
+ GBF.OPT.NO.UNSELECT
+ GBF.OPT.MULTIPLE
+ GBF.OPT.TREE.CONTROL)

Because I could still select only one element of the tree after this piece of code, I also tried to implement the function gbf.on.selection to run gbf.set.selected within this function. But all I get is a unresolved reference to function error while compiling the code.

function extern void gbf.on.selection(long obj.id, long obj.type, long transition)
{
ON CASE obj.type
CASE GBF.LEAF:
if transition = GBF.SELECT then
gbf.set.selected(obj.id)
endif
break
CASE GBF.INTERIOR:
if obj.id > 2 and transition = GBF.SELECT then
gbf.set.selected(obj.id)
endif
break
CASE GBF.HEADER:
break
default:
break
ENDCASE
}

Can somebody help me?

schreddermaus
11th May 2011, 10:49
Perhaps it's good to know for you:
I tried to change the code of tsfcgdll9400 to make ist multiselectable.

It seems that I cannot do any changes in the gbf.init(). I also changed GBF.OPT.NO.UNSELECT to GBF.OPT.UNSELECT and when I run the session, I still cannot unselect anything ... :(
Is the something that overwrites the options set in the gbf.init()?

schreddermaus
16th May 2011, 11:40
I found the problem:
GBF.OPT.TREE.CONTROL and GBF.OPT.MULTIPLE cannot be used in combination. If I remove GBF.OPT.TREE.CONTROL the multiple selection works.


|Initialise the GBF
ret.val = gbf.init(
gbf.current.library(), |* library
gbf.title, |* title
|* default menu
GBF.MENU.ALL
- GBF.MENU.SRCH.CODE
+ GBF.MENU.FILE.OPEN,
|* standard buttons
GBF.BUTTON.ALL
- GBF.BUTTON.FILE.SAVE
- GBF.BUTTON.CUT
- GBF.BUTTON.UNDO
- GBF.BUTTON.INSERT
- GBF.BUTTON.COPY
- GBF.BUTTON.PASTE
- GBF.BUTTON.DELETE
- GBF.BUTTON.TEXT
- GBF.BUTTON.GRP.NEW
- GBF.BUTTON.GRP.FRST
- GBF.BUTTON.GRP.PREV
- GBF.BUTTON.GRP.NEXT
- GBF.BUTTON.GRP.LAST,
|* Options
GBF.OPT.1.WINDOW
+ GBF.OPT.SHADOWS
+ GBF.OPT.NO.UNSELECT
+ GBF.OPT.MULTIPLE)