Closed Bug 63974 Opened 25 years ago Closed 25 years ago

screen width allocation invalid (using flex or width as %)

Categories

(Core :: XUL, defect)

defect
Not set
minor

Tracking

()

VERIFIED INVALID

People

(Reporter: rvj, Assigned: jrgmorrison)

Details

(Keywords: testcase)

Attachments

(2 files)

assume you wish to divide the screen window into two halves, two boxes, one red on left and one blue on right. if the width of a box is allocated using the style attribute with a percentage value, the box width is zero if the box contains no child elements. (50% value is ignored) if the flex element is used, then the box width allocated is not proportional for sibling box elements (columns) if the box contains child elements of varying widths
PS Alternatively since only the textfield widget seems to allocate screen width correctly (50-50), is it possible to remove/hide the textfield inset border to achieve the desired affect? <textfield readonly="true" flex="1" value="01234567890123456789" /> <textfield readonly="true" flex="1" value="0" />
Attached file simple test case
have added a simple test case e.g. upper middle pink seperator is shifted left
Confirmed Platform: PC OS: Linux 2.2.16 Mozilla Build: 2001010221 Marking NEW.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: other → All
Hardware: Other → All
->evaughan
Assignee: trudelle → evaughan
->jrgm
Assignee: evaughan → jrgm
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
You need equalsize. Otherwise the box system is laying out as designed (will consume available space). (Marking invalid = not a bug). http://www.mozilla.org/xpfe/xulref/boxref.html#equalsize <?xml version="1.0"?> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" orient="vertical" > <box flex="1" orient="horizontal" equalsize="always"> <box flex="1" style="background-color:red; "> <text autostretch="never" value="01234567890123456789" /> </box> <box flex="1" style="background-color:blue;"> <text autostretch="never" value="01234" /> </box> </box> </window>
Hope that helps. Sorry for the slow turnaround.
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: