Dear Florian,
I'm not an expert at OO, but the next code could help.
Abraços.
-------------------------------------------------------
André B. Derraik
Consultor
Tecgraf/PUC-Rio http://www.tecgraf.puc-rio.br
[EMAIL PROTECTED] Tel.: +55-21-2512-8428
Florian Limberger wrote:
Hi,
I'm using C# with cli-uno to control OO. I want to set the
column-property "OptimalWidth" of a TextTable to true.
Casting the column to a XPropertySet does not work (invalid cast). Does
anyone know, how to set the OptimalWidth of a whole TextTable ?
cheers
Flo
----------------------------------------------------------------
XTextTable table = null;
XMultiServiceFactory factory = (XMultiServiceFactory)doc;
table = (XTextTable)
factory.createInstance("com.sun.star.text.TextTable");
XTableColumns cols = table.getColumns();
int count = cols.getCount();
for(int i=0;i<cols.getCount();i++)
{
XPropertySet props = (XPropertySet)cols.getByIndex(i).Value;
props.setPropertyValue("OptimalWidth",new uno.Any(true));
}
----------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]