Hi Kirk, Thanks for diving into my subform problem😊
> another approach that results in the same UI. I have converted the parent form, with 23 programmatically build listboxes on it that are show/hidden, into a parent form with 7 subforms with static listboxes (columns created in design mode) This all advised by others in another thread you can read on the iNUG about programmatically creating listboxes and performance I must say this exercise indeed resulted in a big performance gain > The version you are using also may matter I use 4D v16 R6 on Windows and OSX > What does "save the form" mean? Saving the parent form or the subform? In design mode, when putting the subform on the form in front of the other subforms (I don't use OBJECT DUPLICATE) and close the parent form and reopen it (or even when I save the parent form) the subform I put in front goes to the back again. I am not able to keep it in front. All these subforms are on page 1. > If it is on the parent form you really shouldn't have a problem. So, all subforms are on page 1 of the parent form, and the problematic subform is shown by an action in the parent form As I replied on another post maybe this could be because there is a webarea on it? As far as I know the rendering of the webarea is differs from the rendering of the other objects on a form It often happens that the webarea (and other plugins as well) are rendered earlier than other objects, resulting in ugly white parts on the screen while for example executing an object method My final conclusions so far: - There is some kind of bug in 4D because even when I set a subform object to the front it disappears to the back again when saving the parent form - Because of difference between rendering of webareas (and other plugins) and other objects there are some redraw problems when setting objects to visible/invisible when webareas are involved Gr, Piotr > -----Oorspronkelijk bericht----- > Van: Kirk Brooks <[email protected]> > Verzonden: dinsdag 20 maart 2018 15:57 > Aan: 4D iNug Technical <[email protected]> > Onderwerp: Re: overlapping subforms > > 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 < > [email protected]> 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:[email protected] **********************************************************************

