FindById(Id: String): IStyleContainer;
Id is the identifier of the style container that provides the search.
The FindById method searches by identifier and returns the style container from the styles table. The identifier that provides the search is passed by the Id parameter.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
StyleSheet: IStyleSheet;
Style: IStyleContainer;
TabSty: ITabCellStyle;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Global_Style").Edit;
StyleSheet := MObj As IStyleSheet;
Style := StyleSheet.FindById("I4");
If Style <> Null Then
TabSty := New TabCellStyle.Create;
TabSty.LoadFromContainer(Style);
TabSty.Font.Size := TabSty.Font.Size * 2;
TabSty.SaveToContainer(Style);
End If;
MObj.Save;
End Sub Main;
After executing the example the style container with the "I4" identifier is searched. If the search is successful, the font for the style stored in this container is increased two times.
See also: