| View previous topic :: View next topic |
| Author |
Message |
bertl General User

Joined: 06 Mar 2004 Posts: 10 Location: Austria & Italy
|
Posted: Sun Jul 03, 2005 8:16 am Post subject: Set column width |
|
|
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 |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3532 Location: Hamburg, Germany
|
Posted: Sun Jul 03, 2005 9:07 am Post subject: Re: Set column width |
|
|
| 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 |
|
 |
bertl General User

Joined: 06 Mar 2004 Posts: 10 Location: Austria & Italy
|
Posted: Sun Jul 03, 2005 9:48 am Post subject: |
|
|
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
so long,
bertl |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3532 Location: Hamburg, Germany
|
Posted: Sun Jul 03, 2005 10:42 am Post subject: |
|
|
| bertl wrote: | For more detailed information about this property you can look at the documentation |
Thanx a lot for that hint
With kind regards
hol.sten |
|
| Back to top |
|
 |
|