Panel -> Layout in 1 activity

Kimmowich

Member
Licensed User
Longtime User
Hey All

I must admit I use 1 Activity and several Panels to do the job.

But looking at the examples of several Panel-Layouts provided by Klaus
http://www.b4x.com/forum/basic4android-getting-started-tutorials/8416-different-examples-2-layouts.html#post47102

I began to play around with it.

... and here is the problem:

In my Activity i have a Label at the top of screen.

When I load the Panel-Layout (the Panel is placed below the Label) and makes it visible the Label dissapear. The Panel itself looks perfect.

And I just cant figure out why

Sincerely
 

klaus

Expert
Licensed User
Longtime User
Could you post your project as a zip file.
So we could better see what you want to do and how you tried doing it.
Without knowing what you did it is difficult to give you concrete advices.
Where is the Label? On another Panel on the Activity ?
How and where is the Panel defined ?
We would have the answers to all these questions with your project.
If your Panel covers the Label it's normal behaviour.
If you want the Panel not covering the Lable you could set the Panels top parameter to a value to not cover the Label.

Best regards.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Here you are.
The problem you had is that you set Panel1.Top = 0 !
That means that your Panel covers the Label.
Commenting out this line, the Panel is on the right place, as defined in the Designer.
If you want to set the Panel just below the Label you could replace
Panel1.Top = 0
by
Panel1.Top = Label1.Height

For the Panel layouts you don't need to have a 'main' panel, just add the views you need and that's all. Like in the attached modified program for layout 'p1'.

Attached your modified test program.

Best regards.
 

Attachments

  • paneltst1.zip
    7.2 KB · Views: 309
Upvote 0

Kimmowich

Member
Licensed User
Longtime User
:signOops:

Well..

I have no idea why I focused so much on the Panel in "p1"

Thanks alot Klaus.. I feel kinda :sign0148:

Have a nice day :sign0188:
 
Upvote 0
Top