Another Designer Problem

mjtaryan

Active Member
Licensed User
Longtime User
I started developing a new project aimed at tablets and almost immediately ran into a problem with the layout.

The attached program shows the problem. The basic layout consists of a background panel (white) that is the top level container for all other views and, therefore, is the parent for the other two views in the project (at this point). Those other views are a menubar panel (magenta) and a scrollview (orange). The script included in the layout file adjusts the dimensions of the scrollview so that it is to fill the background panel below the menubar panel. The left, top and width are as they should be, but if the app is compiled and run, you will see that the scrollview does not cover the bottom portion of the background panel as it sholuld. Yet, the log entries seem to indicate that the height of the scrollview matches the height of the area below the menubar panel. I don't understand why. Thanks.
 

Attachments

  • SketchTabUI.zip
    4.3 KB · Views: 178

mjtaryan

Active Member
Licensed User
Longtime User
You should increase the ScrollView inner panel height.

Note that this code:
B4X:
pnlBG.Left = 0%x
pnlBG.Top = 0%y
pnlBG.Width = 100%x
pnlBG.Height = 100%y
Is equivalent to:
B4X:
pnlBG.SetLeftAndRight(0, 100%x)
pnlBG.SetTopAndBottom(0, 100%y)

Thanks Erel, I didn't try the inner panel -- I've done that only ehen adding content. I will try it. As for the code, doing them separsteky is merely force of habit
 
Upvote 0
Top