Can I remove a File Drop Combo from a form?

I have a form that includes a File Drop Combo, and now I want to have a copy of that form, but without the File Drop Combo. I have used the Copy Procedure, rather than create the 2nd form from scratch, but want to replace the Combo field with a string, and do away with the File Drop Combo. (I want that field value to remain unchanged on the 2nd form. I have not been able to remove the File Drop Combo from the Extensions tab on the form. Is this normal, or is there somewhere I should be looking to achieve the deletion?

ADDITIONAL INFO: I apologise, as I have not made this very clear. The steps I have taken have been to delete the FileDropCombo control from the Window Designer, only to find that the Data/Tables still has a Select entry for the file the control was to look up. I don’t seem to be able to remove that entry. I have for now just rebuilt the whole window but this is not the first time I have encountered this issue and wonder if it is just something to live with. PS I am using Clarion9 PE.

Go to Window Designer and delete it from there

To be clear, go to the window designer and delete the control associated with the control template. In this case, the drop list.

If the screens are the same but with minor differences

call procedure w/ parm that tells the mode

Why not just make the dropdown disabled for the 2nd mode

Yeah. Making a copies of code means that you now have to maintain more than one copy of that code.

If you can go with the parameter idea, then you could just hide the undesirable controls at runtime.

1 Like

Totally agree with @jslarve & @KevinErskine, pass a parameter to the procedure and let the parameter value hide/unhide the required drop down list or string control.

And to be clear, dont create two procedures of the same name with different parameter datatypes (which is called Procedure Overloading [1-3] - you can see this in action in some of the ABC classes amongst other places and uses) to call one or the other procedure where one has the drop down and the other procedure has the string control.

Maintaining two different procedures like this is more work and iirc the <=6 AppGen doesnt allow it either, so in the scheme of things, you wouldnt be able to do it anyway, havent tried in the 7=> Appgen, but it would be a nice feature to have it, if it could, but I digress…

[1] rules_for_procedure_overloading.htm [Clarion Community Help]

[2] Pros and Cons of Parameter Overloading - ClarionHub

[3] Procedure overload - Business Central | Microsoft Learn

ABBrowse.INC - The 3 init methods are examples of procedure overloading.

with New Clarion Syntax Highlighting on ClarionHub!
emphasis on the 3 back ticks with no space and lower case ‘clarion’. A space before a capitalised ‘Clarion’ or all caps ‘CLARION’, doesnt work.

LocatorClass  CLASS,TYPE,MODULE('ABBROWSE.CLW'),DLL(_ABCDllMode_)
ViewManager     &ViewManager
BrowseManager   &BrowseClass
Control         SIGNED
FreeElement     ANY
NoCase          BYTE
Destruct        PROCEDURE,VIRTUAL
GetShadow       PROCEDURE,VIRTUAL,STRING
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0),VIRTUAL !,EXTENDS
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0,ViewManager VM) !,EXTENDS
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0,BrowseClass BC) !,EXTENDS
Reset           PROCEDURE,VIRTUAL               ! Synchronises locator to current entry value (where applicable)
Set             PROCEDURE,VIRTUAL               ! Starts an 'empty' locator
SetLocatorField PROCEDURE(*? Free),VIRTUAL      ! Set the FreeElement
SetAlerts       PROCEDURE(SIGNED FieldEquate),VIRTUAL
SetEnabled      PROCEDURE(BYTE B),VIRTUAL
SetShadow       PROCEDURE(STRING S),VIRTUAL
TakeAccepted    PROCEDURE,VIRTUAL,BYTE          ! 1 for locator on value required
TakeKey         PROCEDURE,VIRTUAL,BYTE          ! 1 for locator on value required
UpdateWindow    PROCEDURE,VIRTUAL
              END

without New Clarion Syntax Highlighting on ClarionHub!

LocatorClass  CLASS,TYPE,MODULE('ABBROWSE.CLW'),DLL(_ABCDllMode_)
ViewManager     &ViewManager
BrowseManager   &BrowseClass
Control         SIGNED
FreeElement     ANY
NoCase          BYTE
Destruct        PROCEDURE,VIRTUAL
GetShadow       PROCEDURE,VIRTUAL,STRING
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0),VIRTUAL !,EXTENDS
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0,ViewManager VM) !,EXTENDS
Init            PROCEDURE(SIGNED Control = 0,*? Free,BYTE NoCase = 0,BrowseClass BC) !,EXTENDS
Reset           PROCEDURE,VIRTUAL               ! Synchronises locator to current entry value (where applicable)
Set             PROCEDURE,VIRTUAL               ! Starts an 'empty' locator
SetLocatorField PROCEDURE(*? Free),VIRTUAL      ! Set the FreeElement
SetAlerts       PROCEDURE(SIGNED FieldEquate),VIRTUAL
SetEnabled      PROCEDURE(BYTE B),VIRTUAL
SetShadow       PROCEDURE(STRING S),VIRTUAL
TakeAccepted    PROCEDURE,VIRTUAL,BYTE          ! 1 for locator on value required
TakeKey         PROCEDURE,VIRTUAL,BYTE          ! 1 for locator on value required
UpdateWindow    PROCEDURE,VIRTUAL
              END
1 Like