laying out controls - width issues

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

laying out controls - width issues

#1

Postby kotinkarwak » Thu Dec 03, 2015 1:26 pm

In laying out a page, I am struggling to understand how to force a child to be within the boundary of a parent.
The parent is a title panel control whose width is set as 98%. The child a table control has its width at 100%. If I have data that is larger, then the table expands to fit and "overflows the limits of the parent.

In the image, the parent's boundary is marked by dotted green line and table is overflowing.
http://screencast.com/t/6th5BXJs
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Dec 03, 2015 2:28 pm

A browser will try and respect your width settings but there are some things that will force it to overflow. In your case, there just isn't room to fit the data within the space. Another thing that frequently causes problems (not in your case) is data entry fields or table columns - the length of these is honoured by the browser at the expense of the overall width. You can also use the CSS white-space rule to change the default for text wrapping. But this only allows the browser to wrap when it comes across a space in a sentence - which you don't have in your example.

In your case, there just isn't enough room for the data, so you need to do one or more of these:
  • increase the available width
    display less data
    reduce the number of columns
    reduce the font size
    display the data differently e.g. in a Repeater Control on multiple lines
    use CSS overflow to constrain the total width and then allow the user to scroll
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#3

Postby kotinkarwak » Fri Dec 04, 2015 11:07 am

Thanks Jon,
Used repeater control which achieves a better layout as suggested.

Repeater Control
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#4

Postby kotinkarwak » Thu Feb 11, 2016 6:46 pm

Just appending to this thread since issue is related.
I have a container marked with a height of 360px, in the image, its the one with <b>orange</b> border.
The child which is a tab control is overflowing the parent but assumed a scroll bar would have kicked in at this point. No height settings is implemented for the tab control or its parent container. The red marker is for the container panel

structure is
Panel (360px height)
Panel (No settings)
Tab control (No settings)


Please see image
http://screencast.com/t/X5BdO4dxi6
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#5

Postby Jon » Fri Feb 12, 2016 9:45 am

Sounds like you need to specify a height, or perhaps a max-height on the tab control and also add overflow. You won't see a browser scroll bar unless you specify overlow: scroll.
0 x


Who is online

Users browsing this forum: No registered users and 4 guests