OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Set column width

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
bertl
General User
General User


Joined: 06 Mar 2004
Posts: 10
Location: Austria & Italy

PostPosted: Sun Jul 03, 2005 8:16 am    Post subject: Set column width Reply with quote

Hi everybody,
I have a problem changing the properties of a table cell/column. I just created a new TextTable and now I want to modify the width of the first column. But there is no interface XTextTableColumns where I just expected to change the width.
Can anyone tell me how to change the width of a column with the JavaAPI?

Thanx
bertl
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sun Jul 03, 2005 9:07 am    Post subject: Re: Set column width Reply with quote

bertl wrote:
I have a problem changing the properties of a table cell/column. I just created a new TextTable and now I want to modify the width of the first column. But there is no interface XTextTableColumns where I just expected to change the width.
Can anyone tell me how to change the width of a column with the JavaAPI?

I haven't done that yet, but my first question in this forum was about tables. And I got some very useful answers: http://www.oooforum.org/forum/viewtopic.phtml?t=14213&highlight=

You should take a look at this link too: http://www.oooforum.org/forum/viewtopic.phtml?t=3299. Although it is Basic, it adresses your question. Perhaps you can rewrite it in Java and post the result?

With kind regards
hol.sten
Back to top
View user's profile Send private message
bertl
General User
General User


Joined: 06 Mar 2004
Posts: 10
Location: Austria & Italy

PostPosted: Sun Jul 03, 2005 9:48 am    Post subject: Reply with quote

hi again
thanks for your answer, but just a few minutes after posting the thread I had an idea how to solve the problem, and here it is how it works.

Code:

XPropertySet xTableProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xTable );
TableColumnSeparator[] separators = new TableColumnSeparator[1];
separators[0] = new TableColumnSeparator((short)465, true);
xTableProps.setPropertyValue("TableColumnSeparators", separators);


As also mentioned in one of your links I used the property
Code:
TableColumnSeparators
. For more detailed information about this property you can look at the documentation Wink


so long,
bertl
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sun Jul 03, 2005 10:42 am    Post subject: Reply with quote

bertl wrote:
For more detailed information about this property you can look at the documentation Wink

Thanx a lot for that hint Wink

With kind regards
hol.sten
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group