Bug? The "elevation" field of a panel prevents me from changing the text of a label

irda

Member
Licensed User
Longtime User
Summary:
I have a layout with a top panel as a bar with an elevation of 5. Within this panel I have a title "label" (its parent is the panel) whose text changes by code when I click on a menu option ( B4XDrawer) to indicate the selected option.
If the panel has the elevation field to 5, the text does not reflect the changes (although by code the change is read). If the panel has the elevation field at 0 the text is updated.

Reproduction Steps:
1. Create a new layout with a raised top panel. Inside create a label.
2. Add a drawer panel with several buttons in the form of a menu.
3. Clicking on a button changes the text of the label in the event of the button.

Actual Behavior:
If the panel elevation is > 0 the label text is not updated.

Expected Behavior:
have the label text update regardless of the elevation of the parent panel

Notes (optional):

Additional information (optional):

B4A v 10.60
 

Attachments

  • ELEVATION_BUG.zip
    14.7 KB · Views: 131
Last edited:

Sagenut

Expert
Licensed User
Longtime User
It would be better if You could upload a small project that show the problem.
So every member will have for sure the same base to test.
 

irda

Member
Licensed User
Longtime User
Hello.
I update the first post attaching a project where you can see the error. I have started a new project with the minimum elements and the error continues to occur.
I have included a panel without elevation and this one updates correctly, the other panel that is the same with elevation does not update correctly.
I understand that there should be no relationship but it does not behave as expected.
Thank you.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The bug in your code is here:
B4X:
Root.LoadLayout("frmGrupoPaneles") '<----
    
    B4XPages.SetTitle(Me, "Config")
    Drawer.Initialize(Me, "Drawer", Root, 180dip)
    Drawer.CenterPanel.LoadLayout("frmGrupoPaneles")
    Drawer.LeftPanel.LoadLayout("frmMenuLateral")

You are loading the same layout twice. One behind the drawer and one above it. The elevation causes the layout to show in front of the drawer.
Remove the first line.
 

irda

Member
Licensed User
Longtime User
My apologies.
As always you are right Erel. This is my first project with B4XPages and Drawer and I don't have much experience with these issues.
Thank you.
 

Cableguy

Expert
Licensed User
Longtime User
The bug in your code is here:
B4X:
Root.LoadLayout("frmGrupoPaneles") '<----
    
    B4XPages.SetTitle(Me, "Config")
    Drawer.Initialize(Me, "Drawer", Root, 180dip)
    Drawer.CenterPanel.LoadLayout("frmGrupoPaneles")
    Drawer.LeftPanel.LoadLayout("frmMenuLateral")

You are loading the same layout twice. One behind the drawer and one above it. The elevation causes the layout to show in front of the drawer.
Remove the first line.
It's always the little things that are the most annoying
 
Top