Control fields width in table Frame

553
1
07-11-2021 10:31 PM
mody_buchbinder
Occasional Contributor III

When you create a table frame in layout with pro (not in code) you have an option to set the field width to Auto width.

Is there any option in the SDK to set this property?

Thanks

0 Kudos
1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You can use the 'FittingStrategy' property of the CIMTableFrame to set the auto sizing behavior:

var theTable = LayoutElementFactory.Instance.CreateTableFrame(layout, EnvelopeBuilder.CreateEnvelope(llTab1, urTab1), mfElm, lyr, new string[] { "Label", "Description" });
var def = theTable.GetDefinition() as CIMTableFrame;
def.FittingStrategy = TableFrameFittingStrategy.AdjustColumnsAndSize;
def.FillingStrategy = TableFrameFillingStrategy.ShowAllRows;
theTable.SetDefinition(def);