Hi All,
Is it just me, but when I switch the “Include All Choice” on in the template options for the File Loaded Drop Combo, I get a first blank entry. Is there something else I need to do for it to display “All”?
I see this question was asked in 2016, but maybe someone has a solution in the meantime, please.
Any suggestions to get this to work, please?
Please post a link to the prior work.
Assuming ABC Templates … need to find the code … look at the Template ABDROPS.CLW for the All option it has code below that sets the .IncludeAll=True
property in the FDCB Class:
#PROMPT('Include ''All'' Choice', CHECK),%DropIncludeAll,AT(10),DEFAULT(%False)
...
#IF(%DropIncludeAll)
%FileDropObjectName.IncludeAll = TRUE
#ENDIF
That uses the FileDropComboClass class inside LibSrc \ ABDROPS.CLW which you see it defaults to All (note Combo inherits from FileDropClass):
FileDropClass CLASS(ViewManager),IMPLEMENTS(WindowComponent),...
IncludeAll BYTE
TextForAll CSTRING(40)
FileDropClass.Init PROCEDURE(SIGNED FieldID,*STRING Pos,VIEW V,QUEUE Q,RelationManager RelMgr,WindowManager WM)
CODE
SELF.TextForAll = 'All' !<---- defaults to ALL
In the ABDrops.CLW FileDropClass.ResetQueue
code below that implements ‘All’ by adding a record to the Queue. As you noted at runtime the 1st Queue record gets added but the value is blank not ‘All’. The value of .TextForAll did =‘All’.
FileDropClass.ResetQueue PROCEDURE(BYTE Force)
...
IF SELF.IncludeAll
CLEAR(SELF.ListQueue)
***** Add Below Line to Fix ALL *****
GET(SELF.DisplayFields.List, 1) !Get First Column of List Queue
***** Add Above Line to Fix ALL *****
SELF.DisplayFields.List.Left = SELF.TextForAll
SELF.DisplayFields.AssignLeftToRight
IF SELF.AddRecord()
i += 1
END
END
It looked like it was missing getting the 1st column in the field pairs. I tried it with adding the noted GET(,1)
line and it worked to show ALL. Please confirm if this works for you and I’ll submit to SV?
1 Like
It works, thank you @CarlBarnes