Bug? Pane.LoadLayout misbehaving!

Cableguy

Expert
Licensed User
Longtime User
Hi EREL,

I place this as a bug simply because I have tried everything I could think of to solve this issue, but not getting what I expected.

I have set my main form to be Transparent, using setStyle so that I still get the notification bar icon.
Then I created a second form, set as Utility, and set it's owner to be the Main form.
This second "child" form (MyForm) has 2 panels in it, both with rootpane as parent.
The first pane (FaderPane) has an alpha value of 0.4, and is anchored in both directions so that it covers the whole screen.
The second pane, with alpha set to 1, has a fixed size, smaller than the screen. This pane I called MainPane.
Now, my issue is, when I use MainPane.LoadLayout the loaded layout always covers the complete screen, and yet, the views are placed where I espectee them to be. My guess is the "main" view in the layout is being sized to the whole screen, thus I am loosing the FaderPane alpha effect around my fixed size MainPane. The layout I'm loading has a custom layout size and is set to resize with the parent. It also has a designer script in order to correctly place the views.
If I don't load a layout to MainPane, it shows it correctly places in the center of the screen with the correct size, and the FaderPane shows correctly too.

I can't provide a sample at this moment, but if needed, I will cook one later in the afternoon.
 

Cableguy

Expert
Licensed User
Longtime User
Here is my "work in progress" sample.

If you comment the indicated lines, the FaderPane shows the Alpha value as expected.
With those lines un-commented, seems like the MainPane is being resized to the whole screen, event thou it has a set size, both in the code, as in the Layout file.
Can it be the external CSS that's causing all this? (I have tried without it and had the same results, so I would say it's not the problem°
 

Attachments

  • Sample.zip
    5.3 KB · Views: 326

Cableguy

Expert
Licensed User
Longtime User
My issue is not the size, my issue is that FadderPane seems to get covered!
Anyway, I'm better of replicating the layout directly into the MainPane with the designer.
 

Cableguy

Expert
Licensed User
Longtime User
So, I decided to recreate the Loaded Layout directly into the MainPane, one node at a time, and I have found the culprit of this strange behaviour.
the problem lays NOT in the LoadLayout method, but rather in the Button node.

My layout has several nodes, from accordion to scrolllist, and 2 buttons on the topbar.
If you remove these 2 buttons, the layout will show with the semi-transparent FadderPane around the MainPane.
SO there is a BUG, related to the BUTTON wrapper.

[EDIT]
Further testing, I found that if the Main Background is left as default, then the button will make the background a solid gray. Setting the Main Background to transparent solved the issue.
 
Last edited:
Top