Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-582

IllegalArgumentException : width is negative when using Form Heading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.5.1
    • wtk-terra
    • None
    • mac os x 10.6, java 6

    Description

      Receiving an exception "java.lang.IllegalArgumentException: width is negative." message when trying to add a heading in a Form container embedded within a Border > TabPane > SplitPane container hierarchy.

      Bug can be reproduced with the following wtkx :

      <Window title="Form Bug" maximized="true"
      xmlns:wtkx="http://pivot.apache.org/wtkx"
      xmlns="org.apache.pivot.wtk">
      <content>
      <SplitPane orientation="horizontal" splitRatio="0.3">
      <left>
      <TabPane>
      <tabs>
      <Border TabPane.label="Left Part">
      <content>
      <Label text="Left content" />
      </content>
      </Border>
      </tabs>
      </TabPane>
      </left>
      <right>
      <TabPane>
      <tabs>
      <Border TabPane.label="Right Part">
      <content>

      <Form styles="

      {showFirstSectionHeading:true}

      ">
      <sections>
      <Form.Section heading="Some heading">
      <BoxPane Form.label="Some item">
      <TextInput text="Some text"/>
      </BoxPane>
      </Form.Section>
      </sections>
      </Form>

      </content>
      </Border>
      </tabs>
      </TabPane>
      </right>
      </SplitPane>
      </content>
      </Window>

      removing the heading or turning it off with the "showFirstSectionHeading" style fixes the problem but this means headings cannot be used in the form.

      Attachments

        Activity

          People

            grandinj Noel Grandin
            ozbtech A.J.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: