Piotr,
This sounds like a creative use of subforms. But it also sounds pretty
complex. So the first thought I offer is to look at what you are trying to
do and be sure using subforms in actually the best solution. It may be but
there may also be another approach that results in the same UI.

For example, you could use OBJECT SET SUBFORM
<http://doc.4d.com/4Dv15/4D/15.5/OBJECT-SET-SUBFORM.301-3576522.en.html> to
and simply change the displayed subform as required instead of managing
multiple subform objects.

The version you are using also may matter. But to answer the question you
asked:

On Mon, Mar 19, 2018 at 1:40 AM, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I have a form with a couple of subforms on it
> Now I want to add another subform, that is on top of 3 others, and becomes
> visible when pressing a button
>

​First I'm assuming all 3 of these subforms are on the parent form and not
nested (a subform on a subform) AND on the same form page. Also, are the
subform objects, the variables that contain the subforms, process variables
or form variables?

If the subform you are trying to display is on page 0 it would create this
issue. Either put all the subforms on page 0 or put a subform on each page
for this purpose. Remember you can use
​
​Are you using OBJECT DUPLICATE
<http://doc.4d.com/4Dv15/4D/15.5/OBJECT-DUPLICATE.301-3576548.en.html> to
add subforms? If so remember to ​specify the "boundTo" object. This param
lets you manage the z order of the objects. If you don't use it the new
object is at the top of the stack. This could account for the issue.

The other possibility is the context. When you say "press a button" where
is that button? This is important.

If it is on the parent form you really shouldn't have a problem.

If it's on a subform you may be opening the popup subform within the
subform with the button because the button on the subform runs in the
context of the subform - not the parent form. This can be quite confusing.

Remember that the form events on a subform run BEFORE the parent form. So
an On clicked event from a button on a subform runs:
1) in the subform button

2) the subform form method

3) the subform container (which is the 'subform object' on the parent form)

4) the parent form method


You can see it as a kind of popup viewer
>
​The subform pops up - is it displaying fields from a record (which record)
or something like a list, variables etc?​



> Because the subform must show in front of the others, in design mode I put
> the subform container to the front
> However, when I save the form the subform container disappears to the back
> agai
> ​n
>
​What does "save the form" mean? Saving the parent form or the subform?

​

-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to