Thread

Posted on Sun Jan 21 22:45:52 2007 by bob
TextBox Positioning
I am trying to use createTextBox to position the box on the page. Using just the example code
$doc->createStyle ( "TB", family => "graphic", parent => "objectwithshadow", properties => { 'style:vertical-pos' => 'from-top', 'style:horizontal-pos' => 'from-left', 'style:vertical-rel' => 'page', 'style:horizontal-rel' => 'page' } ); $doc->createTextBox ( page => "AnyPageName", name => "The Box", size => '12cm, 4cm', position => '8cm, 14cm', style => 'TB', content => "The text in the box" );
has not worked for me: the box always ends up in the same position, centered at the top of the page.
I can change the size of the box correctly.
The xml in the unzipped document looks like it should work, ie the position appears to be what I need.
Suggestions would be appreciated.

Thanks
Bob
Direct Responses: 4179 | Write a response
Posted on Sun Jan 28 01:38:57 2007 by bob in response to 4098
Re: TextBox Positioning
After a bunch of manually unzipping files created by OO itself,
I found that I needed to change the following in createStyle:
family => "graphics", parent => "Frame",
the 's' in 'graphics' is needed :)
Write a response