Re: overlapping subforms

2018-03-21 Thread Kirk Brooks via 4D_Tech
Hey Piotr,


On Wed, Mar 21, 2018 at 2:50 AM, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> > 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
>
​I recall that thread. yeah, building all those listboxes as you were was -
heroic.​

> The version you are using also may matter
> I use 4D v16 R6 on Windows and OSX
>
​Being on the bleeding edge like this can be problematic. And there are
differences between 32 bit and 64  bit that crop up in unexpected places.

This is a complex form. Do you need to be on R6? Could you be on v16.3 just
for the sake of stability? ​


> > 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.

​It might well be a bug. ​


> 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
>
​Maybe but I doubt it. The web area is more or less like any other object
on the form at that level. I don't think there is anything about it that's
going to 'bleed out' as it were and contaminate the other objects.

Y
​ou touch on a good point about the order that your objects load. Remember
it goes like this:

Objects on subforms
Subform form method  (but the On load event only fires once - when the
parent form loads the first time)
objects on parent form
parent form method


​If you do alot, or all, of the ​form configuration in the On load form
event of the Parent Form you must remember that you are doing so AFTER
everything else has already run.

I'm not saying not to do that config there. I do it in almost all my forms.
It's just you have to set up the form to accommodate it. It's not hard. I
use EXECUTE IN SUBFORM from here to configure my subforms, for example. I
also deselect the On load event on all the subform objects (the ones on the
parent form) just to keep control.

Also, if you have an input form that allows you to navigate through some
records (next, previous, etc) and you have a subform on it the subform form
method will only fire the first time the parent form loads. It DOES NOT
fire each time you change records like the parent form does. This can be
very confusing.

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
>
​maybe​


> - 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
>
​It may not be an issue with _what_ the objects render but the _sequence_
they render in. ​If you expect these subforms to load in a particular order
or they depend on data in another subform this will be really challenging
unless you centralize this setup work.

-- 
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
**

RE: overlapping subforms

2018-03-21 Thread Piotr Chabot Stadhouders via 4D_Tech
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 
> Verzonden: dinsdag 20 maart 2018 15:57
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> 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 <
> 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
>

Re: overlapping subforms

2018-03-20 Thread Kirk Brooks via 4D_Tech
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
 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
 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
**

RE: overlapping subforms

2018-03-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Yes, I am sure I set it to the front, but when I do a "Save Form" the subform 
goes to the back again
I also tried setting the other subforms to invisible, and making the 4th 
subform visible
This also doesn’t work always
Maybe this problem has to do with some other facts :
I use a webarea in the 4th subform, and I also resize the subform before making 
it visible

Does anybody know of redraw problems when using a webarea in a subform?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: John Baughman 
> Verzonden: maandag 19 maart 2018 17:08
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: overlapping subforms
> 
> If I understand you correctly, you have 3 subforms visible and want them to
> remain visible when you make a 4th subform visible on top of them? However,
> when you open the form and click the button to make it visible it appears
> behind the other 3 forms.
> 
> I just tested the above scenario and after in design mode I move the 4th
> subform to the front with Move To Front (control-F) then run it, the 4th 
> subform
> displays in front. If I move it to the back with Move To Back (control-B) in
> design mode, it properly opens behind the other subforms when run.
> 
> Are you sure that you in fact moved the 4th subform to the front while in 
> design
> mode?
> 
> John
> 
> 
> 
> > On Mar 19, 2018, at 3:02 AM, Randy Jaynes via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > I have a form with 3 subform container objects sitting on top of each 
> > other. I
> just use OBJECT SET VISIBLE to hide the ones that don’t need to be seen at the
> moment.
> >
> > They all occupy the same space on the parent form, so because I hide the 2
> not needed, the ordering on the form does not matter.
> >
> > I use a tab to control which one is visible at the moment. Your buttons 
> > could
> serve the same purpose.
> >
> > Randy
> >
> > --
> > Randy Jaynes
> > Senior Programmer and Customer Support
> >
> > http://printpoint.com <http://printpoint.com/> • 845.687.3741 •
> > PrintPoint, Inc • 57 Ludlow Lane • Palisades, NY 10964 Please send all
> > email contacts to supp...@printpoint.com
> > <mailto:supp...@printpoint.com>
> >
> >
> >
> >
> >> On Mar 19, 2018, at 4:40 AM, Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
> >>
> >> Hi,
> >>
> >> 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 You can see it as a kind of popup viewer 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 again
> >>
> >> Are there known problems putting subforms on top of each other?
> >>
> >> Gr,
> >>
> >> Piotr
> >>
> >>
> 
> *
> >> *
> >> 4D Internet Users Group (4D iNUG)
> >> FAQ:  http://lists.4d.com/faqnug.html
> >> <http://lists.4d.com/faqnug.html>
> >> Archive:  http://lists.4d.com/archives.html
> >> <http://lists.4d.com/archives.html>
> >> Options: https://lists.4d.com/mailman/options/4d_tech
> >> <https://lists.4d.com/mailman/options/4d_tech>
> >> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >> <mailto:4d_tech-unsubscr...@lists.4d.com>
> >>
> 
> *
> >> *
> >
> >
> 
> **
> > 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
> >
> 
> **
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
> 
> 
> 
> 
> 

**
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
**

Re: overlapping subforms

2018-03-19 Thread John Baughman via 4D_Tech
If I understand you correctly, you have 3 subforms visible and want them to 
remain visible when you make a 4th subform visible on top of them? However, 
when you open the form and click the button to make it visible it appears 
behind the other 3 forms.

I just tested the above scenario and after in design mode I move the 4th 
subform to the front with Move To Front (control-F) then run it, the 4th 
subform displays in front. If I move it to the back with Move To Back 
(control-B) in design mode, it properly opens behind the other subforms when 
run.

Are you sure that you in fact moved the 4th subform to the front while in 
design mode?

John



> On Mar 19, 2018, at 3:02 AM, Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have a form with 3 subform container objects sitting on top of each other. 
> I just use OBJECT SET VISIBLE to hide the ones that don’t need to be seen at 
> the moment.
> 
> They all occupy the same space on the parent form, so because I hide the 2 
> not needed, the ordering on the form does not matter.
> 
> I use a tab to control which one is visible at the moment. Your buttons could 
> serve the same purpose.
> 
> Randy
> 
> --
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com  • 845.687.3741 • PrintPoint, 
> Inc • 57 Ludlow Lane • Palisades, NY 10964 
> Please send all email contacts to supp...@printpoint.com 
> 
> 
> 
> 
> 
>> On Mar 19, 2018, at 4:40 AM, Piotr Chabot Stadhouders via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> 
>> Hi,
>> 
>> 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
>> You can see it as a kind of popup viewer
>> 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 
>> again
>> 
>> Are there known problems putting subforms on top of each other?
>> 
>> Gr,
>> 
>> Piotr
>> 
>> **
>> 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 
>> 
>> **
> 
> **
> 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
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
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
**

Re: overlapping subforms

2018-03-19 Thread Randy Jaynes via 4D_Tech
I have a form with 3 subform container objects sitting on top of each other. I 
just use OBJECT SET VISIBLE to hide the ones that don’t need to be seen at the 
moment.

They all occupy the same space on the parent form, so because I hide the 2 not 
needed, the ordering on the form does not matter.

I use a tab to control which one is visible at the moment. Your buttons could 
serve the same purpose.

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to supp...@printpoint.com 





> On Mar 19, 2018, at 4:40 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com > wrote:
> 
> Hi,
> 
> 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
> You can see it as a kind of popup viewer
> 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 
> again
> 
> Are there known problems putting subforms on top of each other?
> 
> Gr,
> 
> Piotr
> 
> **
> 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 
> 
> **

**
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
**