The problem is that a Prompt's preferred size in Pivot 2.0 is slightly smaller than in Pivot 1.5, and the labels in your prompt's body are not configured to wrap. As a result, the text is getting clipped.
I increased the default size slightly, but you should probably add a "wrapText:true" style to your labels just to be on the safe side (for example, in case the user manually resizes the prompt). G On Oct 5, 2010, at 12:32 PM, Roger and Beth Whitcomb wrote: > Hi, > I’m seeing what looks like a small problem with sizing of a > Prompt when given a body in 2.0 as opposed to 1.5.2. Here is the source of > the body: > <?xml version="1.0" encoding="UTF-8"?> > <TablePane xmlns:wtkx="http://pivot.apache.org/wtkx" > xmlns="org.apache.pivot.wtk"> > <columns> > <TablePane.Column width="1*"/> > </columns> > <rows> > <TablePane.Row height="-1"> > <Label wtkx:id="aboutVersionLabel" text="%aboutVersionLabel" > styles="{font:{italic:true, bold:true, size:11}}"/> > </TablePane.Row> > <TablePane.Row height="-1"> > <Label text="%copyright" styles="{font:{size:11}}"/> > </TablePane.Row> > <TablePane.Row height="24"> > <Separator styles="{padding:{top:8,bottom:8}}"/> > </TablePane.Row> > <TablePane.Row height="-1"> > <Label text="Built on $(__DATE__) at $(__TIME__)" > styles="{font:{size:9}}"/> > </TablePane.Row> > <TablePane.Row height="-1"> > <Label text="Java version $(__JAVA_VERSION__)" > styles="{font:{size:9}}"/> > </TablePane.Row> > </rows> > </TablePane> > > The code to display it looks like this: > @Override > public void aboutRequested() { > Component body = (Component)readObject("about", this); > > aboutVersionLabel.setText(String.format(aboutVersionLabel.getText(), > APP_VERSION)); > Prompt.prompt(MessageType.INFO, > (String)resources.get("mainAppTitle"), body, mainWindow); > } > > Here is what it looks like under 1.5.2 – very nice looking (IMO), although I > don’t know why it has what looks like unwarranted extra width on the right, > based on the content. > <Mail Attachment.png> > > But, in 2.0 (head revs built the other day), it is sized just a little bit > too narrow so that the last character gets chopped off. And even though > there is the sizing widget in the lower right, these just seems cheesy to me > that it couldn’t get sized correctly to begin with. Or am I wrong? Is there > something else I should be doing to get the size right? > <Mail Attachment.png> > > Thanks! > > > > Roger Whitcomb > Architect, Engineering > Ingres Corporation > [email protected] > > PHONE +1 650.587.5596 > FAX +1 650.587.5550 > > www.ingres.com > > This transmission is confidential and intended solely for the use of the > recipient named above. It may contain confidential, proprietary, or legally > privileged information. If you are not the intended recipient, you are hereby > notified that any unauthorized review, use, disclosure or distribution is > strictly prohibited. If you have received this transmission in error, please > contact the sender by reply e-mail and delete the original transmission and > all copies from your system. >
