FC777
FC777

Reputation: 85

Hide external subscreen field from main program

Is there a way from the main screen PBO to hide a subscreen field?

The subscreen is defined in a different Function group.

Upvotes: 3

Views: 5255

Answers (2)

mydoghasworms
mydoghasworms

Reputation: 18591

Here is a possible solution:

If you want to control the visibility of a subscreen field from your main program, you will have to insert a LOOP AT SCREEN in the PBO of the subscreen program, as vwegert has already indicated.

If the subscreen in question belongs to a standard program and you cannot change it for that reason, you may be able to find an appropriate call to a subroute/form from a PBO module of the subscreen where you can insert an implicit enhancement. Inside this enhancement, you can put your code to modify the screen. (Of course, if it is not a standard program, you can just make the change anywhere in a PBO module).

Now, as to controlling the visibility from the main program: In your main program, you can set a flag and export it to memory with EXPORT TO MEMORY. In the PBO of the subscreen, you can then read this flag with IMPORT FROM MEMORY, and depending on the value, hide or show the field with LOOP AT SCREEN.

Upvotes: 0

vwegert
vwegert

Reputation: 18483

This is not possible: From the viewpoint of the main screen, the subscreen area is just a single element without further internal structure and cannot be examined or modified in detail. You would have to adapt the subscreen program to accept the screen modification data through some more or less generic programming interface and then perform the modification itself.

Upvotes: 2

Related Questions