I have created a dialog box in Acrobat 9.0. When the dialog box opens in Reader 7.0.5, the width is larger than the screen's width. During the dialog box initialization, "sta1" is populated with a long text string with no line breaks (\r\n).
I have tried setting [b]width[/b] and [b]char_width[/b] for each element, but the dialog box continued to appear extremely wide. Also, i have removed [b]alignment: "align_fill"[/b].
Reader 8.1.1 does not have this problem.
Ho do I control the width of the execDialog box in Reader 7?
first_tab: "btn1",
name: "My Company",
elements:
[
{
type: "view",
align_children: "align_row",
elements:
[
{
type: "image",
item_id: "img1",
height: 57,
width: 53,
},
{
type: "static_text",
item_id: "tit0",
font: "dialog",
bold: true,
char_height: 4,
name: boxTitle
}
]
},
{
type: "static_text",
item_id: "co1",
font: "dialog",
bold: true,
char_height: coHeight,
name: strPrepared
},
{
type: "static_text",
item_id: "sta1",
alignment: "align_fill",
multiline: "true",
char_height: 24
},
{
type: "static_text",
item_id: "copy",
font: "dialog",
bold: true,
char_height: 2,
name: strCopyright
},
{
type: "static_text",
item_id: "foot",
font: "dialog",
bold: true,
char_height: 6,
name: strFooter
},
{
type: "ok_cancel",
item_id: "btn1",
ok_name: "&Accept",
cancel_name: "&Decline"
}
]
Dialogs were first introduced in Acrobat 7, so there may have been changes with new releases of Acrobat that allow Reader 8 to recognize some element constraints that Reader 7 does not.
You need to wrap all of your elements in a top level element so you can have explicit control over the layout of all elements.
An Acrobat plug-in for easily creating the code for custom dialogs can be found at [url]http://www.windjack.com/products/acrodialogs.php[/url] It can certainly make this easier than hand coding them. You can Demo it and create a few dialogs to get a better handle on how to lay them out how you want, correctly.
Hope this helps,
Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Dimitri Munkirs
WindJack Solutions
pdfscripting.com